Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[Apache 2.0.49] Can't go to localhost in webbrowser
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
Get
n00b
n00b


Joined: 31 Jan 2004
Posts: 14
Location: Sweden

PostPosted: Sun Apr 04, 2004 2:40 pm    Post subject: [Apache 2.0.49] Can't go to localhost in webbrowser Reply with quote

Hi!

When I run "/etc/init.d/apache2 start" apache start without errors. But when I go to http://localhost in mozilla , it only stay and loading a very long time. The documentroot is not changed, so it point to the dir of apache welcomes pages.

I have searched, but don't find anything wich help me.
Back to top
View user's profile Send private message
tonycurtis
n00b
n00b


Joined: 12 Jul 2003
Posts: 58

PostPosted: Sun Apr 04, 2004 5:52 pm    Post subject: Reply with quote

Check your httpd.conf to see if a "Listen" directive is only looking at
the network interface.
Back to top
View user's profile Send private message
Get
n00b
n00b


Joined: 31 Jan 2004
Posts: 14
Location: Sweden

PostPosted: Sun Apr 04, 2004 6:19 pm    Post subject: Reply with quote

When I emerge apache I didn't get any httpd.conf, but in /etc/apache2/conf/apache2.conf is Listen like that:
Code:

Listen 80
Back to top
View user's profile Send private message
Hal[PT]
n00b
n00b


Joined: 09 Feb 2003
Posts: 33
Location: Lisbon

PostPosted: Sun Apr 04, 2004 11:28 pm    Post subject: Reply with quote

The same happened to me. I've tried re-emerging (for some times now) and still the same.

The behaviour i get is: i do the /etc/init.d/apache2 start and apache seems to get running:

Code:
scout conf # ps xau | grep apache2
root     22107  0.0  0.6  6896 2904 ?        S    Apr04   0:00 /usr/sbin/apache2 -k start -d /var/log/apache2/startuperror.log -f /usr/lib/apache2/conf/apache2.conf -E /var/log/apache2/startuperror.log -d /var/log/apache2/startuperror.log -f /usr/lib/apache2/conf/apache2.conf -E /var/log/apache2/startuperror.log
root     24269  0.0  0.0  1508  440 pts/2    R    00:18   0:00 grep apache2
scout conf #


well... what's wrong here? nothing. Continuing... on a normal website stuff happens like this:
Code:
scout conf # telnet www.gentoo.org 80
Trying 203.112.31.164...
Connected to www.gentoo.org.
Escape character is '^]'.
GET /
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>


on my box i get:
Code:

scout conf # telnet 0 80
Trying 0.0.0.0...
Connected to 0.
Escape character is '^]'.
GET /


^]
telnet> quit
Connection closed.
scout conf #

(i have to close the connection as no response is all i get)

Interesting fact comes from here:
Code:
scout conf # netstat -A inet -aevp | grep www
tcp        0      0 *:www                   *:*                     LISTEN      root       17897192   22107/apache2
tcp      413      0 scout:www               213.22.186.xxx:4414     ESTABLISHED root       0          -
tcp      291      0 scout:www               pr6-ts.telepac.pt:55355 CLOSE_WAIT  root       0          -
tcp    67125      0 xx-xxx-xx-xx.xxx.xx:www libb26-xxx-dhcp.re:1600 CLOSE_WAIT  root       0          -
tcp      559      0 scout:www               ce01pc04.netcabo.:53839 CLOSE_WAIT  root       0          -
tcp       12      0 localhost:www           localhost:36233         CLOSE_WAIT  root       0          -
tcp      487      0 scout:www               pr1-ts.telepac.pt:40829 CLOSE_WAIT  root       0          -
...


what's strange there? Every byte every connection sends to port 80 gets queued. From that i get that apache is doing the accept() stuff allright but then it doesn't read() on socket. The procutils also show me that no threads are being created (which is not the normal behaviour). I've already reviewed my confs and tried downgrading to .48 where everything worked fine. No result.

Same stuff happens with any, all or none of thie options: -D MAILMAN -D PHP4 -D SSL

Kernel is 2.4.22+patches.

If anyone knows a sollution for this one, it would be *really* appreciated.

Thank you :)
Back to top
View user's profile Send private message
zul
Retired Dev
Retired Dev


Joined: 27 Mar 2003
Posts: 20
Location: Ottawa,Ontario

PostPosted: Mon Apr 05, 2004 1:02 am    Post subject: Reply with quote

Have you tried going to http://<your ip address>

Regards
zul
Back to top
View user's profile Send private message
Hal[PT]
n00b
n00b


Joined: 09 Feb 2003
Posts: 33
Location: Lisbon

PostPosted: Mon Apr 05, 2004 9:49 pm    Post subject: Reply with quote

with an strace -f i found out that apache was just blocking while calling read() from /dev/random, just after fork()ing into background but before fork()ing the childs.

I also found this thread which contained the solution for the problem.

Get try also that thread :P might fix your problem too :P
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum