ssl - Safari fails to give response when using HTTP/2 -
i'm newcomer nginx (been using apache in past).
at moment i'm trying setup cache front apache backend, think (based on my, far, experience nginx) switch use nginx.
as turn on http2 safari cannot response. in error log there nothing indicates problem , if turn on access log , check there can see safari client many, many connections, it's keeps refreshing page.
i've tried numerous of nginx versions noticed there might problem latest stable. tried downgrading 1.9.14 upgrading 1.11.1, neither luck.
nginx compiled just:
./configure --with-http_ssl_module --with-http_v2_module
nginx -v output:
nginx version: nginx/1.11.1 built gcc 5.3.1 20160413 (ubuntu 5.3.1-14ubuntu2.1) built openssl 1.0.2g-fips 1 mar 2016 tls sni support enabled configure arguments: --with-http_ssl_module --with-http_v2_module
my config looks (my sites-available conf):
upstream backend { server 127.0.0.1:8088 weight=100; } server { listen 443 ssl http2 deferred; server_name www.server.name; ssl_protocols tlsv1 tlsv1.1 tlsv1.2; ssl_ciphers "ecdhe-ecdsa-aes128-gcm-sha256:ecdhe-rsa-aes128-gcm-sha256:ecdhe-rsa-aes256-gcm-sha384:ecdhe-ecdsa-aes256-gcm-sha384:dhe-rsa-aes128-gcm-sha256:dhe-dss-aes128-gcm-sha256:kedh+aesgcm:ecdhe-rsa-aes128-sha256:ecdhe-ecdsa-aes128-sha256:ecdhe-rsa-aes128-sha:ecdhe-ecdsa-aes128-sha:ecdhe-rsa-aes256-sha384:ecdhe-ecdsa-aes256-sha384:ecdhe-rsa-aes256-sha:ecdhe-ecdsa-aes256-sha:dhe-rsa-aes128-sha256:dhe-rsa-aes128-sha:dhe-dss-aes128-sha256:dhe-rsa-aes256-sha256:dhe-dss-aes256-sha:dhe-rsa-aes256-sha:!anull:!enull:!export:!des:!rc4:!3des:!md5:!psk"; ssl_prefer_server_ciphers on; ssl_certificate /path/to/cert.crt ssl_certificate_key /path/to/cert_key.key ssl_session_cache shared:ssl:10m; ssl_session_timeout 10m; add_header strict-transport-security "max-age=31536000; includesubdomains;"; location / { proxy_redirect off; proxy_set_header host $host; proxy_set_header x-real-ip $remote_addr; proxy_set_header x-forwarded_for $proxy_add_x_forwarded_for; proxy_pass https://backend; } }
if remove http2 listen argument , restart works fine...
i've search find out if i'm doing wrong in config cannot find anything... however, if there improvements config please let me know. main problem whenever hit url (cached or not) safari keeps loading.
this how access log looks after request:
123.123.123.123 - - [11/jun/2016:08:37:28 +0200] "get /example/url http/2.0" 200 15032 "-" "mozilla/5.0 (macintosh; intel mac os x 10_11_4) applewebkit/601.5.17 (khtml, gecko) version/9.1 safari/601.5.17" 123.123.123.123 - - [11/jun/2016:08:37:28 +0200] "get /example/url http/2.0" 200 15032 "-" "mozilla/5.0 (macintosh; intel mac os x 10_11_4) applewebkit/601.5.17 (khtml, gecko) version/9.1 safari/601.5.17" 123.123.123.123 - - [11/jun/2016:08:37:28 +0200] "get /example/url http/2.0" 200 15032 "-" "mozilla/5.0 (macintosh; intel mac os x 10_11_4) applewebkit/601.5.17 (khtml, gecko) version/9.1 safari/601.5.17" 123.123.123.123 - - [11/jun/2016:08:37:28 +0200] "get /example/url http/2.0" 200 15032 "-" "mozilla/5.0 (macintosh; intel mac os x 10_11_4) applewebkit/601.5.17 (khtml, gecko) version/9.1 safari/601.5.17" 123.123.123.123 - - [11/jun/2016:08:37:28 +0200] "get /example/url http/2.0" 200 15032 "-" "mozilla/5.0 (macintosh; intel mac os x 10_11_4) applewebkit/601.5.17 (khtml, gecko) version/9.1 safari/601.5.17" 123.123.123.123 - - [11/jun/2016:08:37:28 +0200] "get /example/url http/2.0" 200 15032 "-" "mozilla/5.0 (macintosh; intel mac os x 10_11_4) applewebkit/601.5.17 (khtml, gecko) version/9.1 safari/601.5.17" 123.123.123.123 - - [11/jun/2016:08:37:28 +0200] "get /example/url http/2.0" 200 15032 "-" "mozilla/5.0 (macintosh; intel mac os x 10_11_4) applewebkit/601.5.17 (khtml, gecko) version/9.1 safari/601.5.17"
thanks!
okey! after research , testing turned out needed hide upgrade header in config. proxy_hide_header upgrade;
read more here: https://trac.nginx.org/nginx/ticket/915
Comments
Post a Comment