Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Apache has been running fine for months and restarts have run fine.

However I went to restart it today and got this:

[django - pin@e02u35]~>sudo /etc/init.d/httpd restart
…
Starting httpd:                                            [FAILED]

All I find in /var/log/httpd/error_log is this but I'm not sure if it's related:

[Thu Jul 07 08:19:25 2011] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Thu Jul 07 08:19:25 2011] [error] Unable to change directory to /home/pin

If it matters, there's nothing in my home directory that httpd should be looking at. It should be running as the apache user and nothing in httpd.conf nor in my code references my home directory.

I'm stuck. Does anyone know how I can get more information about what's going wrong, or what might fix this?

System Info

Linux 2.6.18-128.el5 #1 SMP Wed Dec 17 11:41:38 EST 2008 x86_64 x86_64 x86_64 GNU/Linux
Red Hat Enterprise Linux Server release 5.3 (Tikanga)
share|improve this question
    
Post that as an answer so we can upvote you! –  PriceChild Jul 7 '11 at 14:41
    
It seems to me like ownership and permission problem. It seems also you are using suEXEC module. When I used it, it caused problems when there was a change in files and/or folders permissions. –  Khaled Jul 7 '11 at 14:50
    
You probably have Apache binding to ports 80 and/or 443. Those require root as those are privileged ports ( < 1024 are privileged). –  Corey S. Jul 7 '11 at 15:25
add comment

2 Answers

up vote 1 down vote accepted

Update: I got it working using sudo service httpd start. Why in the world would that matter? I'm still curious if anyone has any ideas what could be going on.

share|improve this answer
    
It's probably environment-related. From the manpage: "service runs a System V init script in as predictable environment as possible, removing most environment variables and with current working directory set to /." –  sciurus Jul 7 '11 at 19:04
add comment

I think is not your home directory what apache is looking for, is the current working directory. I believe apache expect to be run from /etc/httpd. You should report a bug, the startup script should change to it automatically.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.