Here’s where to find httpd.conf
on Mac. This is the httpd.conf location on Mac OS X 10.6 Snow Leopard and Mac OS X 10.7 Lion. This article also shows how to make the httpd.conf directory visible in the Mac Finder.
If in macOS Catalina, using the default install of Apache, if I run sudo apachectl start followed by pgrep httpd it will show multiple occurrences of httpd, sometimes just two and other times four occurrences. I actually never noticed it because on my system httpd doesn't show up in Activity Monitor and why I used pgrep httpd from Terminal. Option 1: Drag Apache icon to the Trash. Open up the Finder, click Applications on the left side, and then select Apache. Drag Apache to the Trash (or right click on it and then select Move to Trash option). Right click the Trash icon and select Empty Trash option to start the uninstall. This drag-to-delete method works in all versions of Mac OS X.
Httpd.conf is the Apache web server’s main configuration file. Mac OSX ships with Apache installed. See Apache’s configuration docs for how to configure Apache.
On Mac httpd.conf location is in the directory /etc/apache2
. You can access this folder through the Mac Finder or through the Mac Terminal.
Checked on OS X 10.7, 10.6.8, 10.6.7.
You won’t normally see even the /etc/apache2
directory showing up in the Mac Finder. I tried looking in Macintosh
HD
, but /etc doesn’t show up.)
I found a tip at Codejacked on how to open hidden files in the Finder.
Here’s how to view httpd.conf’s directory in the Mac’s finder:
/etc/apache2
.The Finder will show the apache2
folder, and in it, you’ll see httpd.conf.
You can also get to the httpd.conf file through a terminal session, which is okay if your comfortable in the Unix shell (bash
):
Httpd.conf is protected by OSX from being edited. If you open it with the TextEdit application for example, you won’t be able to save it. For details to bypass this security, see How to Easily Edit Httpd.conf on Mac.
Don’t forget you will need to restart Apache for your configuration changes in httpd.conf to be applied. To restart Apache on Mac: