View Full Version : apache wont restart
Chris2k 07-14-2004, 11:06 AM Hi
apache wont start, here what i get
root@west [~]# /usr/sbin/httpd configtest
Warning: DocumentRoot [/dev/null] does not exist
Warning: DocumentRoot [/dev/null] does not exist
Syntax OK
and
root@west [~]# service httpd status
Looking up localhost
localhost
Making HTTP connection to localhost
Alert!: Unable to connect to remote host.
i checked /etc/resolv.conf it looks ok (i think) and i also tried to roll back to a previous httpd.conf and rebuild apache but same problem. :(
zupanm 07-14-2004, 11:09 AM what does your error_log say?
Chris2k 07-14-2004, 11:09 AM also in /usr/local/apache/logs/error_log
[warn] pid file /usr/local/apache/logs/httpd.pid overwritten -- Unclean shutdown of previous Apache run?
hostito 07-14-2004, 11:10 AM check /etc/httpd/logs/error_log
What does it say?
Chris2k 07-14-2004, 11:11 AM as i posted ^ ;P
zupanm 07-14-2004, 11:30 AM what do you have these set to in your httpd.conf
Listen
User
Group
hostito 07-14-2004, 11:35 AM hahaha we were all posting same thing :) error logs is the first place to look :)
Chris2k 07-14-2004, 11:40 AM Listen: 80
Listen: 443
User: nobody
Group: nobody
zupanm 07-14-2004, 01:06 PM what does a fuser 80/tcp give you
also fuser 443/tcp
SmartActive 07-14-2004, 01:09 PM try this
/etc/init.d/httpd restart (or start)
/etc/rc.d/init.d/httpd restart (or start)
regards
Chris2k 07-14-2004, 01:30 PM err thanks but i know how to start apache.
Well, i got it back up by recompiling with php 4.3.7 and default apache values (i'd just updated to 4.3.8) although configtest still returns the same:
Warning: DocumentRoot [/dev/null] does not exist
Warning: DocumentRoot [/dev/null] does not exist
Syntax OK
Arsalan 07-14-2004, 01:39 PM search the httpd.conf file for "DocumentRoot" and see what you have, some of them might be setup incorrectly.
Chris2k 07-14-2004, 01:51 PM hmm, well this isn't quite right is it?
<VirtualHost 12.34.56.78>
BytesLog domlogs/12.34.56.78-bytes_log
ServerName 12.34.56.78
ServerAdmin root@localhost
DocumentRoot /dev/null
ScriptAliasMatch .* /usr/local/cpanel/cgi-sys/domainredirect.cgi
</VirtualHost>
changed ip obviously, it was for one of mine but one i don't use for anything but that must be the problem right?, how'd it get written in my httpd.conf? lol :(
hostito 07-14-2004, 02:00 PM Did you check error logs? Sometimes it tells you why it did not like to restart... or why it crashed...
SmartActive 07-14-2004, 02:03 PM like that :
<VirtualHost 12.34.56.78>
ServerAdmin admin@domain.com
DocumentRoot /home/user/public_html
BytesLog domlogs/domain.com-bytes_log
ServerName www.domain.com
User username
Group username
ServerAlias domain.com www.domain.com
CustomLog domlogs/domain.com combined
ScriptAlias /cgi-bin/ /home/username/public_html/cgi-bin/
</VirtualHost>
linux-tech 07-14-2004, 02:11 PM Originally posted by Chris2k
err thanks but i know how to start apache.
Well, i got it back up by recompiling with php 4.3.7 and default apache values (i'd just updated to 4.3.8) although configtest still returns the same:
Warning: DocumentRoot [/dev/null] does not exist
Warning: DocumentRoot [/dev/null] does not exist
Syntax OK
ls -la /dev/null
If that doesn't exist, you've got problems ;)
Apache is complaining about /dev/null not existing. WHY it'd be trying to use /dev/null as a DocRoot i don't know, but there's most likely your problem.
Chris2k 07-14-2004, 02:20 PM Hi, yes /dev/null exists lol i know i'd have a few more problems if that was missing =P
SmartActive, yes i know how a host entry should look, and hostito i posted the error log in about the 3rd post =P
I guess that's the problem, but it would be nice to know:
1: how it got there :confused:
2: how come apache starts running php 4.3.7 but not 4.3.8 even though that entry is in the httpd.conf file throughout :confused:
hostito 07-14-2004, 02:22 PM I have seen that /dev/null is usually used for sites that are redirected by Cpanel. HTH :D
Arsalan 07-14-2004, 03:57 PM DocumentRoot /dev/null
ScriptAliasMatch .* /usr/local/cpanel/cgi-sys/domainredirect.cgi
This seems to be added by cPanel. So, basically they donot want their redirector to keep logs. Contact them. They might be of more help in this issue.
Shaw Networks 07-14-2004, 04:05 PM You might have a bad configuration of Apache that's causing it to fail everytime it tries to boot. Try reinstalling it and see if that does anything to help.
Chris2k 07-14-2004, 04:06 PM Well, i removed that entry from the httpd.conf it was actually in there twice and now i no longer get the DocumentRoot error from configtest but i tried to recompile again with php 4.3.8 and again it wouldn't start, so i guess that wasn't the cause of this problem.
:(
Arsalan 07-14-2004, 04:11 PM Chris2k, Since this seems to be a cPanel server, i think its a problem with php not compiling. Open a ticket with your provider, they should be able to fix this for you with the help of cPanel.
Chris2k 07-14-2004, 04:26 PM yeah i know i should do that, i like to try and figure stuff out by myself though =P the server doesn't host anybody, just my own sites.
oddly, i found an IP in the httpd.conf listed as a NameVirtualHost but it wasn't one of my server IP's just a regular broadband IP in the UK :confused:
I removed that and rebuilt the IP address pool because it was in there too, i guess that *might* have something to do with the localhost lookup error when apache tries to start?
mabye i'll try and rebuild apache one more time =P
Arsalan 07-15-2004, 05:09 AM Let me know how this works out. The broadband IP might be there in the base cpanel install, you could check up with them on this as well. If not.. you might want to check your logs..
hostito 07-15-2004, 09:23 AM I would have lloved to see what the error logs say, usually the answer is there...
xmlxp 07-15-2004, 10:34 AM Chris2k
do you have ( Turck MMCache ) installed in your machine before you upgrade to php4.3.8 ?
memronner! 03-07-2005, 01:03 AM dev/null....
the only thing i can think of is if you have php installed
maybe the dev folder is gone?
i had an error like that and did not get any help
so i reinstalled every thing to fix it
but i forgot about the dev forlder for php
check in the php folder if you have it installed
my folder is at php/dev with a file called php5ts.lib
or you can try removing php from the config and see if there
is a link
pizzaboy_au 03-07-2005, 01:23 AM Hi Chris2k,
If you need any help in this regard, just contact me. I will do this for free of course.
|