research | programming | linux
apache2
and php
in your make.conf
emerge -av apache emerge -av php
/etc/apache2/httpd.conf
and add a
ServerName
. The value localhost
will do if you just want to do
some test on your machine.
ServerName localhost
/etc/conf.d/apache2
APACHE2_OPTS="-D PHP5 ..."
/etc/init.d/apache2 start
Note that apache will fail silently in case you haven't set an alias
between localhost and the name of your machine. To see this, check
if httpd is running. If not, see the log file in /var/log/
:
gesundheit apache2 # cat /var/log/apache2/error_log [Sun Jun 07 14:04:24 2009] [alert] (EAI 2)Name or service not known: mod_unique_id: unable to find IPv4 address of "gesundheit" Configuration Failed
This can be fixed (ref) setting the alias in /etc/hosts
gesundheit apache2 # cat /etc/hosts ... # IPv4 and IPv6 localhost aliases 127.0.0.1 localhost gesundheit ::1 localhost gesundheit ...
/etc/apache2/httpd.conf
file:
<Directory /var/www/localhost/htdocs> Options Indexes Includes FollowSymLinks order allow,deny allow from all </Directory>
Tomcat can be installed by running
emerge -av tomcat /etc/init.d/tomcat-6 start
Visit http://localhost:8080 to check your configuration.
Date: 2009-03-15 dim.
HTML generated by org-mode 6.21b in emacs 23