Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I have a django project hosted over nginx with fastcgi. Django has some urls that user cyrillic characters. But when I try to open page with such link, django tells that it doesn't have such model, because the link got escaped and is taken to django as "%D0%BA%D0%BD%D0%B8%D0%B3%D0%B8". On apache the same project works fine. What option do I need to tell nginx not to escape links like that?

share|improve this question
    
It might help to do a bit more research first and report back what you've found. –  Drew Khoury Aug 27 '13 at 13:56
    
What research? I haven't found anything like that over the internet, and I don't have any more clues. –  neko259 Aug 27 '13 at 14:33
    
I used code.djangoproject.com/wiki/DjangoAndNginx for configuration –  neko259 Aug 27 '13 at 14:36

2 Answers 2

up vote 1 down vote accepted

The fastcgi_param directive determines what variables are passed to the FastCGI application. You may be passing $request_uri which is the raw URI while Django expects a decoded URI which is in the $uri variable.

share|improve this answer

For Django 1.6> according to the changes... this settings are no longer necessary, https://code.djangoproject.com/wiki/BackwardsIncompatibleChanges#ChangedthewayURLpathsaredetermined I have commented out both the Path info and Script Name lines in fastcgi_params (in Debian-like cases) or in the nginx.conf (RHEL cases)

share|improve this answer

Your Answer

 
discard

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.