"The word 'radical' derives from the Latin word for root. Therefore, if you want to get to the root of anything you must be radical. It is no accident that the word has now been totally demonized..." -- Gore Vidal
Add the following to /etc/apache2/httpd.conf
APACHE2_OPTS="-D DEFAULT_VHOST -D PHP5"
Where <name> is the name of the host and <port> is the port you want Apache to listen on.
If Apache is hosted locally, you can usually use localhost for name. Port will usually be 80 for webserving.
You should now have a basic, functional Apache server.
Please check this page
Add as you feel required. (don't forget mysql and apache2 !)
I suggest you read trough those carefully. Otherwise you need to re-compile php with the USE flags you've forgotten to add.
# echo "dev-lang/php apache2 mysql <ADDITIONAL USE FLAGS>" >> /etc/portage/package.use
# emerge php
The configuration file is located in 3 places, so you can configure php differently for the 3 ways you can use it.
We are only interrested in the 3rd file.
Automatically launch the server upon startup:
# rc-update add mysql default
(The "mysql_setpermission" script requires DBI and DBD-mysql to be installed. This is not called out in the install instructions/dependencies above.)
you HAVE to use the same password for root that you used when you ran emerge --config dev-db/mysql !!
An alternative method is to do it manually via the mysql console:
mysql> SET PASSWORD FOR 'root'@'localhost'=PASSWORD('betchawontguessit');