Sunday, April 02, 2006

PHP4 with Apache2 on Gentoo

  1. edit /etc/make.conf and add "apache2" in your use flags
  2. emerge mod_php apache2
  3. Edit the file /etc/apache2/conf/apache2.conf and add these lines
    LoadModule php4_module extramodules/libphp4.so
    AddType application/x-httpd-php .php .phtml
    AddType application/x-httpd-php-source .phps
    ServerName "localhost"
    alias /@mydir@/ "@path@"
    <directory>
    Order deny,allow
    Allow from all
    </directory>
    where @mydir@ is the name you want to access from the internet and @path@ is the path to your the directory containing sources.
  4. restart apache
     /etc/init.d/apache2 restart 
  5. You should be able to access your page at: http://localhost/@mydir@/...

0 Comments:

Post a Comment

<< Home