|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Website works with localhost but not with IP or hostname
I'm running IIS 5.1 under winxp and I'm having the following problem.When I access my website with http://localhost it works fine, but when I try http://<hostname> or http://<ip address> I get 'Cannot find server or DNS Error'. I've tried disabling the firewall and it makes no difference. Any advice would be greatly appreciated.
Thanks, Steve |
|
#2
|
|||
|
|||
|
sigh.. i am having exactly the same problem like you..
is there any one can help us?? thank you regars, yingjie |
|
#3
|
||||
|
||||
|
Have you tried adding the <hostname> to the file hosts under the windows/system32 folder?
|
|
#4
|
|||
|
|||
|
Do you have a router? If so, have you enabled port forwarding for http through your router? Are you sure you have checked every firewall including the XP firewall?
Open a command prompt and try ping <ip>. Do you get replies?
__________________
====== Doug G ====== I didn't attend the funeral, but I sent a nice letter saying I approved of it. --Mark Twain |
|
#5
|
|||
|
|||
|
> Do you have a router?
Yes, I do > If so, have you enabled port forwarding for http through your router? I'm not sure exactly what you mean. The router allows http traffic through to the LAN, as websites on other machines on the LAN work fine. My machine has a unique IP, not a local IP, so there's no need to forward the router's http port to my IP, right? The website is not available when I use http://<ip address> even on the local machine. Are the router settings relevant in this case? > Are you sure you have checked every firewall including the XP firewall? Yes > Open a command prompt and try ping <ip>. Do you get replies?[/QUOTE] Yes, I can succesfully ping my machine using either its IP or hostname Thanks, Steve |
|
#6
|
|||
|
|||
|
Maybe I'm jumping to conclusions. Are you trying to get to a web page served up by IIS on your own computer?
|
|
#7
|
|||
|
|||
|
> Are you trying to get to a web page served up by IIS on your own computer?
correct it works when i use http://localhost but not when i use http://<ip address> or http://<hostname> i've checked ipconfig to make sure that i'm using the correct ip and hostname and the machine can successfully ping itself thanks, steve |
|
#8
|
|||
|
|||
|
If you're on the one computer with IIS running, you should be able to open a web browser to
http://localhost http://<the local ip> http://<the computername> And get the same results in the browser. You didn't make any changes to the IIS default configuration, like changing your default website from all unassigned IP's to a single IP? |
|
#9
|
|||
|
|||
|
>If you're on the one computer with IIS running, you should be able to open a web browser to
> http://localhost > http://<the local ip> > http://<the computername> > And get the same results in the browser. by <the local ip>, do you mean the ip for 'loalhost' (ie 127.0.0.1) or the global ip for the local machine? > You didn't make any changes to the IIS default configuration, like changing your default website from all unassigned IP's to a single IP? With the website ip set to 'all unassigned ips' : http://localhost works http://127.0.0.1 works http://<global ip of local machine> fails http://<the computername> fails With the website ip set to <global ip>, nothing works Any ideas ?! Thanks again, Steve |
|
#10
|
|||
|
|||
|
Local IP is the IP given to your network interface card. ipconfig will tell you the IP. On a local LAN behind a router on DSL it might be something like 192.168.0.100
My computer, for example, is on a network off my dsl router, and the ip is 192.168.0.47. If i open IE on this compter, which is running IIS5.1, and enter http://localhost or http://192.168.0.47 or http://127.0.0.1 I get identical results back from IIS, the IIS documentation in my case. My MS computer name is VELOCIRAPTOR and if I enter http://velociraptor I also get the same results. If you are using an external IP address and you're behind a router, many routers will block access to the outside IP from within the LAN. If you're using a url as the computername, like mycomputer.mydomain.com that is not the same as the MS computername. |
|
#11
|
|||
|
|||
|
>If you are using an external IP address and you're behind a router, many routers will block access to the outside IP from within the LAN. If you're using a url as the computername, like mycomputer.mydomain.com that is not the same as the MS computername.
I am using an external ip address, so your advice about the router might be the problem - i'll look into it. But irrespective of this, when i try http://<ms computername> i get the same error. However, when i ping <ms computername>, the ip used is my external ip, so perhaps my web browser is also trying to use this ip address? Is there a way to confirm that i have the correct <ms computername>? thanks, steve |
|
#12
|
|||
|
|||
|
You can check your computer name from Control Panel - System, or open the properties of My Computer. Look at the computer name tab.
when I ping my computername ping shows my LAN ip, not my external IP to the rest of the world. |
|
#13
|
|||
|
|||
|
iis prob
Same prob is with me ..
I can view my local server on only self Pc .. but on the lan i am unable to see server on other node on the browser. all the network is running on the lan. Anshu/. |
|
#14
|
|||
|
|||
|
Did you read anything above? Most likely you have a firewall blocking http.
|
![]() |
| Viewing: ASP Free Forums > System Administration > Microsoft IIS > Website works with localhost but not with IP or hostname |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|