DEV Community

JohnOdhiambo
JohnOdhiambo

Posted on

SET UP VIRTUAL ENVIRONMENT IN UBUNTU

cd /etc/apache2/sites-available/

sudo cp 000-default.conf salespro.conf

sudo vim salespro.conf

ServerAdmin webmaster@localhost
DocumentRoot /var/www/html/Salespro
ServerName servername_example

AllowOverride All

--Add the new servername_example to list of hosts
sudo vim /etc/hosts
For example, 127.0.0.1 servername_example

--Enable a new virtual host file
sudo a2ensite salespro.conf

--Restart the server
sudo systemctl restart apache2

Top comments (0)