DRÄ Studio

Pixel pushing and pencil shavings

Home Blog Projects Wallpapers Themes Fonts

Blog

Fixing Web Sharing after the Snow Leopard install

Posted on Friday, August 28th, 2009 under News | 8 comments

I've mentioned this great article before for instructions on enabling the built-in PHP5 functionality of 10.5 Leopard (this article is not so bad either), but with 10.6 Snow Leopard install I did today, I found that I was getting "403 Forbidden" errors when trying to access the localhost, so I thought I would share this quick tip on how to correct the access and resolve the issue. Besides this, I haven't experienced any issues with the upgrade, though it probably helped that I disabled the Unsanity haxies and restored my Candybar customizations prior to.

Related Posts:

Before You install Snow Leopard
I saw that Apple had put out this handy list of software that is incompatible with Leopard, and I thought it might be helpful to start collecting a list of smaller third-party apps that may cause issues. Here are mine so far ... feel free to comment with any others you are finding. Applications Incompatible with ...
Snow Leopard needs a default timezone
I happend to be testing one of the current Illustrative projects locally and notice the following PHP error on my date('y') function: Warning: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and ...
Wild Things
I have been get a crazy ton of things done at work today. Managed to resolve the "double contacts" issue I was seeing on my iPhone after the 3.0 upgrade, thanks in great part to this helpful article. I also used Terminal to enable the old skool but nifty "hot corner" indicators for a machine ...
Brittany's iBook G3
Yesterday I fixed an iBook for Brittany Kopp:ProblemSeconds after startup (before the ‘chime’) a Kernel Panic would occur, forcing Brittany to restart the machine. Diagnosis Could be an issue with a startup item, a corrupted font, or a something similar. It might be a hardware issue (i.e. memory failure), so it would be good to try booting ...
Wednesday with Pon and Zi
I haven't really ever picked up a copy of Relevant Magazine before, but since there was I copy in our office today, I thought I would leaf through it and check out some of its nifty trend-graphics and such. If you got this month's issue, be sure to check out the great article by David Crowder ...
  • Joe Schneider

    Dude, I did not even check my web sharing settings to see if they are hosed. They are. I had several virtual hosts to correspond to fake hosts that I added to my hosts file. This was done so I could have shorthand hostnames for development purposes (such as http://cca/ for stuff I do for work). All the apache setting are restored to default. At least MySQL still works.

    I am glad there is Time Machine so I can get my old apache config files back.

    Otherwise, things are very smooth.

  • http://www.drastudio.com Oscar

    Mine is working good now, but I used to be able to get to my Sites folder by simply using http://localhost/, but now I have to specify the ~user. I haven't been able to figure out how I fixed that last time ... besides setting up virtual hosts per project.

  • Joe Schneider

    I think that the only way to get it to show your user sites folder as localhost is to the root server to use your home sites folder as the root. There is a line that reads:
    DocumentRoot "/Library/WebServer/Documents"
    (Quotes are required for the config file). If you change that to /Users/ocortez/Sites (or whatever your username is), then you can visit localhost and see your own sites folder.

    In the process of getting php to work correctly, I noticed that php 5.3 is what shipped with SL, instead of 5.1 or 5.0.X that was in Leopard. I tried to copy my 5.1.X version php.ini, and it broke php. Then I noticed that the file structure is totally different in 5.3 as it uses OOP style dot notation for the preferences file. Copying the php.ini.default over php.ini fixed everything.

  • http://www.drastudio.com Oscar

    Interesting point about the php.ini file. I went ahead and replaced mine as well. I noticed that all the errors were being suppressed, despite my setting "error_reporting" to "E_ALL".

    Turns out that the "display_errors" directive is set to "OFF" by default. ;)

  • http://www.drastudio.com Oscar

    Oh and changing the DocumentRoot didn't help. Still requires ~user to access the Sites folder and "http://localhost" still returns a "404 Not Found" error.

  • http://www.drastudio.com Oscar

    New issue: I found that the symbolic links in the "Sites" folder weren't being followed. I tried adding the FollowSymLinks option to my user-specific .conf file, but initially, it broke the server. I reverted, added it again and it is working correctly now. The necessary .conf file is located here:

    /private/etc/apache2/users/yourusername.conf

    and looks like this:

    <Directory "/Users/yourusername/Sites/">
    Options Indexes FollowSymLinks MultiViews
    AllowOverride All
    Order allow,deny
    Allow from all
    </Directory>

  • Davis John

    >> Oh and changing the DocumentRoot didnât help.
    >> Still requires ~user to access the Sites folder

    I was also facing the same issue. I removed the default entries in the virtual hosts config file and things started working again.

  • Pingback: Snow Leopard Apache Problem Fixed

  • Justerson

    Y'all saved me! Never even thought about Apache before I upgraded and have spent days Googling my MySQL/Apache issues. The ~user bit (@Oscar) turned out to be the case, and removing the default entries (@Davis John) brought things back to normal (ok, have to track down my MySQL sock issue, but can't complain...). Thanks all!!!

 

Back to Top