tags:

views:

113

answers:

4

I would like to run a local PHP (5.3) website on Mac OS X 10.6. I have PHP configured properly and can access a website using http://mymac.local/~me/index.html. I have this folder structure:

~me/Sites/index.html which points to http://mymac.local/~me/index.html
~me/Sites/mysite/home.html which doesn't work

If I try http://mymac.local/~me/mysite/home.html, I'll get a forbidden error stating I don't have permission to access that file. If I put home.html in the Sites folder, I still get the error. Seems Apache is hard wired to like only the index.html and no sub folders. Is there a way to get that working?

A: 

Make a new folder under ~me/Sites/ and see if that folder is accessible. Permissions have been changed, you could chown or chmod the folder and files to get them back to being readable.

dotty
It is definitely permissions but I don't know how to change that on the Mac besides through "Get Info", which does no good. The new subfolder produces the same forbidden results. If I rename index.html (the one that works now) to home.html, that works fine. So that file has some special permissions that all the others need.
4thSpace
A: 

Look at the Sharing panel within System Preferences and make sure that File Sharing is turned on and that "Everyone" can Read your Sites folder.

Doug Hays
A: 

I don't full understand your question. However, from experience I know that Apache on OS X can be a pain. You could dodge the problem and use XAMPP or MAMP instead.

Benedict Cohen
A: 

I ran chmod -R 777 Sites and that solved it.

4thSpace