For some reason, this info wasn’t available in one neat place. Assuming you’ve already got Gentoo running and need an Apache + PHP setup, here are the steps to follow.
![]()
- nano /etc/make.conf to make sure that you’ve got apache2 and php in there. PEAR seems to want xml as well, but forces it.
- emerge -u apache php
- etc-update and you should be okay on automatic
- add the “-D PHP4″ to your /etc/init.d/apache2 script
- add these lines to /etc/apache2/conf/apache2.conf:
LoadModule php4_module extramodules/libphp4.so
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps - restart apache and you should be able to hit a PHP test page.
Related posts:
In step four, instead of updating /etc/init.d/apache2 you can edit /etc/conf.d/apache2.