Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Recently one of our web servers httpd stopped working and I haven't been able to find the problem. Today I sat down and went through every directory in the httpd.conf and have found an issue.

the /var/run/httpd.pid is missing from the folder.

All other files are there and seem to be fine. I cannot create a new file with the same name in vi and I have no idea what could have caused this.

I imagine it was caused by a cold reboot at some stage as no other extraordinary processes have been run on this server at the time it went down.

I am running CentOS 3.

How can I reinstate this file?

share|improve this question

migrated from stackoverflow.com Mar 24 '10 at 11:16

This question came from our site for professional and enthusiast programmers.

You have to find out where your Apache creates its PID and who is the owner of the process. Then, check if the Apache owner has the read/write access to the destination directory.

share|improve this answer
service httpd restart
share|improve this answer
    
Yes.. That would be nice, unfortunately that was the first thing I did. – Anonymous Mar 23 '10 at 21:54

Okay so I found what the pid files are used for. Sorry for wasting your time.

share|improve this answer

Your Answer

 
discard

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