Today is the second day of my Apache on Mac nightmare.
This must be a configuration issue. After all, it was a configuration issue the last time (yesterday). The premise is simple: I want to run more than one VirtualHost on my MacBook. I have been using this approach – for better or worse – on my PC for the last two years. It ain’t workin’ so good in Mac land, and I haven’t yet figured out why.
Yesterday, it turned out to be the reversal of a security paradigm. On my PC setup – based upon the default configuration for a fresh installation of Apache 2.0.x – all I had to do was define a new VirtualHost, and voila!, instant local testing environment. The Mac seems to be following the principal of least privilege: no one has access to anything unless specifically configured on a per-VirtualHost basis. It was the discovery of this, yesterday, that lead me to adding a few choice options to a nested Directory element, namely, AllowOverride all, Order allow,deny, and Allow from all.
Yesterday, with those options in place my first VirtualHost – the one that I used to test configuration for this blog – worked perfectly. Today I’m trying to configure an additional VirtualHost – this time, for a client’s site. Same problem as before: Apache says, “Forbidden.” You don’t have permission to access this. What? Where is this? Am I pointing at the wrong directory path? Nope. Did I forget to throw in those choice options from yesterday? Nope.
There’s gotta be a better way.
Update, July 27th The temporary fix for this problem is to relax the whole least privileges thing, and give all VirtualHosts free reign over my system. This would probably be a huge security hole on a real server; but considering I’m running a Mac now, it should be OK to have my local system setup this way… right?