Apache Failing and not restarting - PLEASE HELP

Chriz1977

Well-Known Member
Sep 18, 2006
191
0
166
Hi

Apache has fallen over and wont get back up again. The last entry in the apache error log is an unknown username error. This was just before the crash. The user was having troubles with a DNS entry as hed created a user without a domain and couldnt delete it (Nor can I as i cant find it anywhere in WHM except when I list reseller accounts, but thats another story)

Ive looked at httpd.conf and found this at the bottom

ErrorDocument 400 /400.shtml
ErrorDocument 401 /401.shtml
ErrorDocument 403 /403.shtml
ErrorDocument 404 /404.shtml
ErrorDocument 500 /500.shtml
ScriptAlias /cgi-sys/ /usr/local/cpanel/cgi-sys/
Alias /sys_cpanel/ /usr/local/cpanel/sys_cpanel/
Alias /java-sys/ /usr/local/cpanel/java-sys/
Alias /img-sys/ /usr/local/cpanel/img-sys/
Alias /akopia/ /usr/local/cpanel/3rdparty/interchange/share/akopia/
Alias /neo-images/ /usr/local/cpanel/base/neomail/neo-images/
ScriptAliasMatch ^/cpanel/(.*) /usr/local/cpanel/cgi-sys/redirect.cgi
ScriptAlias /cpanel /usr/local/cpanel/cgi-sys/redirect.cgi
ScriptAlias /whm /usr/local/cpanel/cgi-sys/whmredirect.cgi
ScriptAlias /securewhm /usr/local/cpanel/cgi-sys/swhmredirect.cgi
ScriptAlias /webmail /usr/local/cpanel/cgi-sys/wredirect.cgi
ScriptAliasMatch ^/webmail/(.*) /usr/local/cpanel/cgi-sys/wredirect.cgi
ScriptAliasMatch ^/kpanel/(.*) /usr/local/cpanel/cgi-sys/redirect.cgi
ScriptAlias /controlpanel /usr/local/cpanel/cgi-sys/redirect.cgi
ScriptAlias /securecontrolpanel /usr/local/cpanel/cgi-sys/sredirect.cgi
Alias /mailman/archives/ /usr/local/cpanel/3rdparty/mailman/archives/public/
ScriptAlias /mailman/ /usr/local/cpanel/3rdparty/mailman/cgi-bin/
Alias /pipermail/ /usr/local/cpanel/3rdparty/mailman/archives/public/
Alias /interchange/ /usr/local/cpanel/3rdparty/interchange/share/interchange/
Alias /interchange-5/ /usr/local/cpanel/3rdparty/interchange/share/interchange-5/
Which wasnt there before. Everything else looks ok.

Any suggestions as to what to do to sort it? Ive tried to rebuild apache but no luck, same thing 'httpd failed to start'. Im getting bored of seeing that now, can anyone help me?

Cheers
Chriz
 

Radio_Head

Well-Known Member
Verifed Vendor
Feb 15, 2002
2,048
1
343
httpd configtest

to find errors

if no error , look on your php.ini , and try to disable (comment) zend and ioncube lines

restart apache
 

Chriz1977

Well-Known Member
Sep 18, 2006
191
0
166
# httpd configtest

Warning: DocumentRoot [/home/samantha/public_html/cp] does not exist
Warning: DocumentRoot [/home/samantha/public_html/shop] does not exist
Warning: DocumentRoot [/home/divinity/public_html/settle-your-debts] does not exist
Warning: DocumentRoot [/home/mancunia/public_html/rick] does not exist
Warning: DocumentRoot [/home/divinity/public_html/blog] does not exist
Warning: DocumentRoot [/home/stayba/public_html/buenosairesagent] does not exist
Warning: DocumentRoot [/home/stayba/public_html/agent] does not exist
Warning: DocumentRoot [/home/boaltacs/public_html/secasatboy] does not exist
httpd: bad user name best8
Thats the result. the missing dirs shouldnt cause a problem as theyre useres dirs, should they?
How do I resolve the bad user name? just delete the dir and dns entry?

cheers
 

Anishts

Active Member
Oct 6, 2005
37
0
156
hi

Check the user name in httpd.conf (ie, from User directive )exists in /etc/password file.....
 

Chriz1977

Well-Known Member
Sep 18, 2006
191
0
166
Ive got it all sorted. I had to delete the Virtual Host Entries for that user.

This all came about because someone tried to create an account without adding a domain name. Is there any way to stop this happening in the future? You would think whm would have a check for this, wouldnt you?
 

Spiral

BANNED
Jun 24, 2005
2,018
8
193
Another one to add to the list for the argument for better Cpanel quality control! :D
 

Spiral

BANNED
Jun 24, 2005
2,018
8
193
Well you could submit it as a bug report I suppose ....

"Cpanel allows sites to be built if domain not entered"

I personally would consider that a bug! A big bug!
 

Chriz1977

Well-Known Member
Sep 18, 2006
191
0
166
So how de we suggest things to be in the next release?

Its easy enough to check if a textbox is empty so they hav NO excuse. Especially if one user doing that can crash a server, Its essential I think
 

Spiral

BANNED
Jun 24, 2005
2,018
8
193
Lovely! This forum site is broken too as my last reply is showing now in the thread
before the post that I was actually replying to!

(Looks like they have something resetting the clock on this server --- Just great! :rolleyes: )
 

Chriz1977

Well-Known Member
Sep 18, 2006
191
0
166
mine did that yesterday, i think it happens when you post at a time close to the last post.
I think we confused it, lol
 

Spiral

BANNED
Jun 24, 2005
2,018
8
193
Chriz1977 said:
mine did that yesterday, i think it happens when you post at a time close to the last post.
I think we confused it, lol
It shouldn't be doing that unless there is something wrong with the system clock
on the server where this forum is hosted.

Could be a number of things ...

1. Syncronizing time using a list of multiple servers out of sync with each other

2. CMOS battery on the mainboard is dead

3. Motherboard / CPU is overclocked

4. Someone or some script on the server resetting the clock for whatever reason
 

rsaylor

Well-Known Member
Mar 27, 2003
160
1
168
I have seen this error countless times. It is mostly caused when a user deletes a domain and does not give the browser time to finish. But, there could be other reason's also. I agree, cpanel needs to make a better way for this, possible requening the process to a job instead of at the mercey of the browser.