2011年11月23日水曜日

Enable userdir on apache2


I wanted a directory named "public_html" under each user home directory for a public web folder.

(1) Enable mod_userdir
sudo a2emod userdir

(2) Edit userrdir.conf
sudo vi /etc/apache2/mods-enabled/userdir.conf, and then make sure the line "UserDir public_html" are included.

(3) Restart apache2
sudo /etc/int.d/apache2 restart

and also make sure that your home directory is accessible from a user running apache2. Permissions of your home directory will be "711" and your public_html will be 755.

0 件のコメント: