Hosting multiple sites on one server
am 07.11.2007 20:58:02 von jeff
Hello, I am attempting to host 3 sites on 1 web server, however I can't
understand how a web browser will know which website to pull based on the
address that is entered. Also, I'd like to be able to have
http://www.company.com and http://company.com direct to the same site.
However right now http://company.com directs to a completely different site
on my web server. I'm sure it's relatively easy to clear this up but I need a
little help. I'm running IIS 6 on a 2003 server. Thanks!!
Re: Hosting multiple sites on one server
am 08.11.2007 05:02:41 von Ken Schaefer
Hi,
When a browser utilises the HTTP v1.1 specification, it sends a HTTP header
called "Host", with the name of the website that it wishes to access
IIS examines the incoming request and sees what the value for the Host:
header is, and if there is a matching entry in the IIS metabase, routes the
request to that website.
To accomplish what you want, edit the binding (in IIS Manager) for the
website in question and add the host header values "www.company.com" and
"company.com" for that website.
Cheers
Ken
"Jeff" wrote in message
news:C4375CE7-2F32-4BFA-A3D6-86F8B7219D75@microsoft.com...
> Hello, I am attempting to host 3 sites on 1 web server, however I can't
> understand how a web browser will know which website to pull based on the
> address that is entered. Also, I'd like to be able to have
> http://www.company.com and http://company.com direct to the same site.
> However right now http://company.com directs to a completely different
> site
> on my web server. I'm sure it's relatively easy to clear this up but I
> need a
> little help. I'm running IIS 6 on a 2003 server. Thanks!!
Re: Hosting multiple sites on one server
am 08.11.2007 07:12:31 von Kristofer Gafvert
Hi,
You can use host headers to do this. I have an article about it here:
"Using Host Headers to host multiple websites on IIS 6.0"
http://www.gafvert.info/iis/article/iis_multiple_websites.ht m
To understand host headers, i also recommend you to read:
"Understanding Host Headers in IIS"
http://www.gafvert.info/iis/article/understanding_host_heade rs.htm
--
Regards,
Kristofer Gafvert
http://www.gafvert.info/iis/ - IIS Related Info
Jeff wrote:
>Hello, I am attempting to host 3 sites on 1 web server, however I can't
>understand how a web browser will know which website to pull based on the
>address that is entered. Also, I'd like to be able to have
>http://www.company.com and http://company.com direct to the same site.
>However right now http://company.com directs to a completely different site
>on my web server. I'm sure it's relatively easy to clear this up but I
>need a
>little help. I'm running IIS 6 on a 2003 server. Thanks!!