Setting virtual host in apache2

Reviews and other little ventures that don't quite fit into the other forums
Post Reply
Daniel Wee
Site Admin
Posts: 2153
Joined: Wed 25 Feb 25 2009 8:00 pm

Setting virtual host in apache2

Post by Daniel Wee » Sat 05 May 05 2018 10:48 pm

A conf file need to be created and placed in:-

/etc/apache2/sites-available

Supposing the file is dash.conf, it would be:-

/etc/apache2/sites-available/dash.conf

You would enable the virtual host defined in dash.conf like this:-

sudo a2ensite dash
Daniel Wee
Site Admin
Posts: 2153
Joined: Wed 25 Feb 25 2009 8:00 pm

Re: Setting virtual host in apache2

Post by Daniel Wee » Wed 30 May 30 2018 10:25 pm

To allow user access to the /var/www directory, follow instructions here:-

https://ubuntuforums.org/showthread.php?t=919951

sudo chgrp -R www-data /var/www
sudo chmod -R 775 /var/www
sudo chmod -R g+s /var/www
sudo useradd -G www-data daniel

or

sudo usermod -a -G www-data daniel
Post Reply