1.Open
C:\wamp\bin\apache\Apache2.2.21\conf\httpd.conf
2.Uncomment this line
# Include conf/extra/httpd-vhosts.conf
to this
Include conf/extra/httpd-vhosts.conf
3.Open
C:\wamp\bin\apache\Apache2.2.21\conf\extra\httpd-vhosts.conf
add at bottom
ServerAdmin
DocumentRoot "c:/wamp/www"
ServerName localhost
ErrorLog "logs/error.log"
CustomLog "logs/access.log" common
ServerAdmin
DocumentRoot "c:/wamp/www/web1"
ServerName web1
ErrorLog "logs/dummy-host.example.com-error.log"
CustomLog "logs/dummy-host.example.com-access.log" common
ServerAdmin
DocumentRoot "c:/wamp/www/web2"
ServerName web2
ErrorLog "logs/dummy-host2.example.com-error.log"
CustomLog "logs/dummy-host2.example.com-access.log" common
4.Create web1, web2 folder under c:/wamp/www
Inside Folder web1 create index.html
Input this code
asdf
Inside Folder web2 create index.html
Input this code
asdf 2
5.Edit C:\Windows\System32\drivers\etc\hosts
Add at bottom
127.0.0.1 web1
127.0.0.1 web2
5.Restart wamp by right click Wamp and Restart All Services
6.Visit http://web1 and http://web2 on your browser
Other References
http://speedydan.co.uk/tutorials/set-multiple-virtual-hosts-wamp/
Leave a Reply