我在我的NGINX服务器上有HTTP2协议的问题,这是我的configuration
listen 443 ssl http2; server_name adomain.com; root /var/www/project; limit_req zone=one burst=60 nodelay; add_header Strict-Transport-Security "max-age=2592000; includeSubdomains;" always; ssl_certificate /etc/letsencrypt/live/fullchain.pem; ssl_certificate_key /etc/letsencrypt/live/privkey.pem; ssl_protocols TLSv1 TLSv1.1 TLSv1.2; ssl_ciphers "EECDH+AESGCM:EDH+AESGCM:ECDHE-RSA-AES128-GCM-SHA256:AES256+EECDH:DHE-RSA-AES128-GCM-SHA256:AES256+EDH:ECDHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-SHA256:ECDHE-RSA-AES256-SHA:ECDHE-RSA-AES128-SHA:DHE-RSA-AES256-SHA256:DHE-RSA-AES128-SHA256:DHE-RSA-AES256-SHA:DHE-RSA-AES128-SHA:ECDHE-RSA-DES-CBC3-SHA:EDH-RSA-DES-CBC3-SHA:AES256-GCM-SHA384:AES128-GCM-SHA256:AES256-SHA256:AES128-SHA256:AES256-SHA:AES128-SHA:DES-CBC3-SHA:HIGH:!aNULL:!eNULL:!EXPORT:!DES:!MD5:!PSK:!RC4"; ssl_prefer_server_ciphers on; ssl_session_cache shared:SSL:10m; ssl_session_timeout 10m; ssl_dhparam /etc/nginx/ssl/dhparam.pem; resolver 8.8.8.8; ssl_stapling on; ssl_stapling_verify on; keepalive_timeout 70;
我看不到我的iOS设备上的错误(safari 11),很奇怪,网页是一个SPA(angular度),应用程序向API发出请求,应用程序通过HTTP2加载,但是当应用程序必须向API失败,从listen禁用HTTP2会使所有事情都按照预期工作
两个服务器前端/后端的密码是相同的
在Chrome / Firefox / IE工作正常,我不知道Safari或我的服务器configuration有什么问题
当Safari失败时,error.log和adomain-error.log是空的
Nginx版本
nginx version: nginx/1.12.2 built by gcc 4.8.5 20150623 (Red Hat 4.8.5-16) (GCC) built with OpenSSL 1.0.2k-fips 26 Jan 2017 TLS SNI support enabled configure arguments: --prefix=/etc/nginx --sbin-path=/usr/sbin/nginx --modules-path=/usr/lib64/nginx/modules --conf-path=/etc/nginx/nginx.conf --error-log-path=/var/log/nginx/error.log --http-log-path=/var/log/nginx/access.log --pid-path=/var/run/nginx.pid --lock-path=/var/run/nginx.lock --http-client-body-temp-path=/var/cache/nginx/client_temp --http-proxy-temp-path=/var/cache/nginx/proxy_temp --http-fastcgi-temp-path=/var/cache/nginx/fastcgi_temp --http-uwsgi-temp-path=/var/cache/nginx/uwsgi_temp --http-scgi-temp-path=/var/cache/nginx/scgi_temp --user=nginx --group=nginx --with-compat --with-file-aio --with-threads --with-http_addition_module --with-http_auth_request_module --with-http_dav_module --with-http_flv_module --with-http_gunzip_module --with-http_gzip_static_module --with-http_mp4_module --with-http_random_index_module --with-http_realip_module --with-http_secure_link_module --with-http_slice_module --with-http_ssl_module --with-http_stub_status_module --with-http_sub_module --with-http_v2_module --with-mail --with-mail_ssl_module --with-stream --with-stream_realip_module --with-stream_ssl_module --with-stream_ssl_preread_module --with-cc-opt='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -fPIC' --with-ld-opt='-Wl,-z,relro -Wl,-z,now -pie'
UPDATE
我的iPhone上的控制台说Protocol error所以我很确定这是IOS 11的错误
更新2
我find了这个post
https://www.nginx.com/blog/http2-theory-and-practice-in-nginx-stable-13/
它解释说,如果你支持TLSv <1.2,你最终会出现一个PROTOCOL ERROR ,在我的服务器configuration中只剩下TLSv1.2让应用程序再次运行,但是它有问题,有些请求会失败……这超出了我的理解,一次再次在Chrome / Firefox的工作,但在我的移动Safari浏览器不