How to activate apache userdir on Ubuntu

Posted: May 24, 2012 in Linux, Ubuntu
Tags: ,

Just want to put it here in case someone stumble into the same problem ;)

1. Make a userdir mod softlink

sudo su

cd /etc/apache2/mods-enable 

ln -s ../mods-available/userdir.conf userdir.conf

ln -s ../mods-available/userdir.load userdir.load

2. Edit php5.conf (make sure you have it on /etc/apache2/mods-enable directory if not create new links for it)

pico php5.conf

So it will look like this :

<IfModule mod_php5.c>
     <FilesMatch “\.ph(p3?|tml)$”>
          SetHandler application/x-httpd-php
     </FilesMatch>
     <FilesMatch “\.phps$”>
          SetHandler application/x-httpd-php-source
     </FilesMatch>
     # To re-enable php in user directories comment the following lines
     # (from <IfModule …> to </IfModule>.) Do NOT set it to On as it
     # prevents .htaccess files from disabling it.
     # <IfModule mod_userdir.c>
     #      <Directory /home/*/public_html>
     #           php_admin_value engine Off
     #      </Directory>
     # </IfModule>
</IfModule>

3. Restart apache and you’ll have your own userdir

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s