Sunday, September 30, 2012

Gentoo: Apache does not interpreting PHP

If you use Gentoo/CentOS with Apache2 and PHP, and PHP is not interpreted, you should do the followings:

Open Apache2's configurations:
nano /etc/conf.d/apache2

Change the line:
APACHE2_OPTS="-D DEFAULT_VHOST -D INFO -D SSL -D SSL_DEFAULT_VHOST -D LANGUAGE -D PHP5 -D USERDIR"

After changing the line, don't forget to restart Apache:
/etc/init.d/apache2 restart

Now it should work!