Although I'm using apache I found that adding:
HTTPS_PATHS = ('admin/', 'checkout/', 'settings/')
to my settings.py file and ensuring I had the SSLRedirectMiddleware enabled
that I didn't need any rewrite rules in my configs...
Perhaps the same would work for you?
On Wed, Oct 21, 2009 at 8:19 PM, neridaj <[email protected]> wrote:
>
> correction, the rewrite rule isn't rewriting the url. If I manually
> enter https://domain.com/shop/checkout/ I get an infinite loop. I
> can't get nginx to rewrite http:// to https:// using:
>
> # rewrite for secure checkout
> location ~ ^/shop/checkout/ {
> rewrite ^/(.*) https://dzopastudio.com/$1 permanent;
> }
>
>
> On Oct 21, 3:58 pm, neridaj <[email protected]> wrote:
> > I can't get ssl working on my checkout pages and found a post about
> > adding a rewrite rule for nginx but when I do this firefox tells me
> > I've created an infinite loop i.e., "Firefox has detected that the
> > server is redirecting the request for this address in a way that will
> > never complete." I have proxy_set_header X-Url-Scheme $scheme; in my
> > nginx.conf and my wsgi wrapper is as follows:
> >
> > import os, sys
> >
> > apache_configuration= os.path.dirname(__file__)
> > project = os.path.dirname(apache_configuration)
> > workspace = os.path.dirname(project)
> > sys.path.append(workspace)
> >
> > os.environ['DJANGO_SETTINGS_MODULE'] = 'myproject.settings'
> >
> > import django.core.handlers.wsgi
> >
> > _application = django.core.handlers.wsgi.WSGIHandler()
> >
> > def application(environ, start_response):
> > environ['wsgi.url_scheme'] = environ.get('HTTP_X_URL_SCHEME',
> > 'http')
> > return _application(environ, start_response)
> >
>
--
http://www.sudovi.com/
http://www.twitter.com/lifewithryan
http://www.thecommontongue.com
http://www.lifewithryan.com/
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Satchmo users" 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/satchmo-users?hl=en
-~----------~----~----~----~------~----~------~--~---