Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

I had to install a custom Apache on OSX because I needed a very specific configuration for a client and I could not make the default one work correctly with it, unfortunately.

So, I saw how to start in manually, using apachectl binary:

sudo /usr/local/apache2/bin/apachectl start

And I also saw I can make the default Apache start with a launchctl command.

But, how could I make a custom installed to start at boot, instead of the default one? If it's possible, I would like to use system's launchctl.

share|improve this question
Thanks. Added the solution above and marked as the correct answer. – lucasarruda Jun 3 '13 at 17:52

You would do the same as the launchctl procedure you linked to. The missing piece is that you need to make your own launchd.plist and save it in the LaunchDaemons/ directory. man launchd.plist for information on the plist format; or, you can probably copy the original apache one and change the path to suit your needs.

share|improve this answer
Save your own (or copied) plist-file in /Library/LaunchDaemons. And dont forget to either disable the systems httpd-plist or use a different port in your custom httpd.conf otherwise both webservers try to use the same port. And you will have to adapt the apachectl-file when you want to use it to start your own apache. – heiglandreas May 30 '13 at 9:45
up vote 2 down vote accepted


Unload default Apache:

sudo launchctl unload -w /System/Library/LaunchDaemons/org.apache.httpd.plist

Create a LaunchDaemon file ( /Library/LaunchDaemons/ ):

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "">
<plist version="1.0">

Change file owner:

sudo chown root:wheel /Library/LaunchDaemons/

And, finally, add it to be loaded on boot:

sudo launchctl load -w /Library/LaunchDaemons/
share|improve this answer

Your Answer


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

Not the answer you're looking for? Browse other questions tagged or ask your own question.