Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Unable to load pages

Status
Not open for further replies.

iamregistered

Programmer
Oct 3, 2006
27
SE
Greetings all,

I am running a Apache 2.0 server on my own computer, with php 4 installed. The problem for me is that a day ago, the server refused to load my pages. The loading bar shows that it is loading, but nothing ever happens. The bar just continues to "load". It doesnt even timeout.
I'm atempting to connect through my dns, my local ip and localhost, but nothing is working. I have not made any changes to either PHP nor Apache. However, I've tried to change port, tried to stop and restart the server, tried to make a new index file. But I can't access anything from my server!

Any one know, or can guess, what the problem might be? I am not feeling for reinstalling my computer!

Thanks in advance,
/Martin

***
En solnedgång här
Med björkens dalande löv
Mörkret närmar sig
***
Sun setting far away
Tree leaves turn from green to gold
Cold nights approaching
***
 
Hi

No idea, just a few question. Can you look at static ( .htm ) documents ? Is the same problem with more browsers ? Is the same problem if you make the request with [tt]telnet[/tt] ? Does anything relevant appear in the Apache logs ?

Om which operating system is Apache running ?

Feherke.
 
I am running on windows XP SP2, and I can't access .htm files either. No files on my server can be accessd.
Furthermore, nothing shows up in the log fils. Nothing has been added since the day I no longer could access my webserver. :-(
About telenet, I'm not sure what that is.

***
En solnedgång här
Med björkens dalande löv
Mörkret närmar sig
***
Sun setting far away
Tree leaves turn from green to gold
Cold nights approaching
***
 
Hi

telnet is a basic TCP communication program. You can connect with it to the host machine's HTTP port, just like the web browser does, and communicate with Apache.

For example I have my web server on my computer. ( It is LighHTTPd, but does not matter now. )

1. Open a Command Prompt window

2. Type at the command prompt :
Code:
C:\> telnet localhost 80

3. Type in whether there is a visible cursor, or not ( note the two newlines after the line ) :
Code:
GET / HTTP/1.0

Then the server's response arrives. In my case is short, your may be longer, making the terminal window to scroll. I colored the distinct parts to ease commenting.
Code:
[red]HTTP/1.0 404 Not Found
Connection: close
Content-Type: text/html
Content-Length: 345
Date: Fri, 19 Jan 2007 17:32:57 GMT
Server: lighttpd/1.4.9[/red]

[green]<?xml version="1.0" encoding="iso-8859-1"?>
                                           <!DOCTYPE html PUBLIC "-//W3C//DTD XH
TML 1.0 Transitional//EN"
                                  "[URL unfurl="true"]http://www.w3.org/TR/xhtml1/DTD/xhtml1-transi[/URL]
tional.dtd">
            <html xmlns="[URL unfurl="true"]http://www.w3.org/1999/xhtml"[/URL] xml:lang="en" lang="en">

<head>
        <title>404 - Not Found</title>
                                       </head>
                                               <body>
                                                       <h1>404 - Not Found</h1>

</body>
       </html>[/green]


[blue]Connection to host lost.[/blue]
red - HTTP response header. Tells if or how your request was understood and will be fulfilled.
green - The response body, which will appear in the browser.
blue - The [tt]telnet[/tt] client's notification about the closed communication.

Try to communicate with your Apache like this, and tell us what happened.

Feherke.
 
I've tried to use "telnet localhost 80", at first it said that it couldn't establish connection. I tried to connect to my ftp-server, and it worked fine. I tried again to connect to my webserver, but all I recived was a blank screen. I checked the logs to see if anything new hade come up, but the last entry is dated the day when it stoped working. =/

I've got only one solution now, reinstall apache and see what happens then!

***
En solnedgång här
Med björkens dalande löv
Mörkret närmar sig
***
Sun setting far away
Tree leaves turn from green to gold
Cold nights approaching
***
 
This is so annoying.. i've reinstalled the server, switched back to default config, and still it's not working. And still no changes in the either access or error. Don't know what to do =/

***
En solnedgång här
Med björkens dalande löv
Mörkret närmar sig
***
Sun setting far away
Tree leaves turn from green to gold
Cold nights approaching
***
 
Hi

Currently I have no more idea. Are you sure that Apache is starting up correctly ? For example I had problem with LigHTTPd, because it was not able to open the HTTP port 80. The reason was simple : Skype started before it and opened the port 80.

Before starting Apache run this from the command prompt to see if anything else is listening/communicating on port 80. Theoretically.
Code:
[blue]C:\>[/blue] netstat -a | find ":80 "

Feherke.
 
I am not sure what the output should be, but it displays absolutly nothing for me. I even tried to do so with port 21, running my ftp-server, but that didn't display anything either!

And for all I know, apache is starting up as it should, since no error messages apear. I've tested to see if there is anything wrong with httpd.conf, but nothing there!

I recently tried to kill as many program as possible to see if some might interfer, but still nothing. I tried to kill some svchost.exe, but that resultet in a forced restart *haha*

***
En solnedgång här
Med björkens dalande löv
Mörkret närmar sig
***
Sun setting far away
Tree leaves turn from green to gold
Cold nights approaching
***
 
There has been a change in the error log now, but I have not a clue what it means!
Code:
[Fri Jan 19 20:18:43 2007] [notice] Parent: Received shutdown signal -- Shutting down the server.
[Fri Jan 19 20:18:43 2007] [notice] Child 1252: Exit event signaled. Child process is ending.
[Fri Jan 19 20:18:44 2007] [notice] Child 1252: Released the start mutex
[Fri Jan 19 20:18:45 2007] [notice] Child 1252: Waiting for 250 worker threads to exit.
[Fri Jan 19 20:18:45 2007] [notice] Child 1252: All worker threads have exited.
[Fri Jan 19 20:18:45 2007] [notice] Child 1252: Child process is exiting
[Fri Jan 19 20:18:45 2007] [notice] Parent: Child process exited successfully.
[Fri Jan 19 20:18:50 2007] [notice] Apache/2.0.59 (Win32) PHP/4.4.4 configured -- resuming normal operations
[Fri Jan 19 20:18:50 2007] [notice] Server built: Jul 27 2006 15:55:03
[Fri Jan 19 20:18:50 2007] [notice] Parent: Created child process 1452
[Fri Jan 19 20:18:50 2007] [notice] Child 1452: Child process is running
[Fri Jan 19 20:18:50 2007] [notice] Child 1452: Acquired the start mutex.
[Fri Jan 19 20:18:50 2007] [notice] Child 1452: Starting 250 worker threads.

***
En solnedgång här
Med björkens dalande löv
Mörkret närmar sig
***
Sun setting far away
Tree leaves turn from green to gold
Cold nights approaching
***
 
I have tried "netstat -a | find ":80", and this time it worked, the following is the output I recieved!

Code:
TCP    0.0.0.0:80             0.0.0.0:0              LISTENING
TCP    127.0.0.1:80           127.0.0.1:1579         CLOSE_WAIT
TCP    192.168.1.11:80        85.226.11.225:1062     CLOSE_WAIT
TCP    192.168.1.11:80        85.226.11.225:1066     CLOSE_WAIT
TCP    192.168.1.11:80        85.226.11.225:1400     CLOSE_WAIT

Does it make any sense to you, or anyone else?

***
En solnedgång här
Med björkens dalande löv
Mörkret närmar sig
***
Sun setting far away
Tree leaves turn from green to gold
Cold nights approaching
***
 
Hi

Those log messages talks about a stop and start operation of the server. It is correct.

Also the [tt]netstat[/tt] output is correct.

Somehow darker possibilities :
[ul]
[li]Maybe your Explorer is infected and it does not connect to a specific address.[/li]
[li]Maybe your machine is infected and some addresses are redirected by hosts file entries.[/li]
[/ul]
Note, that I wrote "your", but in a small internal network, like an office, some malwares can infect all machines in just minutes. :-(

The combinations when a virus is involved in the equation, are various. For example your machine is clean, the host where Apache runs is also clean, but a third computer is infected and the virus generates huge traffic to another machine or a router. This can have bad and strange side effects.

Of course, you would already observe such problems, but anyway, at this moment I would run some diagnostic tools against malwares.

Feherke.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top