Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Running 2 websites on 1 IP address

Status
Not open for further replies.

Jayson

Programmer
Jan 31, 2001
75
US
Could anyone please help me,

I'm running Windows 2000 Professional and Server on my network. I currently have 2 websites which i would like to host, but my fast internet connection has only 1 IP address. Is it possible to route say website1 to computer1 while host re-route website2 to computer2?
 
Yes. You need to use host headers. On the first tab of the properties page for your site in the Internet Services Admin tool, you should have a button called 'Advanced'. Click it, and you can now configure host headers. Type in the exact URL that someone would type to get to that particular site. For example, you might enter for one site using the address 192.168.39.4 and for another site (by getting properties on the other site you've set up) using the same address. When new web connections come in, the URL is checked against the host-header database and routed accordingly to different content directories. Leave the port set to 80. This should take care of you. DNS can hand out the same address for both Fully Qualified Domain Names.
 
Actually, I just realized that you are trying to redirect one site to another server. You can do this, once you've set up host headers, by going to the Home Directory tab and setting the site to be loaded from a share on another computer. You won't need to be running a web server on the other computer, since the one server you have will be serving out the 2nd system's content.
 
Thanks!

I tried it but it didn't work. I'm sorry, but i forgot to mention that my main server is running windows 2000 professional, i don't know if it matters. I tried assigning the IP address assign to me by my internet provider to both sites, using both port 80, but different header names, my 2 sites are contain in 2 separate directories, under c:\inetpub\ somehow i need one host header to point to one folder while the other host header to the other folder. How does IIS know which host header points to which folder (i.e. website)?

Thanks for your patients!
 
oh btw, i'm using DHCP for my client terminals?

Another thing is, i will be trying to setup my web server (containing 2 distinct websites - different domain names), mail server, ftp server, on a single computer within my home network. is that possible? So what i'm guessing is that, my main server will simply re-route all types of request (i.e web, ftp, mail) to a computer within network. Is that possible?

Basically my objective is to free up the main server of all web, mail, ftp processing, plus limiting potential hackers' access to a single terminal within my network. Am i doing it right? or is there a safer and more secure way to do this?

Thanks for any suggestion that you might give.
 
For each site that you are running on that server (even if the files aren't on that server) you need to create a new site in the Internet Services Administrator interface. Then for each site, you configure a different hostheader and a different source directory for the files.

You should know though, that eventhough the files exist elsewhere, all the processing of the .html and .asp files will be done on the web server itself, so unless you are short of HD space, I'd just keep everything local in different directories. On the other hand, if you are trying to make this server a firewall/bastion host, you shouldn't be running services on it at all, but instead forwarding ports to the inside, where the services will actually be running. For a home network, I wouldn't worry about doing this, as long as you have some sort of packet filter running on your ftp/mail/web server and have done some basic security scans to catch all the major security holes on your system.

I haven't done this with W2KPro, but I don't know why it should be any different there.
 
ShackDaddy.
Thanks for the information bro.

Regarding: "I haven't done this with W2KPro, but I don't know why it should be any different there."

Win2k is limited to one website by default. I am looking for a way to get two or more websites on Win2k.

If anyone else figures out a way to do this.. I would greatly appreciate the input. (looking in the registry for something right now.. hehe)

Thanks
DAve
 
Just a thought why not ghost the other website in the first site so the server is only seeing the one but using a sub address
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top