http2 problem??

steve steve at greengecko.co.nz
Tue Nov 3 19:05:58 UTC 2015


Hi folks,

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.

Here's the redirect server config:

server {
         listen  101.0.108.116:80 default http2;
         listen  127.0.1.1:80 http2;
         listen  [2401:fc00:0:106::6]:80 default http2;
         listen  101.0.108.116:443 ssl default http2;
         listen  [2401:fc00:0:106::6]:443 ssl default http2;

         ssl_certificate /etc/nginx/ssl/wildcard.greengecko.co.nz.crt;
         ssl_certificate_key /etc/nginx/ssl/wildcard.greengecko.co.nz.key;

         return 301 https://www.greengecko.co.nz$request_uri;
}

and the return from interrogation of the https: site is fine:

$ curl --insecure -I https://greengecko.co.nz
HTTP/1.1 301 Moved Permanently
Server: nginx/1.9.6
Date: Tue, 03 Nov 2015 19:02:58 GMT
Content-Type: text/html
Content-Length: 184
Connection: keep-alive
Location: https://www.greengecko.co.nz/

But with the http: site

$ curl -I http://greengecko.co.nz
�������

the return string, when dumped, looks like this:

$ od -c /tmp/a
0000000  \0  \0 022 004  \0  \0  \0  \0  \0  \0 003  \0  \0  \0 200 \0
0000020 004 177 377 377 377  \0 005  \0 377 377 377  \0  \0 004  \b \0
0000040  \0  \0  \0  \0 177 377  \0  \0  \0  \0  \b  \a  \0  \0  \0 \0
0000060  \0  \0  \0  \0  \0  \0  \0  \0 001
0000071

This happened both with 1.9.5, and the current 1.9.6.

Can anyone shed any light onto this?

Cheers,

Steve





-- 
Steve Holdoway BSc(Hons) MIITP
http://www.greengecko.co.nz
Linkedin: http://www.linkedin.com/in/steveholdoway
Skype: sholdowa



More information about the nginx mailing list