#18591: Missing crucial info in Apache conf (httpd.conf) to serve static files -------------------------------------+------------------------------------- Reporter: rschuon@… | Owner: nobody Type: | Status: new Cleanup/optimization | Version: 1.4 Component: Documentation | Keywords: Apache, mod-wsgi, Severity: Normal | uWSGI, Static, Media Triage Stage: Unreviewed | Has patch: 0 Easy pickings: 0 | UI/UX: 0 -------------------------------------+------------------------------------- Your page: https://docs.djangoproject.com/en/1.3/howto/deployment/modwsgi/
To get Apache to be able to serve files statically, the handler (mod-wsgi, or uWSGI) must be disabled for those folders. So, you need another directive under the ones you list, that looks like this: {{{ <Location /static> SetHandler default-handler </Location> }}} I believe the /static location directive must occur after the / Location directive to turn the handler off correctly. This allows the request to be caught by Apache rather than uWSGI, and redirected to the static file folder. Also, the line: {{{ Alias /static/ /usr/local/wsgi/static/ }}} Should actually look like this: {{{ Alias /static /usr/local/wsgi/static/ }}} Without the trailing slash on the alias. -- Ticket URL: <https://code.djangoproject.com/ticket/18591> Django <https://code.djangoproject.com/> The Web framework for perfectionists with deadlines. -- You received this message because you are subscribed to the Google Groups "Django updates" group. To post to this group, send email to django-updates@googlegroups.com. To unsubscribe from this group, send email to django-updates+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-updates?hl=en.