localhost and localhost:80 not working on other document path on IIS window 7

Dear Experts,

I've just solved issue about xampp and IIS running on the same  computer

So far So good, when type "localhost" it will go to c:\inetpub\wwwroot\iisstart.htm
Now I change   'applicationHosts.config file to change the document default path from
c:\inetpub\wwwroot to c:\xampp\htdocs and I copy iisstart.htm to c:\xampp\htdocs

Okay, now I go to type "localhost" it will go my external sites server that is not show iisstart.htm page.

But when I type "localhost/iisstart.htm" which is exactly at c:\xampp\htdosc that is working,
iisstart.htm is shown, and other typing is also working

type "localhost/iisstart.htm" it is also working
type "localhost?" it is also working
type "" it is also working

but only both "localhost" and "localhost:80" not working

Now I go to check hosts file at c:\window\system32\drivers\etc\hosts in which there is nothing
information about host forwarding to the external site.

when type other file such as "localhost/data/php/index.html" that also works that is
matched to file at c:\xampp\htdocs\data\php\index.html

So the question, why it happen, who get the final right or owner for the name of "localhost" ?
localhost:8001 forwarding to my xampp web server   that works  as usual

I try to turn off xampp , it did NOT solve my issue

So I believe there is some conficit,  "localhost" can NOT resolve its final destination.

how to translate "localhost" to final IP on brwoser

Please advise

LVL 13
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Joseph OLoughlinIT Support SpecialistCommented:
I would expect this behaviour.
Originally web servers if only given a path would load index.html or index.htm from that folder.
When Microsoft offered Active Server Pages they added default,asp then default.aspx
however iisstart is a placeholder, not a default page for a folder, and is set by other internet information server configuration files.
http://localhost is just a link to the webserver's / folder.
duncanb7Author Commented:
please review my question becoz of new editing before your post sent

http://localhost is also NOT working

it is related to how browser interpret the localhost name

Please advise
duncanb7Author Commented:
After checking, it is NOT working for "localhost" on chrome only

both FF and IE is working with typing "localhost"

So it must be related to how chrome to decode "localhost"

How to fix this  ?

Cloud Class® Course: Ruby Fundamentals

This course will introduce you to Ruby, as well as teach you about classes, methods, variables, data structures, loops, enumerable methods, and finishing touches.

Joseph OLoughlinIT Support SpecialistCommented:
On my machine localhost in chrome works, so I suggest you contrast what proxy is set by running (Windows key+R) inetcpl.cpl, click on the connections tab, Lan Settings.
It takes a bit of work to get Chrome not to use the system proxy

I would be suspicious that one of your plugins into Chrome or a 3rd party system utility is providing services  via localhost
check at the command prompt using NETSTAT
looking for your hostname or
that somehow interfere

It may be possible to infer the service from the port numbers used
duncanb7Author Commented:
I found similar issue at this chrome site at

it seems it is related to how  chrome resolve localhost to from DNS

Please advise

Joseph OLoughlinIT Support SpecialistCommented:
What version of Chrome are you using?  It's unusual to be using an old version because of it's integrated update mechanisms.
duncanb7Author Commented:
Version 36.0.1985.125 m
Joseph OLoughlinIT Support SpecialistCommented:
It's not the problem you found, since fixed.
localhost is defined in
please review the content of that file.

What are your proxy settings?  Are they set to be configured automatically, as this mechanism can set other behaviours?

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
duncanb7Author Commented:
I don't any proxy, all is auto connection

I quote or unquote
#       localhost
#      ::1             localhost

or       localhost
::1             localhost

Both cases are not working after quite and restart chrome

 winlogo+k both keys can not go to any window or menu

Please advise


# Copyright (c) 1993-2009 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: 
#     rhino.acme.com          # source server
#     x.acme.com              # x client host

# localhost name resolution is handled within DNS itself.
#       localhost
#	::1             localhost

#.10.2   google.com

Open in new window

duncanb7Author Commented:
but it is very interesting when type localhost? it  work and go to

localhost/? and show the pages but "localhost" still not working
duncanb7Author Commented:
I disable and enable  setting of  "Bulit-in Asynchronous DNS" that is not solvign the issue

Since Chrome will use setting from IE from the link above mentioned, so I try to
reset  its default and clear up all browser data from IE and Chrome.

Now it works  and page from typing "localhost" is shown up. it is fixed.
So I agree with you that the new version browser should already fix the localhost issue, but
it has other issue, Anyway it is fixed even I don't know what is exact root cause.
Probably it is not related to proxy since IE and FF works before and after

Even I change the hosts with or without       localhost
::1             localhost

it also work . It seems two sentences in hosts file  is not reacted at all , Why ?
If that not react  ,how all browsers could resolve localhost to ?

Please advise the final question if possible

duncanb7Author Commented:
Thanks for your reply , as we know it is sometimes  hard to find the exact  root cause for browser issue

Anyway, if possible, please write about the hosts file quesiton in my last post if have time

Joseph OLoughlinIT Support SpecialistCommented:
Both the hosts file and DNS are used to translate human readable names like
into ip addresses that the computer and network can use.

Hosts files pre-dated dns.  The last time I used a unix system that relied purely on a hosts file was in 1988.

I am using an obsolete tool that uses the trident web browser engine internally but the vendor's site is down.  Rather than display erroneous information from that site, I added    www.vendor.com
to the hosts file
and am happy about getting no response on a machine hosting iis rather than the placeholder page.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft IIS Web Server

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.