# Enable PHP in Userdirs

This post was migrated from my Techblog.

In my Apache post, I mentioned that it was a nasty process enabling php in per-user directories. Well, I did another google search today, and it turns out I was wrong — it’s actually very easy!

All you have to do is open the /etc/apache2/mods-enabled/php5.conf file and comment out this bit of code:

<IfModule mod_userdir.c>
<Directory /home/*/public_html>

Remember, comments in Apache begin with #. Also, just in case you were tempted, the file warns against changing the Off to On, as that would prevent any .htaccess files from disabling the engine.
\$ sudo /etc/init.d/apache2 restart