There are two recurring issues that I keep running into costing hours of fruitless Googling. Hopefully, this will help others:
SCRIPT_NAMEis evil! At least it’s useless in Django, and if present as a FastCGI parameter, Django will trip that away from your request URI and you’re almost certainly going to get
/no matter what URI you navigate to! So, save
SCRIPT_NAMEfor your PHP stuff, and leave it out of the parts where you expect to be talking to Django.
If you have
include fastcgi_paramsin your
nginx.conf, make sure it’s not hiding behind the
- If you want SSL to work, i.e. for Django to know that it is serving in
httpsmode, and to build proper
Locationheader for redirects, you need to include the following in the appropriate section of your
fastcgi_param HTTPS on;
Obviously, if you’re running both plain and SSL version, you shouldn’t be sharing that section or Django will just thinking that it is in SSL mode even when it’s not.
No related posts.
Related posts brought to you by Yet Another Related Posts Plugin.