Webmasters’ Blog @ sid.hedir.com

March 2, 2008

WAMP - MULTIPLE Websites in localhost - 1-2-3 Steps

Filed under: New, Web design — sid @ 8:55 am

It has been nicely explained in the following articles:

#1

#2

And in many other places. Worth reading and implementing the same.

Quick ToDO list:

Step:1

Open file, named as ‘hosts’ (found under c:\windows\system32\drivers\etc\ folder in WiinXP)

Add the line mentioned below at the end of that file.

127.0.0.1 client-website-name.local

Save & close that file.

Step: 2

Open httpd.conf (Either search for it, or click White WAMP icon at system tray -> Config File -> httpd.conf)

Search for the string: DocumentRoot

DocumentRoot “C:/wamp/www”

Add FOLLOWING LINES BELOW DocumentRoot “C:/wamp/www”.
NameVirtualHost 127.0.0.1

<VirtualHost 127.0.0.1>

ServerName localhost

DocumentRoot “C:/wamp/www”

</VirtualHost>
AND below that, add these lines:

<VirtualHost 127.0.0.1>

ServerName myclient.local

DocumentRoot “C:/wamp/www/folder-name”

</VirtualHost>

Now Save & Close httpd.conf

Step: 3

Restart WAMP

Open your web browser and type: http://myclient.local

It will display local copy of your client’s website.

No Comments »

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a comment

You must be logged in to post a comment.

Powered by WordPress

Please visit WP-Admin > Options > SPA and enter the key. Don't have a key? Signup here