Solved

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

Posted on 2014-07-31
13
1,102 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
Comment Utility
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
Comment Utility
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
Comment Utility
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
 
LVL 11

Expert Comment

by:Joseph O'Loughlin
Comment Utility
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
Comment Utility
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
Comment Utility
What version of Chrome are you using?  It's unusual to be using an old version because of it's integrated update mechanisms.
0
Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

 
LVL 13

Author Comment

by:duncanb7
Comment Utility
Version 36.0.1985.125 m
0
 
LVL 11

Accepted Solution

by:
Joseph O'Loughlin earned 500 total points
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

I recently purchased an HP EliteBook 2540p notebook/laptop. It has two video ports on it – VGA and DisplayPort. HP offers an optional docking station for the 2540p that also has both a VGA port and a DisplayPort. There are numerous online reports do…
If you don't have the right permissions set for your WordPress location in IIS, you won't be able to perform automatic updates. Here's how to fix the problem.
This Micro Tutorial will give you basic overview of the control panel section on Windows 7. It will depth in Network and Internet, Hardware and Sound, etc. This will be demonstrated using Windows 7 operating system.
The viewer will learn how to successfully create a multiboot device using the SARDU utility on Windows 7. Start the SARDU utility: Change the image directory to wherever you store your ISOs, this will prevent you from having 2 copies of an ISO wit…

744 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

18 Experts available now in Live!

Get 1:1 Help Now