I actually ran into this same problem (at least the same symptoms) just today. In my case, I looked at
/var/log/apache2/error_log and saw a bunch of errors like this:
[Mon Mar 19 15:30:30 2012] [error] [client ::1] Directory index forbidden by Options directive: /var/empty/
Then I looked in
/etc/apache2/httpd.conf and saw these two lines…
…and then later, these lines…
# Some comments were here
…so I figured that somehow
MACOSXSERVER was getting defined, when it shouldn't be, since this machine is not a server machine. Then I remembered that I needed to install the Lion Server Admin tools on this machine, and the way Apple's documentation told me to do that was to install the Lion Server package from the Mac App Store on my admin machine, even though this wasn't intended to be a server machine. So maybe that actually/accidentally transmogrified my admin machine into a Mac OS X Server machine. To double-check, I ran:
ProductName: Mac OS X Server
Sure enough, my machine was now reporting itself as Mac OS X Server, even though all I had wanted to do was put the Server Admin Tools on this machine.
Back to the Apache problem, I eventually found
/etc/apache2/ReadMe.txt, which explained about those Mac OS X-specific Apache defines (be sure to read it yourself for more good info!), and then it said this:
Those IfDefine settings – MACOSXSERVER, WEBSHARING_ON, WEBSERVICE_ON – are set or not set by Apache's launchd plist, which is present in
So in my case, I chose to fix it by editing in that
plist for Apache to not defined
MACOSXSERVER, since I don't really consider my machine a server, and I want to control this stuff from the Web Sharing checkbox in the Sharing panel of System Preferences, not from Server.app.
So, I edited this file:
To remove or comment out these lines, in the
I chose to comment them out by putting SGML comment start/end markers before and after them like this:
After saving my changes to that
plist file, I restarted Apache gracefully:
sudo apachectl graceful
…and it was all better!
I may have had to reload the page in my browser a time or two if my browser had cached a "403 Forbidden" result for the page I was trying to get to.
Even if this isn't the exact same root cause of your problem, I hope my saga helps you figure out your situation.