Monday, 16 January 2012

php not display under public_html

First of all make the apache server with qualified domain name.

1. Enable UserDir module.

2. Edit /etc/apache2/httpd.conf

AddType application/x-httpd-php .php

# Use for PHP 5.x:
#LoadModule php5_module modules/libphp5.so
AddHandler php5-script php

# Add index.php to your DirectoryIndex line:
DirectoryIndex index.html index.php

AddType text/html php

3. Add following at the end of /etc/apache2/apache2.conf

Include /etc/apache2/sites-enabled/
AddType application/x-httpd-php .php
UserDir /home/*/public_html