This is something I posted on a private forum, but I figured it was worth sharing here:
That’s pretty much how I feel after my ordeal. Allow me to elaborate.
I’m a web designer. Naturally this means I like to set up web servers on my local machine to test various things. Good practice, no? I’m no stranger to setting up Apache and related fixin’s, and generally I can have things working quickly with a few minor hang-ups.
Then I attempted to make a dev machine out of a Mac. Sit down children, this is gonna be a long one.
As of 10.5, Apache comes standard with all Macs. I guess they finally realized that there were people like me who would use their Mac in such a manner! Sadly, I am still on 10.4 so I am not privy to such luxuries. I’d have to install it myself. “Ok, no big deal,” I told myself calmly. “Let’s go grab the source and compile it!”
Source grabbed. Source extracted. Source compiled? No. Hello gcc, what lovely errors you have today! I bet a pretty little thing like you can snag any code she wants <3
I fought and lost, so I turned to Macports. Seemingly everything installed fine. Seemingly…
Apparently the port gives you 3 places as a DocumentRoot of sorts. Funderful. I casually strolled over to httpd.conf to have a peek. But wait! There’s more than one! I made an educated guess, and stumbled across the root of /opt/local/apache2/htdocs. Obviously this isn’t working, so let’s tinker. No? Let’s tinker some more. Still nothing. One last tinkering then I’m going to give up. “It works!” the page screamed. Finally, I had reached Mecca. Or had I?
I figured getting everything working would be as simple as a few modifications to a few different conf files like it is on Windows and *nix. Oh how very wrong I was.
NameVirtualHost 127.0.0.1:80
<VirtualHost 127.0.0.1:80>
ServerAdmin MYFUCKINGEMAIL – that I have hidden (:
DocumentRoot /Users/me/Desktop/Projects
ErrorLog /Users/me/Desktop/errorlog.txt-www
CustomLog /Users/me/Desktop/accesslog.txt-www common
</VirtualHost>
With a few modifications, this would make sense to Windows and *nix. But oh no, not on Mac. It wants you to use an unholy clusterfuck that goes a little something like this:
<Directory “/Users/*/Sites”>
AllowOverride FileInfo AuthConfig Limit Indexes
Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec
<Limit GET POST OPTIONS>
Order allow,deny
Allow from all
</Limit>
<LimitExcept GET POST OPTIONS>
Order deny,allow
Deny from all
</LimitExcept>
</Directory>
Sure you can uncomment the vhosts file in the main conf and edit it, but why do that when you can allow EVERYONE to have access to upload and do as they please in their dir? Communism. I don’t want equality damn you. I want a !@#$%^&* web server!
The mighty blue apple in the corner leered at me as I slowly lost my mind. Why on Earth would I want to use something like this when clearly I have a nice little VirtualHost block for you to snack on? Why do you punish me, Macintosh? WHY?
I allowed Communism to win this time. I’d wage war against these iron fisted mongrels another day. I threw some files in my Sites directory that it had happily created for me (and every other user on here) to see what would explode. Finally, Apache served me what I was looking for. BUT WAIT! What’s this?
Apache/1.3.41 Server at amandas-personal-mac.local Port 80?
Apache/1.3.41 Server at amandas-personal-mac.local Port 80
Apache/1.3.41 Server at amandas-personal-mac.local Port 80
WHAT?! I wasted an hour and a half of my life on an old version of Apache! Oh well. It’s working. From a dir that I don’t want it working from. On an older install. That I wasted my life on. From a dir that I never really asked it to work from.
AS fucking DF. asdfasdfasdfasdfasdf