Activating web server home directories in Ubuntu Jaunty 10.4 / Mint Isadora
After migrating to Linux Mint Isadora my home directory web sites ceased working (IE in /home/username/public_html).
To activate them again it was necessary to make some changes to my Apache configuration. Open a terminal and do the following:
cd /etc/apache2/mods-enabled sudo ln -s ../mods-available/userdir.conf userdir.conf sudo ln -s ../mods-available/userdir.load userdir.load sudo /etc/init.d/apache2 restart
That worked, except PHP is disabled also by default for home directories. So the following “commenting out” was required as described in /etc/apache2/mods-available/php5.conf:
SetHandler application/x-httpd-php SetHandler application/x-httpd-php-source # To re-enable php in user directories comment the following lines # (fromto .) Do NOT set it to On as it # prevents .htaccess files from disabling it. ## # php_admin_value engine Off # #
Unfortunately, this was not the end of the exercise. As you may gather from the file contents, PHP file parsing is only being activated for files ending in .php3 and .phtml.
Parsing of .php extensions appears to be activated elsewhere for our document root directory only, so clicking on localhost/~username/file.php resulted in the file being downloaded, not parsed and presented as a web page.
To get around this the following was added to the file /etc/apache2/mods-available/php5.conf:
SetHandler application/x-httpd-php
I hope this help someone
Nicholas