Friday, June 18, 2010

Work locally with IIS and virtual hosts on windows

Here it shows how you can easily create virtual hosts on a windows machine to run multiple sites simultaneous each one having its own domain

Prerequisites : IIS Server for Windows

Steps:
1)Need to add instance in hosts file resides in C:\WINDOWS\system32\drivers\etc path. Add instance 127.0.0.1 mytestsite.local in host file.

2)Then need to start your server like ruby script/server -p 3000

3)Now run site using URL mytestsite.local:3000

Thus newly created instance can execute on custom url.

You can add multiple instance also.
e.g 127.0.0.1 mytestsite.local
      127.0.0.1 new.mytestsite.local

No comments:

Post a Comment