Enable apache mod_userdir on Debian

Sunday, 12 July 2009

Today I wanted to enable mod_userdir for apache2 on Debian 5.0 (Lenny).

Here's what I did:

$ sudo cp /etc/apache2/mods-available/userdir* /etc/apache2/mods-enabled/
$ sudo /etc/init.d/apache2 restart

That was easy! The userdir.conf was already set-up to disable this feature for user root and to serve files from /home/*/public_html so to test that it works I did:

$ mkdir ~/public_html
$ echo yay! > ~/public_html/index.html

and then typed http://mysite.com/~jah/ into my web browser to check that the index file was served. yay!