Author |
|
krippen
Joined: 06 Feb 2007 Posts: 6
|
Posted: Tue 06 Feb '07 0:27 Post subject: apache for localhost |
|
|
i've installed apache 2.2.4 and made the following changes to httpd.conf:
ServerAdmin admin@localhost
ServerName localhost:80
when i try http://localhost in my browser (firefox), it freezes at "waiting for localhost..." and then times out. my firewall is off and i don't think i need to make any changes to my router configuration. i have no idea why it won't work and i can't find a relevant thread (because everyone seems to have already surpassed this pathetic milestone).
also, do i have to make any changes to the httpd.conf file in conf\default?
please help. |
|
Back to top |
|
James Blond Moderator
Joined: 19 Jan 2006 Posts: 7371 Location: Germany, Next to Hamburg
|
Posted: Tue 06 Feb '07 10:53 Post subject: |
|
|
Search for listen if there is listen 8080 change it to listen 80 |
|
Back to top |
|
krippen
Joined: 06 Feb 2007 Posts: 6
|
Posted: Tue 06 Feb '07 21:36 Post subject: |
|
|
Listen 80 is already set... i am running remote desktop to launch my browser on the apache enabled pc. would that make any difference? |
|
Back to top |
|
pnllan
Joined: 05 Dec 2005 Posts: 221
|
Posted: Tue 06 Feb '07 23:06 Post subject: |
|
|
If you are connected to a Remote PC via Remote Desktop, then you cannot access YOUR HTTP via localhost as that will be the localhost on the Remote PC. You will have to connect via your assigned IP from your ISP. You can find out your currently assigned IP by clicking this link: http://www.ipchicken.com/
Other Considerations:
Typically, when you get an error from your browser stating that the page cannot be found, it is because the domain name is not being resolved (yes, even localhost is a domain name - for your local network). All that to say this is a DNS issue.
I suspect that you are using a broadband router, and broadband routers will handle localhost usually in two ways. First, it will route your local network as if there is no router - that is to say, it understands what you want when you ask for localhost. The second, well, they actually work the way most business class routers work - that is, they expect that you will take care of DNS itself including your local network or localhost.
Assuming you are using Windows XP, you should try editing your HOST file in C:\WINDOWS\system32\drivers\etc such that it looks something like below:
Code: | 127.0.0.1 localhost
192.168.2.2 your.domain.com |
Also, some routers will require you to open Port 80 (i.e. - Port Forward or Pinhole to the IP address that you HTTP server is running). |
|
Back to top |
|
krippen
Joined: 06 Feb 2007 Posts: 6
|
Posted: Tue 06 Feb '07 23:21 Post subject: |
|
|
basically i have this computer (IP 192.168.1.256) which i am using to access another computer (IP 192.168.1.132) which has apache installed on it. they are connected via a gateway router. all work done on .132 is via remote desktop from .256. i run firefox on .132 via .256 going to http://localhost which connects, but doesn't give me anything, just hangs at waiting...
my hosts file by default has 127.0.0.1 localhost. are you saying i should change that to 192.168.1.132 localhost? or create a random domain name like test.com assigned to it? |
|
Back to top |
|
pnllan
Joined: 05 Dec 2005 Posts: 221
|
Posted: Tue 06 Feb '07 23:37 Post subject: |
|
|
Why not go to your 132 PC and check:
http://localhost
Does localhsot time-out on the 132 PC? If not, then try accessing via 256 by:
http://192.168.1.132
Can you reach the HTTP?
Your host file is Ok. However, if you ever setup an Internet domain, you might have to add an entry for it in the Host file only so that you can browse it locally. |
|
Back to top |
|
krippen
Joined: 06 Feb 2007 Posts: 6
|
Posted: Tue 06 Feb '07 23:48 Post subject: |
|
|
right now i'm trying to get basic functionality before trying to deal with domains.
with the following settings:
Listen 80
ServerAdmin admin@localhost
ServerName localhost:80
running http://localhost from .132 through remote connection hangs. i get the same thing trying http://192.168.1.132 from .256
i read apache docs and it says it should all work by default... |
|
Back to top |
|
VoodooMill
Joined: 11 Jan 2007 Posts: 60
|
Posted: Thu 08 Feb '07 20:52 Post subject: |
|
|
Try:
ServerName localhost
rather than
ServerName localhost:80 |
|
Back to top |
|
krippen
Joined: 06 Feb 2007 Posts: 6
|
Posted: Fri 09 Feb '07 8:44 Post subject: |
|
|
thanks, but unfortunately it still times out on "Waiting for localhost...". |
|
Back to top |
|
James Blond Moderator
Joined: 19 Jan 2006 Posts: 7371 Location: Germany, Next to Hamburg
|
Posted: Fri 09 Feb '07 11:20 Post subject: |
|
|
What is in your error log? Please post |
|
Back to top |
|
krippen
Joined: 06 Feb 2007 Posts: 6
|
Posted: Fri 09 Feb '07 20:10 Post subject: |
|
|
here's part of it
Code: | [Fri Feb 09 07:40:28 2007] [notice] Apache/2.2.4 (Win32) configured -- resuming normal operations
[Fri Feb 09 07:40:28 2007] [notice] Server built: Jan 9 2007 23:17:20
[Fri Feb 09 07:40:28 2007] [notice] Parent: Created child process 2608
[Fri Feb 09 07:40:28 2007] [notice] Child 2608: Child process is running
[Fri Feb 09 07:40:28 2007] [notice] Child 2608: Acquired the start mutex.
[Fri Feb 09 07:40:28 2007] [notice] Child 2608: Starting 250 worker threads.
[Fri Feb 09 07:40:28 2007] [notice] Child 2608: Starting thread to listen on port 80.
[Fri Feb 09 07:41:08 2007] [notice] Parent: Received shutdown signal -- Shutting down the server.
[Fri Feb 09 07:41:08 2007] [notice] Child 2608: Exit event signaled. Child process is ending.
[Fri Feb 09 07:41:10 2007] [notice] Child 2608: Released the start mutex
[Fri Feb 09 07:41:10 2007] [notice] Child 2608: Waiting for 250 worker threads to exit.
[Fri Feb 09 07:41:11 2007] [notice] Child 2608: All worker threads have exited.
[Fri Feb 09 07:41:11 2007] [notice] Child 2608: Child process is exiting
[Fri Feb 09 07:41:11 2007] [notice] Parent: Child process exited successfully.
[Fri Feb 09 07:41:38 2007] [notice] Apache/2.2.4 (Win32) configured -- resuming normal operations
[Fri Feb 09 07:41:38 2007] [notice] Server built: Jan 9 2007 23:17:20
[Fri Feb 09 07:41:38 2007] [notice] Parent: Created child process 2604
[Fri Feb 09 07:41:38 2007] [notice] Child 2604: Child process is running
[Fri Feb 09 07:41:38 2007] [notice] Child 2604: Acquired the start mutex.
[Fri Feb 09 07:41:38 2007] [notice] Child 2604: Starting 250 worker threads.
[Fri Feb 09 07:41:38 2007] [notice] Child 2604: Starting thread to listen on port 80.
[Fri Feb 09 07:44:42 2007] [notice] Parent: Received shutdown signal -- Shutting down the server.
[Fri Feb 09 07:44:42 2007] [notice] Child 2604: Exit event signaled. Child process is ending.
[Fri Feb 09 07:44:43 2007] [notice] Child 2604: Released the start mutex
[Fri Feb 09 07:44:44 2007] [notice] Child 2604: Waiting for 250 worker threads to exit.
[Fri Feb 09 07:44:44 2007] [notice] Child 2604: All worker threads have exited.
[Fri Feb 09 07:44:44 2007] [notice] Child 2604: Child process is exiting
[Fri Feb 09 07:44:45 2007] [notice] Parent: Child process exited successfully.
|
but i don't think there are any errors...
do i have to configure my router in some way? i'm guessing that might be it... |
|
Back to top |
|
micheck
Joined: 21 Feb 2007 Posts: 1 Location: Yakima WA USA
|
Posted: Wed 21 Feb '07 2:58 Post subject: A variation on the same localhost problem |
|
|
I am running the latest Apache 2.2... on Windows XP - it has been working flawlessly for several weeks on localhost which I use to develop PhP scripts for my separate production Apache/Windows box. This morning I allowed Microsoft to install their latest security patches. Now my development box:
1: will NOT display localhost - it 'times out'
2: crashes Apache hard enough so that Apache doesnot remove the PID file
Looking at the error log (on debug) does not show me any unusual startup errors or running errors prior to the crash
Thoughts??? How do I back out MS patches cleanly
I have noticed one change on my error.log - after Apache crashes trying to open localhost there is this line following the 'listening on 80' line
[Tue Feb 20 16:59:08 2007] [notice] Parent: child process exited with status 3221225477 -- Restarting.
It appears there are two Apache crashes - there are two of the 'send a crash message to Microsoft' boxes
Charles |
|
Back to top |
|
James Blond Moderator
Joined: 19 Jan 2006 Posts: 7371 Location: Germany, Next to Hamburg
|
Posted: Wed 21 Feb '07 10:47 Post subject: Re: A variation on the same localhost problem |
|
|
micheck wrote: |
[Tue Feb 20 16:59:08 2007] [notice] Parent: child process exited with status 3221225477 -- Restarting.
|
Seems to be a PHP error. Please disable all extension in php.ini and see if it is working again. |
|
Back to top |
|