Re: Incorrect redirect protocol when behind a reverse proxy

2013-07-30 Thread Glenn Maynard
On Thu, Jul 25, 2013 at 1:41 PM, Jonathan Matthews wrote: > I've just got to a box and can ACK that. I can make that stop with a > correctly configured try_files, which I would always choose to have > set up, myself. That may not be a solution for you however. > > Here's a way I've just tested (on

Re: Incorrect redirect protocol when behind a reverse proxy

2013-07-25 Thread Jonathan Matthews
On 25 July 2013 17:14, Glenn Maynard wrote: > On Thu, Jul 25, 2013 at 10:53 AM, Jonathan Matthews > wrote: >> >> On my phone's browser, searching for that module name doesn't bring me >> anything useful I'm afraid. Are you just serving local files off disk? > > src/http/modules/ngx_http_static_mo

Re: Incorrect redirect protocol when behind a reverse proxy

2013-07-25 Thread Glenn Maynard
On Thu, Jul 25, 2013 at 10:53 AM, Jonathan Matthews wrote: > On my phone's browser, searching for that module name doesn't bring me > anything useful I'm afraid. Are you just serving local files off disk? > src/http/modules/ngx_http_static_module.c. This is where the trailing-slash redirects ori

Re: Incorrect redirect protocol when behind a reverse proxy

2013-07-25 Thread Jonathan Matthews
On 25 Jul 2013 15:43, "Glenn Maynard" wrote: > > On Thu, Jul 25, 2013 at 5:11 AM, Jonathan Matthews < cont...@jpluscplusm.com> wrote: >> >> What does this mean? Do you see SSL traffic, or do you mean heroku terminates the ssl leaving you with http connections only? > > Heroku handles SSL, and ngin

Re: Incorrect redirect protocol when behind a reverse proxy

2013-07-25 Thread Glenn Maynard
On Thu, Jul 25, 2013 at 5:11 AM, Jonathan Matthews wrote: > What does this mean? Do you see SSL traffic, or do you mean heroku > terminates the ssl leaving you with http connections only? > Heroku handles SSL, and nginx sees only HTTP traffic. > > This mostly works fine, but nginx has one proble

Re: Incorrect redirect protocol when behind a reverse proxy

2013-07-25 Thread Jonathan Matthews
On 24 Jul 2013 23:03, "Glenn Maynard" wrote: > > Our nginx server is running on Heroku, which proxies SSL. What does this mean? Do you see SSL traffic, or do you mean heroku terminates the ssl leaving you with http connections only? > This mostly works fine, but nginx has one problem with it: si

Incorrect redirect protocol when behind a reverse proxy

2013-07-24 Thread Glenn Maynard
Our nginx server is running on Heroku, which proxies SSL. This mostly works fine, but nginx has one problem with it: since it thinks the protocol is http, any redirects (such as trailing-slash redirects) go to http instead of https. The usual fix for this is X-Forwarded-Proto, but nginx doesn't s