Fork me on GitHub

Deploy Django behind a reverse proxy

By default, Django will assume that your root URL is the root (/) of your domain.

Using a reverse proxy, we can run multiple django instances on the same server, using the same domain. (,, ...)

Many redirects of your application will then be broken (most notable is validation of login form). You can fix that by forcing the root URL in your settings


If you use Sentry, you'll also have to set


Comments !