Is it possible to deploy a Django app on Apache + mod_wsgi (the standard way) but with HTTP authentication in front of the whole thing?
Basically, I need an extra layer of HTTP security before any user, Django-authenticated or anonymous, is even able to reach the app.
Is this possible? If so, where do the Apache auth directives go?
Yes, it’s possible.
With mod_wsgi on
/, any resources to be provided by apache need to be listed as aliases.Auth directives and host restrictions live in
Locationdirectives.So I’ve disabled any apache access restrictions on things like css, and provided host/ip based access to another directory.