<html>
<head>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
Many thanks. <br>
<div class="moz-cite-prefix">On 11/04/2015 08:22 AM, Richard Stanway
wrote:<br>
</div>
<blockquote
cite="mid:CAKWQeygfXic2TU1b=vZqwhPTA7QBzvkmsDvi-4re7Tex_VGJBg@mail.gmail.com"
type="cite">
<div dir="ltr">You've set port 80 to listen with http2, but you're
not passing --http2 to curl so you're getting back an unexpected
binary http2 response. Due to lack of ALPN I suggest you don't
use http2 on port 80.</div>
<div class="gmail_extra"><br>
<div class="gmail_quote">On Tue, Nov 3, 2015 at 8:05 PM, steve <span
dir="ltr"><<a moz-do-not-send="true"
href="mailto:steve@greengecko.co.nz" target="_blank">steve@greengecko.co.nz</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">Hi folks,<br>
<br>
I'm having a problem with the configuration of my site...
basically, I use a default server config to redirect traffic
to my www. site under https, but the http: redirection
doesn't work.<br>
<br>
Here's the redirect server config:<br>
<br>
server {<br>
listen <a moz-do-not-send="true"
href="http://101.0.108.116:80" rel="noreferrer"
target="_blank">101.0.108.116:80</a> default http2;<br>
listen <a moz-do-not-send="true"
href="http://127.0.1.1:80" rel="noreferrer"
target="_blank">127.0.1.1:80</a> http2;<br>
listen [2401:fc00:0:106::6]:80 default http2;<br>
listen <a moz-do-not-send="true"
href="http://101.0.108.116:443" rel="noreferrer"
target="_blank">101.0.108.116:443</a> ssl default http2;<br>
listen [2401:fc00:0:106::6]:443 ssl default http2;<br>
<br>
ssl_certificate
/etc/nginx/ssl/wildcard.greengecko.co.nz.crt;<br>
ssl_certificate_key
/etc/nginx/ssl/wildcard.greengecko.co.nz.key;<br>
<br>
return 301 <a moz-do-not-send="true"
href="https://www.greengecko.co.nz" rel="noreferrer"
target="_blank">https://www.greengecko.co.nz</a>$request_uri;<br>
}<br>
<br>
and the return from interrogation of the https: site is
fine:<br>
<br>
$ curl --insecure -I <a moz-do-not-send="true"
href="https://greengecko.co.nz" rel="noreferrer"
target="_blank">https://greengecko.co.nz</a><br>
HTTP/1.1 301 Moved Permanently<br>
Server: nginx/1.9.6<br>
Date: Tue, 03 Nov 2015 19:02:58 GMT<br>
Content-Type: text/html<br>
Content-Length: 184<br>
Connection: keep-alive<br>
Location: <a moz-do-not-send="true"
href="https://www.greengecko.co.nz/" rel="noreferrer"
target="_blank">https://www.greengecko.co.nz/</a><br>
<br>
But with the http: site<br>
<br>
$ curl -I <a moz-do-not-send="true"
href="http://greengecko.co.nz" rel="noreferrer"
target="_blank">http://greengecko.co.nz</a> � ������ <br>
the return string, when dumped, looks like this:<br>
<br>
$ od -c /tmp/a<br>
0000000 \0 \0 022 004 \0 \0 \0 \0 \0 \0 003 \0 \0
\0 200 \0<br>
0000020 004 177 377 377 377 \0 005 \0 377 377 377 \0 \0
004 \b \0<br>
0000040 \0 \0 \0 \0 177 377 \0 \0 \0 \0 \b \a \0
\0 \0 \0<br>
0000060 \0 \0 \0 \0 \0 \0 \0 \0 001<br>
0000071<br>
<br>
This happened both with 1.9.5, and the current 1.9.6.<br>
<br>
Can anyone shed any light onto this?<br>
<br>
Cheers,<br>
<br>
Steve<span class="HOEnZb"><font color="#888888"><br>
<br>
<br>
<br>
<br>
<br>
-- <br>
Steve Holdoway BSc(Hons) MIITP<br>
<a moz-do-not-send="true"
href="http://www.greengecko.co.nz" rel="noreferrer"
target="_blank">http://www.greengecko.co.nz</a><br>
Linkedin: <a moz-do-not-send="true"
href="http://www.linkedin.com/in/steveholdoway"
rel="noreferrer" target="_blank">http://www.linkedin.com/in/steveholdoway</a><br>
Skype: sholdowa<br>
<br>
_______________________________________________<br>
nginx mailing list<br>
<a moz-do-not-send="true" href="mailto:nginx@nginx.org"
target="_blank">nginx@nginx.org</a><br>
<a moz-do-not-send="true"
href="http://mailman.nginx.org/mailman/listinfo/nginx"
rel="noreferrer" target="_blank">http://mailman.nginx.org/mailman/listinfo/nginx</a></font></span></blockquote>
</div>
<br>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
nginx mailing list
<a class="moz-txt-link-abbreviated" href="mailto:nginx@nginx.org">nginx@nginx.org</a>
<a class="moz-txt-link-freetext" href="http://mailman.nginx.org/mailman/listinfo/nginx">http://mailman.nginx.org/mailman/listinfo/nginx</a></pre>
</blockquote>
I've stripped http2 off port 80 and redirects are now working fine.<br>
<pre class="moz-signature" cols="72">--
Steve Holdoway BSc(Hons) MIITP
<a class="moz-txt-link-freetext" href="http://www.greengecko.co.nz">http://www.greengecko.co.nz</a>
Linkedin: <a class="moz-txt-link-freetext" href="http://www.linkedin.com/in/steveholdoway">http://www.linkedin.com/in/steveholdoway</a>
Skype: sholdowa</pre>
</body>
</html>