http2 problem??

steve steve at greengecko.co.nz
Tue Nov 3 19:51:08 UTC 2015


Many thanks.
On 11/04/2015 08:22 AM, Richard Stanway wrote:
> 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.
>
> On Tue, Nov 3, 2015 at 8:05 PM, steve <steve at greengecko.co.nz 
> <mailto:steve at greengecko.co.nz>> wrote:
>
>     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 <http://101.0.108.116:80> default
>     http2;
>             listen 127.0.1.1:80 <http://127.0.1.1:80> http2;
>             listen  [2401:fc00:0:106::6]:80 default http2;
>             listen 101.0.108.116:443 <http://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
>
>     _______________________________________________
>     nginx mailing list
>     nginx at nginx.org <mailto:nginx at nginx.org>
>     http://mailman.nginx.org/mailman/listinfo/nginx
>
>
>
>
> _______________________________________________
> nginx mailing list
> nginx at nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx
I've stripped http2 off port 80 and redirects are now working fine.

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

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.nginx.org/pipermail/nginx/attachments/20151104/87190fe1/attachment.html>


More information about the nginx mailing list