Today I will show you how to install virtual hosts on Wamp server.
First open your hosts file, you can find it in this folder:
to edit it you need to have administrator permissions.
After this line:
add new one with name of your domain:
I prefer to use .local for my virtual domains to know is that virtual or real domain name.
Next step is to open httpd.conf file which is locate in:
find this line:
# Virtual hosts
# Include conf/extra/httpd-vhosts.conf
to enable httpd-vhosts.conf just remove # at the begin of the row. After this open httpd-vhosts.conf for edit.
<VirtualHost *:80> DocumentRoot "C:/wamp/www/test/www" ServerName test.local ServerAlias www.test.local <Directory "C:/wamp/www/test/www"> Options Indexes MultiViews FollowSymLinks AllowOverride All Order allow,deny Allow from 127.0.0.1 </Directory> </VirtualHost>
Restart your Wamp server and type in your browser test.local .