Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top
Alias /media/ /home/matt/repos/hello/media
<Directory /home/matt/repos/hello/media>
Options -Indexes
Order deny,allow
Allow from all
WSGIScriptAlias / /home/matt/repos/hello/wsgi/django.wsgi

/media is my directory. When I go to, it says 403 Forbidden. And, the rest of my site doesn't work because all static files are 404s. Why? The page loads. Just not the media folder.

Edit: hello is my project folder. I have tried 777 all my permissions of that folder.

share|improve this question
You also need to check the "execute" permission on all sub-folders all the way up to root to ensure the Apache user is permitted to list the directory contents. Next check your error.log file for the underlying cause. – PP. Mar 24 '10 at 12:50
up vote 1 down vote accepted

I solved it. I missed a trailing slash. after media/

share|improve this answer
Specifically, it was missing the trailing slash on the file system path. Thus 'Alias /media/ /home/matt/repos/hello/media/'. Read '…; for further examples. – Graham Dumpleton Mar 25 '10 at 22:19

It depends how the Aliases are applied, but it could be that all the requests are passed to Django. What do the logs tell you?

Try change the WSGIScriptAlias to e.g.

WSGIScriptAlias /wsgi/ /...

and see what happens.

share|improve this answer

Try with Options Indexes or Options +Indexes instead of Options -Indexes

From Apache doc

if all the options on the Options directive are preceded by a + or - symbol, the options are merged. Any options preceded by a + are added to the options currently in force, and any options preceded by a - are removed from the options currently in force.

share|improve this answer

The Options -Indexes directive instructs Apache to not generate directory listings in for that directory. Thus the 403 Forbidden when you try to access /media/. Try Options +Indexes, instead.

share|improve this answer

Your Answer


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.