[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

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

Posted on 2004-04-19
6
Medium Priority
?
1,213 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 500 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
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.

 
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

Ask an Anonymous Question!

Don't feel intimidated by what you don't know. Ask your question anonymously. It's easy! Learn more and upgrade.

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…
While there are many new features for iOS 11, these are the five that can improve your digital lifestyle.
This course is ideal for IT System Administrators working with VMware vSphere and its associated products in their company infrastructure. This course teaches you how to install and maintain this virtualization technology to store data, prevent vuln…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…

656 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