On Sep 1, 3:39 am, Francis <f.du...@gmail.com> wrote:
> We setup a Nginx proxy in front of Apache/WSGI and got Nginx to handle
> the SSL cert and simply pass on a flag to WSGI if the connection was
> coming through http or https.
>
> Next you'll want a SSL middleware, we
> use:http://www.djangosnippets.org/snippets/240/
>
> Now its a matter of configuring which views you want SSL (follow
> example in the middleware)
You don't need a SSL middleware. Just add to your Apache
configuration:
SetEnvIf X-Forwarded-SSL on HTTPS=1
Apache/mod_wsgi will allow overriding of wsgi.url_scheme based on
HTTPS variable. The HTTPS variable can be set to 'On' or '1'. Case
ignored in comparison.
Thus, you can use mod_setenvif to check for header being set and what
value and then set HTTPS.
Graham
> On Aug 28, 11:04 pm, Vitaly Babiy <vbabi...@gmail.com> wrote:
>
>
>
> > Hey guys,
> > What is the best way to deploy an app that uses mod_wsgi that some parts of
> > it need to be behind SSL?
>
> > Thanks,
> > Vitaly Babiy
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to
django-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---