Teen Programmers Unite  
 

 

Return to forum top

Apache not serving

Posted by buzgub [send private reply] at September 24, 2001, 01:49:55 AM

I've been trying to get apache working so that I can start fiddling with PHP.... I'm working in linux (Red Hat 7.1). I've got apache compiled with php statically linked in, and checking the apache error log in /usr/local/apache/logs shows stuff like:

[Sun Sep 23 16:45:46 2001] [notice] SIGHUP received. Attempting to restart
[Sun Sep 23 16:45:46 2001] [notice] Apache/1.3.20 (Unix) PHP/4.0.6 configured -- resuming normal operations

so I know that I've got the right apache binary being executed. The apachectl script is consistently telling me that it's running, but I can't connect to localhost on port 80 with galeon, lynx or telnet; telnet tells me "connection refused" and galeon tells me that "the connection was refused while attempting to contact 127.0.0.1".

Wiping out all the configuration files in /usr/local/apache/conf and redoing "make install" from the apache directory and restarting makes no difference.

Has anyone got any ideas on fixing this problem? I've disabled red hat's firewalling tool altogether, and I haven't fiddled with ipchains at all.

Posted by gian [send private reply] at September 24, 2001, 03:38:55 PM

Is your hostname set in httpd.conf? Usually it won't even start without it, but worth a try. Set it to 127.0.0.1

Posted by taubz [send private reply] at September 24, 2001, 04:42:36 PM

Also, use ps aux to see if the server is actually running.

- taubz

Posted by grandsnafu [send private reply] at September 24, 2001, 11:25:41 PM

and most importantly, try to ping yourself. all kinds of bad things can happen until you realize that for whatever reason your loopback isn't working right.

Posted by gian [send private reply] at September 25, 2001, 12:37:38 AM

what is it?
ifconfig lo up

I think that's it, but don't trust me.

Posted by grandsnafu [send private reply] at September 25, 2001, 08:52:39 PM

or (maybe) : /sbin/ifup lo

Posted by drdevil [send private reply] at September 26, 2001, 11:51:17 AM

It says connection refused, so you can contact the host, so ignore everything gian+grandsnafu said, and concentrate on what taubz said, apache probably failed to launch because of errors in the config or something.

.
Gaz

Posted by buzgub [send private reply] at September 26, 2001, 09:13:56 PM

It's launching fine; ps aux shows it as running. There's something in the pid file, as well, so I'm sure that it's running.

Posted by taubz [send private reply] at September 26, 2001, 10:46:47 PM

What about on port 8000 or 8080? Check httpd.conf to see what port (and what IP) it is bound to.

Also, check that ipchains and iptables aren't screwing things around. Use the scripts ipchains-save (maybe locate it first) and iptables-save. If you see stuff that looks like it's doing something - maybe it's interfering. (Paste it here if you don't know what it's telling you.)

Do you have any other sever daemons running?

- taubz

Posted by buzgub [send private reply] at October 04, 2001, 03:16:41 AM

ipchains-save shows me:
:input ACCEPT
:forward ACCEPT
:output ACCEPT

and iptables-save gives no output, so they're not stopping anything.

Posted by buzgub [send private reply] at October 04, 2001, 03:19:20 AM

Errmm... I feel stupid now :(
I just checked what port it was listening on; it was port 8080. I was *certain* the default was 80 and I'd not changed it. Oops.

Posted by gian [send private reply] at October 04, 2001, 03:41:42 AM

I think you were possesed by Setherd, and got the impulse to install Zope.

(This is somewhat obscure, and if you didn't get it now, you probably won't, but Zope operates on port 8080 by default.)

Posted by buzgub [send private reply] at October 04, 2001, 04:58:17 AM

ah, but zope is only installed under windows; not linux.

Posted by gian [send private reply] at October 04, 2001, 05:32:05 PM

Ummm.... no, Zope is for Linux too!

Posted by buzgub [send private reply] at October 04, 2001, 08:55:41 PM

yes, but it's not installed on linux here. I'd think there was something *really* wrong if a standard windows application could fiddle with my linux install without my knowledge.

Posted by gian [send private reply] at October 04, 2001, 09:34:09 PM

Zope is not a standard windows app! Zope is a web application written in python, which is not platform specific! Anyway it was a joke, and if you were possesed by Setherd, you would have known that YOU changed your config file...!

You must be logged in to post messages and see which you have already read.

Log on
Username:
Password:
Save for later automatic logon

Register as a new user
 
Copyright TPU 2002. See the Credits and About TPU for more information.