Sillyness Spelled Wrong Intentionally

Technology

Homebrew Apache Not Responding

Check your ownership friends. Check your ownership.

Penned 4 weeks ago. 1:44 Reading Time.
It was 72°F in San Diego, CA with a few clouds.
was playing.

So, if you are a homebrew using fool like me, and have recently found that your apache install isn't working after a reboot, then this might be the article for you. I had this very problem this morning and after a little digging I discovered it was a permissions issue on a log file, of all things.

This might only be an issue for those of us who have set up SSL on our local machines, but I mean, that should be all of us, since we should be deploying all of our sites as SSL, and we need to make sure everything works as expected, right? RIGHT?

Anywhoo, the issue I found was that when I rebooted the machine the ownership of the ssl_request_log file was changed to root, which rendered it unreadable to apache during its startup sequence. A quick change of ownership to the correct account and group fixed the problem. I was able to restart apache with the homebrew services command and everything worked as expected.

If you aren't familiar with navigating things via the command line, follow these simple steps:

  1. Open a terminal window, type cd /usr/local/var/log/httpd and hit enter.
  2. Next type ls -la to get a listing of all the files in the current directory.
  3. You should see 3 files: access_log, error_log and the aforementioned ssl_request_log.
  4. Check the ownership on these files. They should all match. The two columsn with names in them are your ownership settings, something like johnsmith admin.
  5. If you see something else, like root admin that is probably your problem. We need to change that to match the other two files.

To do this, you need to use the chown command, like so:

sudo chown johnsmith:admin ssl_request_log

You'll be asked for a password, which is your account password for your mac, and then hopefully everything is fixed! To test, simply type in:

homebrew services restart httpd

And then reload your local project in your browser of choice. Hopefully that helps someone out there!

Twitter responses for Homebrew Apache Not Responding

To add your voice, tweet with the hashtag #sswiHomebrewApache.

  • No replies to show, why not be the first? It feels good, trust me. Don't think about it too much, just click!

I hope you enjoyed reading Homebrew Apache Not Responding
By becoming a Patron of Sillyness by throwing a buck in the jar or by buying me a coffee you can ensure quality writing, film, photography and music like this continue to be made available.

Sillyness Spelled Wrong Intentionally is a registered periodical: ISSN #1544-4104,
© 2001 — 2020 Chris J. Davis and has been kicking it old school for 19 years, 4 months and 1 week.
Beautiful photos courtesy of Unsplash.