51°F

Aaron Parecki

  • Articles
  • Notes
  • Photos
  • Trouble restarting Apache

    April 19, 2006

    My VPS was restarted yesterday, and apparently Apache wasn't shut down gracefully. I tried to go to my website, but Apache wasn't running. I SSH'd into my machine to restart apache. I typed

    /etc/init.d/httpd restart
    

    I can't remember exactly what it said back to me, but it gave me the PID of Apache (1039) and said it was running. Apache was most definitely not running. I found this out by getting a list of all running processes:

    ps -ax
    

    That gave me a list of PIDs corresponding to programs, and 1039 was not httpd. It occurred to me that if Apache thinks it's running, it has to have some way of knowing that. In Apache's log file directory, there is a file which holds the PID of Apache when it's running. That file is called httpd.pid. By removing that file, Apache no longer thinks it's already running, and will actually try to start. If you don't know where httpd.pid is, run this command:

    whereis httpd.pid
    

    That should find it. If not, it is probably in /usr/local/apache2/logs if you installed with the default values. Then you just need to rm httpd.pid, and restart apache again. I got everything back up and running with just under 10 minutes of troubleshooting!

    Wed, Apr 19, 2006 10:57pm -07:00 #apache
Posted in /articles

Hi, I'm Aaron Parecki, Director of Identity Standards at Okta, and co-founder of IndieWebCamp. I maintain oauth.net, write and consult about OAuth, and participate in the OAuth Working Group at the IETF. I also help people learn about video production and livestreaming. (detailed bio)

I've been tracking my location since 2008 and I wrote 100 songs in 100 days. I've spoken at conferences around the world about owning your data, OAuth, quantified self, and explained why R is a vowel. Read more.

  • Director of Identity Standards at Okta
  • IndieWebCamp Founder
  • OAuth WG Editor
  • OpenID Board Member

  • 🎥 YouTube Tutorials and Reviews
  • 🏠 We're building a triplex!
  • ⭐️ Life Stack
  • ⚙️ Home Automation
  • All
  • Articles
  • Bookmarks
  • Notes
  • Photos
  • Replies
  • Reviews
  • Trips
  • Videos
  • Contact
© 1999-2025 by Aaron Parecki. Powered by p3k. This site supports Webmention.
Except where otherwise noted, text content on this site is licensed under a Creative Commons Attribution 3.0 License.
IndieWebCamp Microformats Webmention W3C HTML5 Creative Commons
WeChat ID
aaronpk_tv