Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

I've recently "activated" the web sharing in OSX 1.8 « Mountain Lion ». It works well with PHP & HTML. But I stuck with 403 errors with images (jpg, png).

Do you have any idea why ?

Thx

share|improve this question
    
Are the images in the same directory as the (working) HTML files? –  Gerry Aug 23 '12 at 11:09
    
Yes, of course. If not i'd get a 404 not a 403. –  Matthieu Riegler Aug 23 '12 at 13:21
1  
Not necessarily, but anyway... Can you check the file permissions on the images you are trying to serve? –  Gerry Aug 23 '12 at 13:25
    
Just did before reading your comment. I don't know why, only the owner had read rights. Now it works well. Thx anyway for your help! –  Matthieu Riegler Aug 23 '12 at 13:28
    
Feel free to answer the question yourself then with your findings. Glad I could help. –  Gerry Aug 23 '12 at 13:37

2 Answers 2

up vote 0 down vote accepted

So as I said in the comments above, the problem was that only the owner of the file did have the rights to read the file.

A simple chmod +r on the file solved my problem.

share|improve this answer

Have a look at /var/log/apache2/error_log and try to identify your problem. I had :

[Fri Aug 31 13:31:20 2012] [error] [client ::1] Options FollowSymLinks or SymLinksIfOwnerMatch is off which implies that RewriteRule directive is forbidden: /Users/myname/Sites/

in my /etc/apache2/users/myname.conf i've replace

Options Indexes MultiViews AllowOverride All Order allow,deny Allow from all

by

Options Indexes FollowSymLinks MultiViews AllowOverride All Order allow,deny Allow from all

That just add FollowSymLinks in Options.

and it was great for me ...

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.