Solved

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

Posted on 2004-04-19
6
1,179 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
  • 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
Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

 
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

Backup Your Microsoft Windows Server®

Backup all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Active directory user account audit 4 728
windows 2000 3 424
HeapQueryInformation could not be located 1 884
Migrating from IIS5 to IIS8.5 3 162
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…
Fine Tune your automatic Updates for Ubuntu / Debian
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.
Delivering innovative fully-managed cloud services for mission-critical applications requires expertise in multiple areas plus vision and commitment. Meet a few of the people behind the quality services of Concerto.

914 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

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now