I'm trying to setup httpd with HomeBrew on a mac.

As I painfully learned today, brew services start always reports success, even when httpd fails to start.

Example failures reported as success:

  • failure to start httpd because another instance (started outside of brew) is already running;
  • failure to start httpd because of a syntax error in a config file

For example, say I deliberately put some random chars in httpd.conf, and run:

$ sudo brew services restart httpd

Brew happily reports success:

==> Successfully stopped `httpd` (label: homebrew.mxcl.httpd)
Warning: Taking root:admin ownership of some httpd paths:
This will require manual removal of these paths using `sudo rm` on
brew upgrade/reinstall/uninstall.
==> Successfully started `httpd` (label: homebrew.mxcl.httpd)

Even though httpd is obviously not running:

$ sudo ps -A |grep httpd
 9481 ttys000    0:00.01 grep httpd
 (nothing else)
$ sudo lsof -iTCP:80 -sTCP:LISTEN

What's wrong? Is this a bug in brew?

You must log in to answer this question.

Browse other questions tagged .