Create new site on server

Login to FTP with chris user and go to /var/www
Create folders: sarah/public_html

Add alias for new website since you probably won’t have domain name yet

nano /etc/apache2/sites-available/000-default.conf
Alias /sarah /var/www/sarah/public_html

Save file

If you have domain name then do this

sudo cp /etc/apache2/sites-available/ /etc/apache2/sites-available/
nano /etc/apache2/sites-available/

Edit ServerName, ServerAlias, DocumentRoot, Directory

Enable new virtual host

sudo a2ensite

Deactivate any conf file you don’t want to use right now like this

sudo a2dissite

Leave a Reply

Your email address will not be published. Required fields are marked *