Install virtual hosts on Wamp

  • SumoMe

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: localhost
add new one with name of your domain: test.local
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.
Add this:

<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

Restart your Wamp server and type in your browser test.local .

Leave a Reply