satchmo.shop.SSLMiddleware.SSLRedirect is my last entry in MIDDLEWARE_CLASSES
I have 'Enable SSL' set in my Shop Options.
I'm using Nginx as a frontend to Apache/mod_python and I can manually
get to SSL pages fine.
Any thoughts on where to start digging?
--
Pete
Have you considered just having Nginx do the redirect?
As an aside, you can do away with Apache altogether by using CherryPy's
wsgiserver and proxying to it from Nginx.
Cliff
yes.
>
> You could try to put some debugging in the context processor to see if it is
> getting called correctly and returning the required url.
What's the best way to do that w/ mod_python since prints won't work?
Here's the result:
secure False
self <satchmo.shop.SSLMiddleware.SSLRedirect instance at 0x2c4f098>
view_args ()
view_func <function _checklogin at 0x45e05f0>
view_kwargs {}
Notice secure=False and view_kwargs is empty with both boxes in my
shop options for SSL checked. Any thoughts?
I think I know the problem. Nginx handles all the requests, then
proxies Django stuff to Apache. Apache isn't setup to do SSL. It looks
like the middleware is trying to redirect my internal Apache URL to
SSL instead of the outward facing URL with Nginx.
I'll probably just setup Nginx to redirect unless anybody has a better
suggestion.
--
Pete
For anybody else who runs into this, here's what that nginx config
would look like:
location ~ ^/shop/checkout {
rewrite ^/(.*) https://mydomain.com/$1 permanent;
}