I have an issue where Apache will not start after updating to High Sierra 10.13.1. There isn't anything showing in the error logs, but when I try to apachectl start nothing happens. If I run apachectl configtest I receive "Syntax OK

I have used commands like sudo launchctl load -w /System/Library/LaunchDaemons/org.apache.httpd.plist to no avail. Apache will not start. I can run sudo launchctl load -w /Library/LaunchDaemons/homebrew.mxcl.httpd.plist and that is not working either.

I took a look at the brew services list and httpd shows up in the list along with other process (mysql) but httpd's status is showing a yellow "started" instead of a green one.

I have tried many different things, and what I am finding is that if I look into the system.log file I find com.apple.xpc.launchctl[1] (homebrew.mxcl.httpd24[11780]): Service exited with abnormal code:1

If I run apachectl start, the command seems to work, but when I run the stop command I get "httpd (no pid file) not running.
I am also receiving the output of com.;apple.xpc.launchd[1] (org.apache.httpd): Please switch away from OnDemand to KeepAlive.

Is there something with High Sierra that is preventing Apache from running when it ran fine in Sierra?

  • 1
    You are mixing brew's Apache httpd and Apple's Apache httpd (whose launch daemons start different binaries)! Where do you get the httpd status from (ie yellow vs. green indicator)? Which initial set-up guide did you use?
    – klanomath
    Nov 17, 2017 at 16:28
  • I am not mixing them, I was going through the steps of using trying both brew and Apple's apache, When I perform a brew services list' I receive a yellow indicator, I checked with all of the available users and ran brew services list` and they are all showing the same indicator. As for a setup guide, Ansible was used to set up apache. This has been done on 5 other MacBooks, they are still running Sierra. This one MacBook had an issue and an Apple ran a diagnostic and reset the OS, while updating the OS to High Sierra Nov 17, 2017 at 16:45
  • With mixing I mean: you have at least two apachectl and httpd binaries installed (and two config files). Usually brew's apachectl is preferred (because of the default content of the PATH variable, your's may be different though). AFAIR brew's apachectl won't start Apple's httpd with the default start option (ie apachectl start). Same with ... configtest!
    – klanomath
    Nov 17, 2017 at 16:54
  • With "Ansible was used to set up apache" you mean this guide: Mac Development Ansible Playbook? It's better to add a link to a/the how-to or set-up guide. The various set-up guides for the various macOS versions all contain slightly different configs/create different envs.
    – klanomath
    Nov 17, 2017 at 17:04
  • I just updated to High Sierra this weekend, and I am having this exact same problem. I have been using the Homebrew httpd formula, and now apache doesn't respond. When I do brew services list, I also get the started for httpd in yellow, and when I run sudo apachectl stop, it tells me that httpd (pid 87?) not responding.
    – wonder95
    Jan 8, 2018 at 22:44

6 Answers 6


In my opinion you hosed your various httpd launch daemons/start mechanisms by executing too many httpd related commands.

With homebrew and homebrew's apache-httpd installed and the default PATH you have six ways to start httpd.

Apple's Apache:

  • sudo launchctl load -w /System/Library/LaunchDaemons/org.apache.httpd.plist
  • sudo /usr/sbin/apachectl start

Homebrew's Apache:

  • sudo apachectl start
  • apachectl start
  • sudo brew services start httpd
  • brew services start httpd

If you've copied the file homebrew.mxcl.httpd.plist manually to either ~/Library/LaunchAgents/ or /Library/LaunchDaemons/ you have two more options to start it by loading them with (sudo) launchctl load ....

If you didn't modify the httpd config files or the apachectl scripts heavily the Apple branch will use Apple's httpd.conf file in /var and the DocumentRoot in the /Library folder.

The homebrew branch uses subfolders in /usr/local/.

Some launch methods won't work if you've bound the httpd ports to ports lower than 1024!

If you use (sudo) brew services ... to start httpd you have to use the proper (sudo) brew services list command to check the status:

If you start it as root then list it with root privs:

sudo brew services start httpd > sudo brew services list

or with user privs:

brew services start httpd > brew services list.

To solve your problem unload Apple's httpd:

  • sudo launchctl unload -w /System/Library/LaunchDaemons/org.apache.httpd.plist
  • remove any manually installed homebrew.mxcl.httpd.plist
  • stop any homebrew httpd service with (sudo) brew services stop httpd
  • stop any httpd started by apachectl:

    apachectl stop
    sudo apachectl stop
    sudo /usr/sbin/apachectl stop
  • Open Activity Monitor and check that no httpd process is running.
  • Reboot

Now - assuming you want to use homebrew's httpd on privileged ports - enter:

sudo brew services start httpd

Check the successful start with sudo brew services list.

  • When attempting the fix you provided, I receive the same output as I did. apachectl stop provides the output of httpd (no pid file) not running and when I run sudo brew services httpd start sudo brew services list indicates apache2 (httpd) started in a yellow color When I attempt to access anything webpage related I am unable to. I am wondering if the update to 10.13 altered something in apache preventing it from starting. Nov 20, 2017 at 15:55

Regarding homebrew httpd, one issue I recently ran into was an old leftover httpd.pid file that was preventing httpd from starting. Symptom was apachectl start said httpd is already running, but it was not.

Cause was an old file here:


Solution was to delete this pid file and then httpd started.

  • great! this is my problem when my MBP decides that it's not going to wake from sleep and I have to power-cycle it.
    – frumbert
    Sep 24, 2018 at 9:07
  • 2
    This solution also worked in MacOS Mojave. Brew thought that Apache was running but there was no httpd in activity monitor. This fixed it. Nov 12, 2018 at 19:34
  • This saved me a lot of trouble!
    – SEJU
    Dec 7, 2018 at 12:10
  • This worked for me as well. I couldn't load any website, and kept getting ERR_CONNECTION_REFUSED. When I attempted to list the services that were running with brew services list I was getting the yellow 'started' status which meant that there was something wrong with the active status of the server. Removing the pid fixed this and now the service list shows the active status as a green 'started' instead now. Thank you for this! Jan 6, 2019 at 2:44
  • If your machine has hard rebooted following a kernel panic/power cut/etc this is likely to be your issue. Thanks!
    – Dom Stubbs
    Feb 12, 2020 at 12:03

I faced the same after I upgraded to High Sierra earlier today. I found that the following apache files were replaced with brand new versions. Fortunately for all of these files there existed a FILE~previous file in the same folder. I just copied the ~previous version back to the original ones, restarted apache and everything was fine.

In folder /etc/apache2 :



cp /etc/apache2/httpd.conf~previous /etc/apache2/httpd.conf
  • In the folder /etc/apache2/extra/ there are approximately 10 files with ~previous appended to them, should all of these be changed, or just the two you mention in the /etc/apache2/extra/ folder Nov 21, 2017 at 18:42
  • I would start with httpd.conf and httpd-vhosts.conf files. If you have SSL setup then you would need to update the httpd-ssl.conf as well. The rest depends on if you had changed them earlier. I would use a diff to see if the files have changed e.g. diff httpd.conf httpd.conf~previous on all the other files
    – Unmesh
    Nov 22, 2017 at 1:25
  • I have started with those files, that did not change anything. Nov 27, 2017 at 13:09

I had the same problem

com.apple.xpc.launchctl[1] (homebrew.mxcl.httpd24[11780]): Service exited with abnormal code:1

This means httpd exited abnormally.

I then manually started httpd to see what the problem was

> httpd
(13)Permission denied: AH00091: httpd: could not open error log file /usr/local/var/log/httpd/error_log.

Looking at the permissions it was pretty clear

> ll /usr/local/var/log/httpd/
total 96
-rw-r--r--  1 root  admin    242 15 apr 12:38 access_log
-rw-r--r--  1 root  admin  42062 20 jun 11:01 error_log

I think I started httpd as root which caused this issue. I removed the files and after

brew services restart httpd

all was fine.


I ran into this recently. The cause is homebrew installs apache2/httpd in user accessible folders and runs as a user (by running the command: brew services start httpd).

Not running as a regular user means httpd can not listen on privileged ports (1024 and below).

So even if httpd.conf is configured to listen to 80 and 443, httpd can not receive requests through those ports.

The peculiarity is when you start httpd by running the command: sudo apachectl start. This command starts httpd as root user. Root user is allowed to listen on ports 80 and 443. httpd then drops privileges back running as the _www user.

So the short answer is to run homebrew httpd on ports 80 and 443 is to start it using: sudo apachectl start. You can also start it with: sudo brew services start httpd. Brew will tell you it's claiming certain folders for root, which I suppose is fine but not necessary since sudo apachectl start does not require file permissions and/or owner changes.


I would suggest in contrary what HomeBrew says always run httpd by sudo. There for if you do ps -aef |grep httpd you will see it listed as running. Doing without sudo produces no ps output which may give wrong impression httpd is not running.

Also I am not sure if there are different or the same configurations loaded in both cases. I installed PHP and created test.php file with phpinfo in DocumentRoot directory. If you start apache with sudo you may see phpinfo with localhost/test.php while using brew services start httpd will give you error if DocumentRoot is in area where root access is required.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .