Create Virtual Host – Linux

Visit my web: www.duncan-computer.com or www.gratuitis.net
My environment: Lampp / Linux Mint – Rebecca

Only 4 steps:

Remember use nano or gedit
1. Open the httpd.conf file, type
sudo gedit /opt/lampp/etc/httpd.conf

uncomment the line

# Virtual hosts
#Include etc/extra/httpd-vhosts.conf [this line]

2. Open the file httpd-vhosts.com
sudo gedit /opt/lampp/etc/extra/httpd-vhosts.conf

use the vhost example script as the video
VirtualHost *:80
DocumentRoot “/opt/lampp/htdocs/aplication”
ServerName aplication.ad
ServerAlias www.aplication.ad
/ VirtualHost

3. Open the hosts file
sudo nano /etc/hosts

and add: 127.0.0.1 www.aplication.ad

4. restart lampp

sudo /opt/lampp/lampp/ start
or
sudo /opt/lampp/lampp/ restart

Thats all.
Video Rating: / 5

0 comments… add one

Leave a Comment