Gotcha, thanks for the tip!  I'll look into it.

On Oct 19, 4:56 pm, Graham Dumpleton <[email protected]>
wrote:
> What are you setting in nginx configuration to actually set one of the 
> headers?
>
> They need to be set by nginx when it is proxying through to backend
> and it does not do that by default.
>
> Graham
>
> On 20 October 2011 02:19, Toby <[email protected]> wrote:
>
>
>
>
>
>
>
> > My setup:
>
> > Ubuntu 10.10
> > nginx 0.7.67 (serves static files)
> > Apache 2.2.16 MPM Worker (serves django requests upstreamed through
> > nginx)
> > mod_wsgi 3.3 (Daemon Mode)
> > Django 1.2
> > Everything running through SSL
>
> > Overall, with the help of this discussion board, I have everything
> > running pretty well!!
>
> > But I've got a seemingly random Internet Explorer 8 issue, where some
> > clients are seemingly losing their session at random points.  And I
> > noticed that sometimes, when my django app is redirecting, it
> > redirects to HTTP urls, instead of HTTPS.  Other browsers seem to work
> > just fine, but Internet Explorer doesn't like it, randomly, sigh.
>
> > In the error reports, I noticed this:
>
> >  'wsgi.url_scheme': 'http',
>
> > This is in my .wsgi script:
>
> > import os
> > import sys
> > sys.path.append('/home/rubrics.forallschools.com/')
> > os.environ['DJANGO_SETTINGS_MODULE'] = 'forallschools.settings-sandi'
> > import django.core.handlers.wsgi
> > _application = django.core.handlers.wsgi.WSGIHandler()
> > def application(environ, start_response):
> >    # trick django into thinking proxied traffic is coming in via
> > HTTPS
> >    # HTTP_X_FORWARDED_SSL is used on WebFaction
> >    if environ.get("HTTP_X_FORWARDED_PROTOCOL") == "https" or
> > environ.get("HTTP_X_FORWARDED_SSL") == "on":
> >        environ["wsgi.url_scheme"] = "https"
> >    return _application(environ, start_response)
>
> > This still doesn't seem to be forcing https.  Any thoughts?
>
> > --
> > You received this message because you are subscribed to the Google Groups 
> > "modwsgi" group.
> > To post to this group, send email to [email protected].
> > To unsubscribe from this group, send email to 
> > [email protected].
> > For more options, visit this group 
> > athttp://groups.google.com/group/modwsgi?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
"modwsgi" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/modwsgi?hl=en.

Reply via email to