hhochart29
5/3/2018 - 1:21 PM

how to create a Vhost on ubuntu

how to create a Vhost on ubuntu

Conf file

sudo nano /etc/apache2/sites-available/newproject.conf

<VirtualHost *:80> ServerName newproject.com ServerAlias newproject.com DocumentRoot "/var/www/html/nenufart" <Directory "/var/www/html/nenufart"> Options +Indexes +Includes +FollowSymLinks +MultiViews AllowOverride All Require local </Directory> </VirtualHost>

Hosts

sudo nano /etc/hosts

127.0.1.1 newproject.com

sudo a2ensite newproject.conf

sudo service apache2 restart