I\'m running windows 7 and recently installed XAMPP to build a dev environment. I\'m not great with the server side of things so I\'m having some problems setting up an alia
Apache 2.4 virtual hosts hack
1.In http.conf specify the ports , below “Listen”
Listen 80
Listen 4000
Listen 7000
Listen 9000
In httpd-vhosts.conf
ServerAdmin webmaster@dummy-host2.example.com
DocumentRoot "C:/Users/Vikas/Documents/NetBeansProjects/slider_website_hitesh/public_html"
ServerName hitesh_web.dev
ErrorLog "logs/dummy-host2.example.com-error.log"
CustomLog "logs/dummy-host2.example.com-access.log" common
Allow from all
Require all granted
ServerAdmin webmaster@dummy-host2.example.com
DocumentRoot "E:/dabkick_git/DabKickWebsite"
ServerName www.my_mobile.dev
ErrorLog "logs/dummy-host2.example.com-error.log"
CustomLog "logs/dummy-host2.example.com-access.log" common
Allow from all
Require all granted
In hosts.ics file of windows os “C:\Windows\System32\drivers\etc\host.ics”
127.0.0.1 localhost
127.0.0.1 hitesh_web.dev
127.0.0.1 www.my_mobile.dev
127.0.0.1 demo.multisite.dev
4.now type your “domain names” in the browser it will ping the particular folder specified in the documentRoot path
5.if you want to access those files in a particular port then replace 80 in httpd-vhosts.conf with port numbers like below and restart apache
ServerAdmin webmaster@dummy-host2.example.com
DocumentRoot "C:/Users/Vikas/Documents/NetBeansProjects/slider_website_hitesh/public_html"
ServerName hitesh_web.dev
ErrorLog "logs/dummy-host2.example.com-error.log"
CustomLog "logs/dummy-host2.example.com-access.log" common
Allow from all
Require all granted
ServerAdmin webmaster@dummy-host2.example.com
DocumentRoot "E:/dabkick_git/DabKickWebsite"
ServerName www.dabkick_mobile.dev
ErrorLog "logs/dummy-host2.example.com-error.log"
CustomLog "logs/dummy-host2.example.com-access.log" common
Allow from all
Require all granted
Note: for port number given virtual hosts you have to ping in browser like “http://hitesh_web.dev:4000/” or “http://www.dabkick_mobile.dev:7000/”
6.After doing all those changes you have to save the files and restart apache respectively.