Category: General
Ubuntu 14.04 vhost setup
New vhost for example.com
Make a folder for the domain:
/var/www/html/example.com
Create the vhost file:
vi /etc/apache2/sites-available/example.com.conf
Enter following code into the configuration file
ServerAdmin admin@example.com ServerName example.com ServerAlias www.example.com DocumentRoot /var/www/example.com ErrorLog ${APACHE_LOG_DIR}/error.log CustomLog ${APACHE_LOG_DIR}/access.log combined
Enable the vhost:
a2ensite example.com.conf
Restart Apache:
service apache2 restart