[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

IIS 6 - Hosting Multiple Sites On Same Port - Using Host Header Values

Posted on 2011-05-12
8
Medium Priority
?
629 Views
Last Modified: 2012-06-21
I am wanting to host an ASP.NET intranet site on our local office server.  I have installed IIS and it is running and I have managed to get 1 site working as it should.  The issue came when I added a 2nd site where I couldn't start the other site as it was using the same port.  I found the solution to allow the 2nd site on the same IP by adding in "Host header values" for both sites.  This has allowed me to get both sites "Running" in IIS but I can no longer navigate to the original site.  I had created a Virtual directory "YWE" that allowed me to navigate to the site via http://111.111.1111/YWE.  Since adding in the host header values I can no longer navigate to the site as above.  During my reading I didn't come across any information as to what values would be appropriate in the host header values or how to navigate to the sites afterwards... I have tried navigating to the header value instead of the virtual directory name with no luck.  

Thanks in advance for the the help,
Greg
0
Comment
Question by:Greg_L_WER
  • 4
  • 4
8 Comments
 
LVL 29

Expert Comment

by:Paul Jackson
ID: 35750054
You need to set up a dns alias for each hostheader value pointing to the ip address.
0
 
LVL 29

Expert Comment

by:Paul Jackson
ID: 35750064
0
 

Author Comment

by:Greg_L_WER
ID: 35750526
Thanks for the info... couple of additional questions.  As fas as DNS alias's... this is a local server that does have a domain on it but my IIS Sites are not part of that domain so how do I add in a DNS alias for them?  I read the article you mentioned and it talks about the HOSTS file.  I edited this file (on the server) to:

127.0.0.1     localhost
192.168.1.250 SQLData.com
192.168.1.250 YWE.com

I have 3 IIS web sites... these 2 and a default one that has no host header value as the article suggested.  If I try to access one of these sites when the default site is running I get:

HTTP Error 404 - File or directory not found.  Internet Information Services (IIS)

and if I stop the default site I get:  

The webpage cannot be found


Have I missed something?  Without the host name header the site will run aok.

Thanks,
Greg
0
Prepare for your VMware VCP6-DCV exam.

Josh Coen and Jason Langer have prepared the latest edition of VCP study guide. Both authors have been working in the IT field for more than a decade, and both hold VMware certifications. This 163-page guide covers all 10 of the exam blueprint sections.

 
LVL 29

Expert Comment

by:Paul Jackson
ID: 35750610
It sounds like it is still directing you to the default site.

Remember with host headers you no longer specify the ip address in the url so instead of browsing to : http://192.168.1.250/ywe.com you would just browse to http://ywe.com

If you are going to do this with host files I believe that you would have to update the hosts file on the clients.

If the clients are on the domain and your domain has dns installed on a dc you can create the alias entries in the domain dns as the clients will have access to it otherwise you have to have a hosts file updated on all the clients.
0
 

Author Comment

by:Greg_L_WER
ID: 35750836
That makes more sense.  The http://ywe.com does work on the actual server but not on a connected PC.  I looked into the DNS (Not overly familiar with it) and I see forward and reverse lookup sections but I was not able to create an alias entry to the web site.  My sites are not located within the "C:\Inetpub\wwwroot" folder which might have something to do with it.  I will have to do some more research on DNS aliasing to get past this last hurdle.... any articles you would suggest?
0
 
LVL 29

Expert Comment

by:Paul Jackson
ID: 35750894
You only need to add the alias to the forward lookup zone.
Doesn't matter that the site are not located in c:\inetpub\wwroot folder


Should just be a case of going into dns, right clicking the forward lookup zone, select new alias, enter the hostheader name in the alias box, in the FQDN for target host, type IISServerName.mydomain.com.

Actually you will also need to create an A record for your IIS Server as it is not part of the domain.

http://support.microsoft.com/kb/168322

0
 

Accepted Solution

by:
Greg_L_WER earned 0 total points
ID: 37259914
Looks like the system is forcing me to close this question before I ask a new one... unfortunately none of the earlier suggestions seemed to solve the problem... for now I chose to solve the issue by only hosting 1 site on this server... if and when I have a need to host a second I will have to revisit this issue.  Thanks to everyone for the help nonetheless.
0
 

Author Closing Comment

by:Greg_L_WER
ID: 37277774
Unfortunately it hasn't been resolved but a new questions doesn's appear to be allowed until this one is closed off ;(
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Debug Tools to analyse IIS process: This article focus on taking memory dumps from IIS to determine which code is taking more time and to analyse which calls hangs/causes more CPU usage. To take dumps,download the following. Install1: To st…
Lease-to-own eliminates the expenditure of hardware replacement and allows you to pay off the server over time. Usually, this is much cheaper than leasing servers. Think of lease-to-own as credit without interest.
Please read the paragraph below before following the instructions in the video — there are important caveats in the paragraph that I did not mention in the video. If your PaperPort 12 or PaperPort 14 is failing to start, or crashing, or hanging, …
Look below the covers at a subform control , and the form that is inside it. Explore properties and see how easy it is to aggregate, get statistics, and synchronize results for your data. A Microsoft Access subform is used to show relevant calcul…
Suggested Courses
Course of the Month17 days, 21 hours left to enroll

830 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question