Create multiple domains for the same hosting WAMP

To make that you have to edit three files  ( Note : this is for windows only ) :

  • hosts file and found under the following path ( C:\Windows\System32\drivers\etc )

put at the end the following line

127.0.0.1       The_name_of_host( domain.com)

  • httpd.conf and uncomment the following line 

# Virtual hosts
#Include conf/extra/httpd-vhosts.conf  ( this line )

  • Open the following file httpd-vhosts.conf ( C:\wamp\bin\apache\apache2.4.2\conf\extra ) and add the following lines at the end 

NameVirtualHost 127.0.0.1
<VirtualHost 127.0.0.1>
ServerName localhost
DocumentRoot “c:\wamp\www”
</VirtualHost>

<VirtualHost 127.0.0.1>
ServerName the_name_of_host
DocumentRoot “c:\wamp\www\the_path_to_host”
</VirtualHost>

and check the browser

Advertisements
Leave a comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: