How to enable UserDir in Ubuntu 12.04 LTS

Configure for userdir

To enable the UserDir configuration on Ubuntu 12.04 LTS, do the following: Enable the userdir mod.

$ sudo a2enmod userdir

Edit the userdir configuration file.

$ sudo vim /etc/apache2/mods-enabled/userdir.conf

Change the AllowOverride line to:

AllowOverride All

Change the Options line to:

Options ExecCGI

Next, edit the php5 configuration file:

$ sudo vim /etc/apache2/mods-enabled/php5.conf

Comment line php_admin_value engine off*

Restart apache2

$ sudo service apache2 restart