Forum Moderators: phranque

Message Too Old, No Replies

IE not interpreting IP address/host name correctly

         

dslc

10:55 pm on May 20, 2004 (gmt 0)

10+ Year Member



Hi, I've just set up an LAN at home. One computer is running Windows XP; the other is running Windows 2000. I have Apache installed on the XP computer, which I am running (or which I plan to run) as a private web server. The server uses the IP address 192.168.0.1; the client uses 192.168.0.2. I can ping one computer from the other no problem.

In the 'hosts' file (C:\Windows\System32\DRIVERS\etc\) on the XP computer, I have the following line inserted:

192.168.0.1myservername

In my 'httpd.conf' file (C:\Program Files\Apache Group\Apache2\conf\), I have the following inserted:

Listen 192.168.0.1:80

and, further down:

ServerName 192.168.0.1:80

I have kept htdocs as the root directory, and put my web files in there.

Now, here's the problem.
I can access the server on Mozilla, Netscape and Opera (using [192.168.0.1,...] [myservername...] or [computername)...] but not on IE (using [anything)....] It's the same on both the client and server; it works on the other browsers, but not IE.

Can anyone tell me what the cause of this problem might be? I could just use the other browsers, but IE is my usual browser. Plus, I'm about to install MySQL, and want to be sure this isn't symptomatic of a serious problem before I do so.

P.S. Please reply in simple terms. I'm completely new to Apache, and networking.

gergoe

11:58 pm on May 20, 2004 (gmt 0)

10+ Year Member



Usually the ServerName is only the hostname (or ipaddress) of the server without the port, this might have unexpected behavior, when the UseCanonicalName is turned on. Although I don't think that this is the reason why you can't reach your Apache, more likely it is related either to the settings of the Internet Explorer, or your to the Internet Settings (proxy settings for example). If you are sure that it is related to the Apache, then try to describe what is not working (you've got no reply, nothing is displayed, the name can not be resolved or what else).
Additional troubleshooting is to run the netstat command (from the command line) just after you try to load the page from your server in Internet Explorer, and in the output of the netstat command you should see a line like this:

TCP [i]your_ip[/i]:[i]any_port[/i] [i]ip_of_your_apache[/i]:80 [i]state[/i]

If you see this, then it means that the Internet Explorer reached your server successfully.
You may want to check the log files produced by the Apache, you'll find them in the APACHE_ROOT/logs directory; one for the errors and warnings (error.log) and one for standard access logging (access.log). Check your error log for any errors that might be related to this issue. You can check your access log also, to see that the request with the Internet Explorer was successful or not, and what was the status code of the response (if not 200 then might be that the Internet Explorer just didn't displayed it)

Good luck

dslc

3:32 pm on May 21, 2004 (gmt 0)

10+ Year Member



Thanks for taking the time to respond gergoe.

When I try to access the server in Internet Explorer, I get the usual 'This page cannot be displayed...etc.' message. This happens even with 'Show friendly HTTP error messages' disabled in Internet Options -> Advanced. At other times however, the browser just hangs - timer attached to the mouse cursor etc.

Immediately after trying to access the server in Internet Explorer, I get the following when I run netstat:

ProtoLocal AddressForeign AddressState
TCPcomputername:httpservername:4542TIME_WAIT
TCPcomputername:httpservername:4543TIME_WAIT
TCPcomputername:4554192.168.0.2:netbios-ssnTIME_WAIT

After accessing the server with the other browsers, it usually reads 'ESTABLISHED' in the 'State' column.

Also, I've checked the access logs. No entries are registered when I try to access the server on IE, while they are registered when I access the server on other browsers. Accessing the server on IE doesn't seem to affect the error log either.

I haven't changed any of the Internet settings - e.g. LAN/proxy settings - because I don't understand them to be honest.

P.S. UseCanonicalName was 'off'. When you mentioned it, I tried switching it to 'on', but it made no difference.

Thanks again

richlowe

4:00 pm on May 21, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



YOu might want to check the connection settings on internet explorer. Tools->Internet Options->Connections->LAN Settings. See if a use a proxy is checked. If so, uncheck it.

gergoe

6:11 pm on May 21, 2004 (gmt 0)

10+ Year Member



If the output of the netstat command is from the client machine, then it seems that the Internet Explorer tries to reach the machine via netbios (Windows Networking).
Did you used the http:// prefix? Or even better try the [192.168.0.1:80...] uri, that should point to the Apache on your server, no doubt.

dslc

6:23 pm on May 21, 2004 (gmt 0)

10+ Year Member



YOu might want to check the connection settings on internet explorer. Tools->Internet Options->Connections->LAN Settings. See if a use a proxy is checked. If so, uncheck it.

I did this richlowe, and it worked - nice one! Thanks very much.

gergoe, the output of the netstat command I quoted above was actually from the server machine - I forgot to mention that. I had included the "http://" prefix alright. Anyway, the problem is solved now, thanks to richlowe, and to yourself for helping me to zone in on the problem. Cheers!