我有一个启用了 SPDY 的 NGINX 前端服务器,它充当几个 IIS 后端服务器的代理。使用 Chrome、Opera Next 或 Firefox 时,SPDY 运行良好,但当我在 IE11 上加载我的网站时,SPDY 根本不起作用:
URL Protocol Method Result Type Received Taken Initiator
https://********index.php HTTPS GET 200 text/html 5.65 KB 78 ms refresh
相关 NGINX 配置:
http{
server_tokens off;
add_header X-Frame-Options SAMEORIGIN;
add_header X-Content-Type-Options nosniff;
add_header X-XSS-Protection "1; mode=block";
gzip_disable "msie6";
gzip_min_length 1100;
gzip_buffers 16 8k;
gzip_proxied any;
gzip_http_version 1.1;
gzip_types text/plain application/xml text/css text/js text/xml application/x-javascript text/javascript application/json application/xml+rss;
add_header Strict-Transport-Security max-age=31536000;
server {
listen 443 ssl spdy;
server_name #####;
ssl_session_cache shared:SSL:50m;
ssl_session_timeout 20m;
ssl_stapling on;
ssl_dhparam /#####.pem;
client_max_body_size 20M;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_pass_header Set-Cookie;
proxy_pass_header P3P;
ssl_certificate /########.crt;
ssl_certificate_key /########.key;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_prefer_server_ciphers on;
ssl_ciphers "EECDH+ECDSA+AESGCM EECDH+aRSA+AESGCM EECDH+ECDSA+SHA384 EECDH+ECDSA+SHA256 EECDH+aRSA+SHA384 EECDH+aRSA+SHA256 EECDH+aRSA+RC4 EECDH EDH+aRSA RC4 !aNULL !eNULL !LOW !3DES !MD5 !EXP !PSK !SRP !DSS";
client_body_buffer_size 128k;
proxy_buffering on;
proxy_buffers 8 8k;
proxy_buffer_size 8k;
proxy_busy_buffers_size 16k;
proxy_temp_file_write_size 1024m;
location / {
proxy_set_header X-Forwarded-Proto $scheme;
proxy_pass http://load_balancers;
proxy_next_upstream error timeout invalid_header http_500 http_502 http_503 http_504;
proxy_pass_header Set-Cookie;
proxy_pass_header P3P;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
add_header Front-End-Https on;
proxy_redirect off;
}
...
}
事实上,IE11 也会突然中止一些请求。我的 NGINX 版本是 1.7.3,运行在 CentOS 6 上。
我已经处理过这个问题并尝试自己进行研究但它似乎是一个特殊的问题。
提前致谢,任何想法都将受到赞赏。
答案1
Internet Explorer 11 不支持 SPDY/3.1,该协议在 nginx 1.7.3 中实现。因此它无法通过 SPDY 与 nginx 配合使用。
请注意,SPDY/3 和 SPDY/3.1 互相不兼容。