I was trying to configure Apache on my Mac to better incorporate it into my desktop development environment. Part of that included customizing the DocumentRoot location - changing it from the default directory (/Library/WebServer/Documents) and pointing (or linking) it to a directory that just made more sense to me. But it wasn't as easy as I expected.
Trouble was, I couldn't get Apache to reflect my changes to the Apache configuration file (httpd.conf), regardless of how many times I restarted Apache (via System Preferences). Finally I did a find (find /etc/ -name "httpd.conf") and figured out that I was editing the wrong configuration file (/etc/httpd/httpd.conf). My Mac was actually running Apache v2, but I was editing the configuration file for the now defunct (but apparently still present) Apache v1 installation. So I edited the correct configuration file (/etc/apache2/httpd.conf), restarted Apache as before, and everything worked as expected. 😃
Post Follow-ons
or
Leave a comment
Add your voice to the discussion (2 comments so far).
I like to download and build my own apache, then build up my own small conf file. Then to (re)start it, I use `sudo httpd -f ~/apache/httpd.conf -k graceful`. One day I'll take some time to build a launchd script to bring it up at boot.
I didn't realize Apache still got much use amongst Ruby folks.
Join my email list and be notified whenever a new post is published.
I don't spam. You may unsubscribe at any time.
An unsubscribe link is provided at the bottom of all notification emails, which are sent using the Mailchimp email delivery platform. Please read my complete privacy policy for exhaustive details.
Thank you! Your comment has been submitted and is awaiting approval.
Unfortunately, we were unable to process your submission.
You may either your submission or reach out via
It looks like you are using an older browser.
As such, most/all interactive functionality (such as submitting comments) has been disabled.
Please consider upgrading your browser.
Congratulations! You are now subscribed to this post and will receive an email notification whenever a new comment is added.
If you would like to unsubscribe, click on the unsubscribe link provided at the bottom of every notification email.
Unfortunately, we were unable to process your subscription confirmation.
You might want to try clicking through your confirmation email again.
Alternatively, you can submit another comment and again opt to subscribe to follow-up comments.
Leave a comment
2 comments
I like to download and build my own apache, then build up my own small conf file. Then to (re)start it, I use `sudo httpd -f ~/apache/httpd.conf -k graceful`. One day I'll take some time to build a launchd script to bring it up at boot.