Solved

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

Posted on 2014-07-31
13
1,230 Views
Last Modified: 2014-07-31
Dear Experts,

I've just solved issue about xampp and IIS running on the same  computer
http://www.experts-exchange.com/Software/Server_Software/Web_Servers/Microsoft_IIS/Q_28487470.html

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 "127.0.0.1" 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

Duncan
0
Comment
Question by:duncanb7
  • 8
  • 5
13 Comments
 
LVL 11

Expert Comment

by:Joseph O'Loughlin
ID: 40231106
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.
0
 
LVL 13

Author Comment

by:duncanb7
ID: 40231111
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
0
 
LVL 13

Author Comment

by:duncanb7
ID: 40231113
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  ?

Duncan
0
What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

 
LVL 11

Expert Comment

by:Joseph O'Loughlin
ID: 40231123
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
http://www.walkernews.net/2008/11/07/how-to-configure-or-disable-google-chrome-proxy-server-settings-independently/

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 127.0.0.1
that somehow interfere

It may be possible to infer the service from the port numbers used
0
 
LVL 13

Author Comment

by:duncanb7
ID: 40231130
I found similar issue at this chrome site at
https://code.google.com/p/chromium/issues/detail?id=224215#c2

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

Please advise

Duncan
0
 
LVL 11

Expert Comment

by:Joseph O'Loughlin
ID: 40231137
What version of Chrome are you using?  It's unusual to be using an old version because of it's integrated update mechanisms.
0
 
LVL 13

Author Comment

by:duncanb7
ID: 40231146
Version 36.0.1985.125 m
0
 
LVL 11

Accepted Solution

by:
Joseph O'Loughlin earned 500 total points
ID: 40231168
It's not the problem you found, since fixed.
localhost is defined in
c:\windows\system32\drivers\etc\hosts
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?
0
 
LVL 13

Author Comment

by:duncanb7
ID: 40231177
I don't any proxy, all is auto connection

I quote or unquote
#      127.0.0.1       localhost
#      ::1             localhost

or      
127.0.0.1       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

Duncan

# 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: 
#
#      102.54.94.97     rhino.acme.com          # source server
#       38.25.63.10     x.acme.com              # x client host

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



#.10.2   google.com

Open in new window

0
 
LVL 13

Author Comment

by:duncanb7
ID: 40231184
but it is very interesting when type localhost? it  work and go to

localhost/? and show the pages but "localhost" still not working
0
 
LVL 13

Author Comment

by:duncanb7
ID: 40231195
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

127.0.0.1       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 127.0.0.1 ?

Please advise the final question if possible

DUncan
0
 
LVL 13

Author Closing Comment

by:duncanb7
ID: 40231197
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

Duncan
0
 
LVL 11

Expert Comment

by:Joseph O'Loughlin
ID: 40232603
Both the hosts file and DNS are used to translate human readable names like
www.purple.com
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
127.0.0.1    www.vendor.com
to the hosts file
and am happy about getting no response on a machine hosting iis rather than the placeholder page.
0

Featured Post

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

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

Lync server 2013 or Skype for business Backup Service Error ID 4049 – After File Share Migration
If you are a web developer, you would be aware of the <iframe> tag in HTML. The <iframe> stands for inline frame and is used to embed another document within the current HTML document. The embedded document could be even another website.
In this video, we discuss why the need for additional vertical screen space has become more important in recent years, namely, due to the transition in the marketplace of 4x3 computer screens to 16x9 and 16x10 screens (so-called widescreen format). …
This Micro Tutorial will give you a basic overview of Windows Live Photo Gallery and show you various editing filters and touches to photos you can apply. This will be demonstrated using Windows Live Photo Gallery on Windows 7 operating system.

770 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