Tuesday, November 11, 2014

Enable [hostname]/~user

Newly installed ubuntu server 14.04

By default /var/www/html/ is where you put your main website.
The apache2 allows to have multiple per user website which is not activated by default.

The below is from [2]

Use command a2enmod to enable Apache2 userdir module. these command will be create symlink /etc/apache2/mods-available/userdir.load and /etc/apache2/mods-available/userdir.conf in to directory /etc/apache2/mods-enable/
sudo a2enmod userdir
Restart apache2 daemon with following command
sudo service apache2 restart
Ceate folder “public_html” in the home directory, then set permission public_html folder to 0755
mkdir ~/public_html && chmod 0755 ~/public_html

[1] About per-user web directory
http://httpd.apache.org/docs/2.2/howto/public_html.html

[2] Three step enable
http://ubuntuserverguide.com/2012/10/how-to-enable-and-configure-apache2-userdir-module-in-ubuntu-server-12-04.html

No comments:

Post a Comment