• Quick note - the problem with Youtube videos not embedding on the forum appears to have been fixed, thanks to ZiprHead. If you do still see problems let me know.

Two Webpages, One Server

LeCynthia

Thinker
Joined
Jan 30, 2006
Messages
143
I have a server that is sitting on a public IP that runs a web page. Is there a way to get another webpage on this server without having to piggy-back domain names?

This is what I currently do:

Webpage 1: www.webpage1.com
Webpage 2: www.webpage1.com/webpage2

What I would like:

Webpage 1: www.webpage1.com
Webpage 2: www.webpage2.com

I know I can use a port qualifyer like www.webpage2.com:5450 but I'd hate to do that, too. I'm just running Win2000 Server with IIS. I've been looking but can't find a simple way to do this with 1 public IP and 1 server. Basically both pages would point to the same IP, I just need a way for the server to resolve the correct name to the correct page.

Thanks.

ETA: I made up the links above for demo purposes but they go to real web pages so don't click.
 
Last edited:
http://lists.evolt.org/archive/Week-of-Mon-20030616/143194.html

In Apache, that's called a virtual host. In IIS, apparently it's a "web site".

But in IIS setting up a virtual host is the same as the first example above. It doesn't give me the option to have two seperate pages, only one page with a /page2 type breakdown. If I try to set up another web site in IIS then it says the second site conflicts with the first site so I can't start it (unless I use a non-standard port for http).
 
I know nothing of IIS. Hence the googled link. But in Apache, you can have as many domains as you like pointed at the same server, and it distinguishes between them based on the hostname in the URL. So for instance

www.randi.org and forums.randi.org resolve to the same IP address, but give you different pages. And the domains don't need to be related like that, either, they can be arbitrary.

ETA: see the fourth (non-quote) paragraph of the thing I linked to...
 
But in IIS setting up a virtual host is the same as the first example above. It doesn't give me the option to have two seperate pages, only one page with a /page2 type breakdown. If I try to set up another web site in IIS then it says the second site conflicts with the first site so I can't start it (unless I use a non-standard port for http).

You could try this:

From http://support.microsoft.com/kb/816576

You can configure a single Windows Server 2003-based computer to host multiple Web sites where each Web site is distinct and separate, with separate Web content and permissions. To create a virtual server, you map a new Web site to the content folder that you want. This Web content can be on the local computer or on a remote share. Virtual servers are defined by a combination of the following three parameters:

•The Internet Protocol (IP) address that is assigned to the Web site
•The Transmission Control Protocol (TCP) port number that is assigned to the Web site
•The host header name that is assigned to the Web site

As long as one parameter is unique to each virtual server, they can run at the same time in IIS.

For example, you can have multiple Web sites that are all mapped to the same IP address and that all use the default TCP port 80 as long as you assign a unique host header name to each virtual server.
 
Okay, bear with me. When it asks to put in a host header, do I put in the whole name? So, if I have www.webpage1.com then in the host header do I put in www.webpage1.com or webpage1.com or just webpage1? No http or anything. I'm talking about going to IIS, right-clicking on the website>properties>advanced>multiple web site configuration>add. It asks for the IP address and port and host header name. I'm assuming since I only have one NIC that the IP and port will be the same for each page I want to set up.

I guess I got confused because if you right-click on the website and go to properties there is a tab for HTTP Headers. Do I do anything with that or is that something different?

I'm trying some of these things but since I have to wait for DNS entries to trickle down I'm not sure if it's not working because I'm trying too soon or if it's configured wrong.
 
Again, I know nothing of IIS... but having said that, it is almost certainly meant to be the entire host part of the URL. So www.webpage1.com
 
Okay, bear with me. When it asks to put in a host header, do I put in the whole name? So, if I have www.webpage1.com then in the host header do I put in www.webpage1.com or webpage1.com or just webpage1? No http or anything. I'm talking about going to IIS, right-clicking on the website>properties>advanced>multiple web site configuration>add. It asks for the IP address and port and host header name. I'm assuming since I only have one NIC that the IP and port will be the same for each page I want to set up.

I guess I got confused because if you right-click on the website and go to properties there is a tab for HTTP Headers. Do I do anything with that or is that something different?

I'm trying some of these things but since I have to wait for DNS entries to trickle down I'm not sure if it's not working because I'm trying too soon or if it's configured wrong.

Use www.webpage1.com for the Host Header for website1 and www.webpage2.com for website2. Use the same ip address and port for both.

It's also recommended that you don't change the default website. Create 2 additional websites.

Do not assign a host header name to the default Web site. Many programs expect the default Web site to use an IP address of (All Unassigned), TCP Port 80, and no host header name.

You don't need to touch the HTTP Headers.

You can test this before your DNS entries trickle down by adding www.website1.com and www.website2.com to your local hosts file.
 
Wow, that seems to be working. Thanks for helping a newbie who needs everything spelled out!! You guys are great!
 

Back
Top Bottom