0

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)
  • Post that as an answer so we can upvote you! – Pricey 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
1

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.

  • 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
1

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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