<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">2015-08-26 18:20 GMT+02:00 Edho Arief <span dir="ltr"><<a href="mailto:me@myconan.net" target="_blank">me@myconan.net</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On Thu, Aug 27, 2015 at 12:52 AM, Etienne Champetier<br>
<span class=""><<a href="mailto:champetier.etienne@gmail.com">champetier.etienne@gmail.com</a>> wrote:<br>
><br>
><br>
> 2015-08-26 17:36 GMT+02:00 Edho Arief <<a href="mailto:me@myconan.net">me@myconan.net</a>>:<br>
>><br>
>> On Thu, Aug 27, 2015 at 12:30 AM, Etienne Champetier<br>
>> <<a href="mailto:champetier.etienne@gmail.com">champetier.etienne@gmail.com</a>> wrote:<br>
>> > Hi,<br>
>> ><br>
>> > I have this setup<br>
>> > browser -> ssl proxy -> nginx<br>
>> > browser to ssl proxy is https only<br>
>> > ssl proxy to nginx is http only<br>
>> ><br>
>> > now i browse to "<a href="https://exemple.com/aaa" rel="noreferrer" target="_blank">https://exemple.com/aaa</a>", where aaa is a directory,<br>
>> > so nginx send back a 301 redirect with "Location:<br>
>> > <a href="http://exemple.com/aaa/" rel="noreferrer" target="_blank">http://exemple.com/aaa/</a>"<br>
>> ><br>
>> > Is it possible to send https instead of http (in Location),<br>
>> > or send a relative header, like "Location: /aaa/",<br>
>> > or just disable this redirection (in my case it's ok)<br>
>> ><br>
>><br>
>> see if proxy_redirect[1] fits your need.<br>
>><br>
>> <a href="http://nginx.org/r/proxy_redirect" rel="noreferrer" target="_blank">http://nginx.org/r/proxy_redirect</a><br>
>><br>
> nginx isn't a proxy here, it's a backend (no proxy_pass in my conf)<br>
> ssl proxy is a black box (not an nginx)<br>
><br>
<br>
</span>whoops right, sorry.<br>
<br>
This seems to work:<br>
<br>
if (-d $request_filename) { return 301 https://$host$uri/; }<br></blockquote><div><br></div><div>thanks, will try tomorrow<br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="HOEnZb"><div class="h5"><br>
_______________________________________________<br>
nginx mailing list<br>
<a href="mailto:nginx@nginx.org">nginx@nginx.org</a><br>
<a href="http://mailman.nginx.org/mailman/listinfo/nginx" rel="noreferrer" target="_blank">http://mailman.nginx.org/mailman/listinfo/nginx</a><br>
</div></div></blockquote></div><br></div></div>