Exploring Apache on MacSaturday, July 21, 2007 by Dave Winer. In the background I'm learning how to configure Apache on Mac OS X. There are lots of little stumbling blocks that involve penetrating the user interface and getting down to the Unix running underneath. There's a tiny sliver of Apache showing through the GUI but not enough to do anything interesting. The first thing I had to figure out, after learning where the document root is (still not totally clear on that but I got it working) is where the httpd.conf file is. I found it at:
You can't normally get to this location in the Finder, but there is a way, in the Terminal window, to tell the Finder to display hidden files and folders, and then you can navigate there. A tutorial at MacWorld explains how. Even better, you can open the folder from within the OPML Editor using the file.openfolder verb. There's probably a way to do it in AppleScript as well. So I opened the httpd.conf file and started reading it, and it seems like a standard Apache install with an added nicety: at the end it includes all files ending with .conf in the users sub-folder. So you can modify the install without having to modify the shipping conf file, which means you can get an upgrade from Apple without losing your changes. Good. So I started writing a file that would map virtual hosts to store in my personal conf file, but when it came time to save, no luck. On further investigation I find that I don't own the files, even the one named after me! They belong to the system. So now I'm scratching my head trying to figure out how I log on with permission to edit files created by the system. There must be a way, right? Suggestions are welcome of course. PS: This is what I needed. Thanks!! |