How to run 2 different websites on a single computer

Need help installing PHP, configuring a script, or configuring a server? Then come on in and post your questions! We'll try to help the best we can!

Moderator: General Moderators

Post Reply
prince09
Forum Newbie
Posts: 7
Joined: Fri Sep 02, 2005 12:24 pm

How to run 2 different websites on a single computer

Post by prince09 »

Hi to all,

I want to run 2 websites on the same machine. One is live version and one is that on which I make modification and upload later. I am using PHP, IIS and My SQL on windows 2K3.

I am little confused about is there any way to set up the new virtual dir on IIS and run my experimented webiste there? In IIS manager I make a new website on port 800, as port 80 is already occupied by first site. And then I try to run http://localhost:800/login.php. But nothing is opening.

Please tell me how to solve this problem?

Thanks and regards,
Prince.
timvw
DevNet Master
Posts: 4897
Joined: Mon Jan 19, 2004 11:11 pm
Location: Leuven, Belgium

Post by timvw »

I only know how to do it for apache.. But search your webserver documentation for virtual hosts..
wwwales
Forum Newbie
Posts: 2
Joined: Mon Oct 31, 2005 1:23 pm

Multiple Web Sites

Post by wwwales »

Hi,
This is off the top of my head but it's basically done like this:

1. In IIS stop all web sites
2. Open the properties for each one and select the IP address you want it to respond to (or leave it as unassigned)
3. Make sure it is set to respond on port 80
4. Click the Advanced button
5. You should now see a window where it allows you to add host headers
6. Click Add
7. Select the IP address to respond on (or leave it unassigned), leave the port as 80 and enter the host header you want it to respond to.

Note: the host header is the url that will be used to access the site e.g. http://www.iwsec.co.uk

Once you have configured all the sites you can restart them. One thing to watch out for is don't restart the default website unless you have configured it using the steps above otherwise it will fail.

Cheers
wwwales
Vulnerability Scans
Post Reply