How to make virtual host in wamp apache
Close your eyes for 2 minute then relex.
Step1: Open
C:/WINDOWS/system32/drivers/etc/hosts file in pspad
then it looks like
# 102.54.94.97 rhino.acme.com # source server
# 38.25.63.10 x.acme.com # x client host
127.0.0.1 localhost
now add this line
127.0.0.1 admin.com
now it look like this structure
# 102.54.94.97 rhino.acme.com # source server
# 38.25.63.10 x.acme.com # x client host
127.0.0.1 localhost
127.0.0.1 admin.com
and save it
Step2: open
F:/wamp/bin/apache/apache2.2.6/conf/httpd.conf
now go to the end of page and add your project like me(in my condition), I have added these lines
#Include “F:/wamp/www/admin/”
<VirtualHost 127.0.0.1>
ServerAdmin [email protected]
DocumentRoot F:/wamp/www/admin/
</VirtualHost>
so, it look like this:
<IfModule ssl_module>
SSLRandomSeed startup builtin
SSLRandomSeed connect builtin
</IfModule>
Include “F:/wamp/alias/*”
#Include “F:/wamp/www/admin/”
<VirtualHost 127.0.0.1>
ServerAdmin [email protected]
DocumentRoot F:/wamp/www/admin/
</VirtualHost>
congrates then restart your wamp server
and write in IE or any browser
http://admin.com
Work done