<div dir="ltr">Hi,<div><br></div><div>Things are working great, thank you.</div><div><br></div><div>Joe</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Aug 14, 2015 at 12:13 PM, Valentin V. Bartenev <span dir="ltr"><<a href="mailto:vbart@nginx.com" target="_blank">vbart@nginx.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On Wednesday 12 August 2015 15:17:36 Joe Shaw wrote:<br>
> Hi,<br>
><br>
</span><div><div class="h5">> I've stripped out most of the SSL parameters, obfuscated a few paths and<br>
> removed a few unrelated rewrite rules, but here it is:<br>
><br>
> server {<br>
> listen 443 ssl http2 default_server;<br>
> listen [::]:443 ssl http2 default_server ipv6only=on;<br>
> server_name <a href="http://joeshaw.org" rel="noreferrer" target="_blank">joeshaw.org</a>;<br>
><br>
> charset utf-8;<br>
><br>
> ssl on;<br>
> ssl_certificate /etc/redacted.pem;<br>
> ssl_certificate_key /etc/redacted.key;<br>
><br>
> root /srv/www/<a href="http://joeshaw.org/" rel="noreferrer" target="_blank">joeshaw.org/</a>;<br>
> index index.html;<br>
> error_page 404 /404.html;<br>
><br>
> location / {<br>
> try_files $uri $uri/ $uri/index.html =404;<br>
> }<br>
> }<br>
><br>
> server {<br>
> listen 443 ssl http2;<br>
> listen [::]:443 ssl http2;<br>
> server_name <a href="http://www.joeshaw.org" rel="noreferrer" target="_blank">www.joeshaw.org</a>;<br>
> charset utf-8;<br>
> return 301 <a href="https://joeshaw.org" rel="noreferrer" target="_blank">https://joeshaw.org</a>$request_uri;<br>
> }<br>
><br>
> server {<br>
> listen 80 default_server;<br>
> listen [::]:80 default_server ipv6only=on;<br>
> server_name <a href="http://joeshaw.org" rel="noreferrer" target="_blank">joeshaw.org</a> <a href="http://www.joeshaw.org" rel="noreferrer" target="_blank">www.joeshaw.org</a>;<br>
> charset utf-8;<br>
> return 301 <a href="https://joeshaw.org" rel="noreferrer" target="_blank">https://joeshaw.org</a>$request_uri;<br>
> }<br>
><br>
> Hope this helps.<br>
><br>
> On a related note, after I was looking at my config I realized that I<br>
> probably wanted the second server clause to be the default_server (so it<br>
> always redirected to my main domain regardless of what Host/:authority<br>
> header was provided) and I tried swapping them. Then whenever I hit<br>
> <a href="https://joeshaw.org/" rel="noreferrer" target="_blank">https://joeshaw.org/</a> I was entered into a redirection loop. It seemed like<br>
> it was not checking the :authority pseudo-header and always serving from<br>
> the default_server.<br>
><br>
</div></div>[..]<br>
<br>
Thank you for the report.<br>
<br>
Both problems should be fixed in the new version of patch:<br>
<a href="http://nginx.org/patches/http2/" rel="noreferrer" target="_blank">http://nginx.org/patches/http2/</a><br>
<div class="HOEnZb"><div class="h5"><br>
wbr, Valentin V. Bartenev<br>
<br>
_______________________________________________<br>
nginx-devel mailing list<br>
<a href="mailto:nginx-devel@nginx.org">nginx-devel@nginx.org</a><br>
<a href="http://mailman.nginx.org/mailman/listinfo/nginx-devel" rel="noreferrer" target="_blank">http://mailman.nginx.org/mailman/listinfo/nginx-devel</a><br>
</div></div></blockquote></div><br></div>