Web Development Tips and Tricks

Web Development Tips and Tricks

Monday, April 11, 2011

How to create multiple domain on localhost

How to create multiple domain on wamp

There are two files involved:

- hosts (this file is in the C:\WINDOWS\system32\drivers\etc\hostes)
- httpd.conf (this is in your Apache install’s ‘conf’ folder – mine is c:\wamp\Apache2\conf\httpd.conf)

When you open the “hosts” file, you will see this line at the bottom:

127.0.0.1 localhost

All you do is make another entry underneath it for your self as you want:

127.0.0.1 name.sirname #Use whatever extension you want

and save the file.

Now open httpd.conf and copy, paste below code and save file

NameVirtualHost 127.0.0.1

ServerName localhost
DocumentRoot "C:wamp/www"


ServerName name.sirname
DocumentRoot "C:wamp/www/name"


now open browser and name.sirname in browser,index page of name folder will appear ...keep coding

for more educational videos and tips go on www.education.ziwwa.in
ziwwa solutions is a webdesiging company in delhi

No comments:

Post a Comment