Solved

IIS problem: http://localhost works but http://servername does not.

Posted on 2004-04-19
6
1,190 Views
Last Modified: 2007-12-19
Hello experts,

I have a problem with one of my servers. When I try to access the IIS by typing "http://servername" or "http://IP Address" I get a 403 error, and when I try to access using "http://localhost" it works fine. The server was previously working like a charm. I have a third party app running on a virtual directory and when I try to access that from the outside I get a 404 error.

I have tried all the tricks I know but no luck... Please help!

jangeador
0
Comment
Question by:jangeador
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
6 Comments
 
LVL 16

Expert Comment

by:JamesDS
ID: 10866198
jangeador
It sounds like your problem is host headers.

When you only have one site on a server typing "http://servername" or "http://IP Address" should get you the one site. When you have more than one site it doesn't know where to send you so you get the error.

Try adding a host header entry into your site in the porpoerties dilog of the site.

Cheers

JamesDS
0
 
LVL 8

Accepted Solution

by:
qfren earned 125 total points
ID: 10866309
Hi:

i am not sure but try..

go to Start->Search
Type " hosts"...

u will find a file call "hosts" which when u double click and use notepage to read:
The file is similiar look like below:



=======

# Copyright (c) 1993-1999 Microsoft Corp.
#
# This is a sample HOSTS file used by Microsoft TCP/IP for Windows.
#
# This file contains the mappings of IP addresses to host names. Each
# entry should be kept on an individual line. The IP address should
# be placed in the first column followed by the corresponding host name.
# The IP address and the host name should be separated by at least one
# space.
#
# Additionally, comments (such as these) may be inserted on individual
# lines or following the machine name denoted by a '#' symbol.
#
# For example:
#
#      102.54.94.97     rhino.acme.com          # source server
#       38.25.63.10     x.acme.com              # x client host

127.0.0.1       localhost


==========


NOTE: u have to BACKUP this file first ....
then
add a line below 127.0.0.1 localhost as following...

127.0.0.1       localhost
127.0.0.1       servername

then save,(not sure if it need to restart)and try .....


mc
0
 
LVL 1

Author Comment

by:jangeador
ID: 10869697
OK, guys thank you for your quick responses. I found the problem.

Apparently, someone else created a second site on the server, and this site was taking over the default. I stopped the other site, and now things are running good!

I will split the points for I see that both of you offered the same solution.

Thanks.

jangeador
0
Three Reasons Why Backup is Strategic

Backup is strategic to your business because your data is strategic to your business. Without backup, your business will fail. This white paper explains why it is vital for you to design and immediately execute a backup strategy to protect 100 percent of your data.

 
LVL 16

Expert Comment

by:JamesDS
ID: 10869882
jangeador
Host headers is not the same as hosts file

Host headers is configured at the IIS manager
Hosts file is a text file completely unrelated to IIS and stored in ..\system32\drivers\etc

You should not confuse the two as others using this question for reference later will not get the correct answer.

Regardless of this you did not split the points as stated.

Cheers

JamesDS
0
 
LVL 1

Author Comment

by:jangeador
ID: 10871242
I apologize if I did not split the points, this new interface is very new to me, and I am not sure how to do stuff quite as well as with the old interface. The answers provided were not the solution to my problem, I awarded the points in the interest of keeping EE as clean as possible. If you know a way for me to change the answer and to split the points please let me know.

And again thanks for clarifying the difference between the answers.

jangeador
0
 
LVL 16

Expert Comment

by:JamesDS
ID: 10872469
jangeador
No problem you can do this in community support - just post a new question requesting help to change the points and a link to this one.

As you to your problem - Host headers IS the solution. Without a host header a server running more than one website wll not which site to send the requests to. What you did was stop the second site which took away the need for a host header for each site.

Cheers

JamesDS
0

Featured Post

U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

Question has a verified solution.

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

NTFS file system has been developed by Microsoft that is widely used by Windows NT operating system and its advanced versions. It is the mostly used over FAT file system as it provides superior features like reliability, security, storage, efficienc…
Always backup Domain, SYSVOL etc.using processes according to Microsoft Best Practices. This is meant as a disaster recovery process for small environments that did not implement backup processes and did not run a secondary domain controller that ne…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…

730 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