我试图用nginx 1.6.0启用spdy,但是spdycheck.org给我两个抱怨:

和

我的nginxconfiguration文件是这样的:
server { listen 80; listen 443 ssl spdy; server_name 54.201.32.118; ssl_certificate /etc/nginx/ssl/tulio.crt; ssl_certificate_key /etc/nginx/ssl/tulio.key; if ($ssl_protocol = "") { rewrite ^ https://$server_name$request_uri? permanent; } root /usr/share/nginx/html; index index.html index.htm; location / { # First attempt to serve request as file, then # as directory, then fall back to displaying a 404. try_files $uri $uri/ =404; # Uncomment to enable naxsi on this location # include /etc/nginx/naxsi.rules } }
spdycheck的其他信息,你可以在这里find:
http://spdycheck.org/#54.201.32.118
尝试一个单独的server块为http:
server { listen 80; server_name 54.201.32.118; rewrite ^ https://$server_name$request_uri? permanent; }
并删除listen 80; 从第一个server块。
还要确保SSL证书具有54.201.32.118作为通用名称。
他们都很清楚。
您的SSL证书无效,因此是第一个警告。
你似乎用301redirectredirectHTTP到HTTPS,所以你已经完成了第二个警告build议。
SPDY工作正常! 但
SSL证书不受信任
证书不是由受信任的权威机构签署的。 如果您从可信机构购买了证书,则可能只需要安装一个或多个中间证书。 请联系您的证书提供商以获得有关为您的服务器平台执
第二部分是:
server { listen 80; server_name example.com; return 301 https://www.example.com$request_uri; } server { listen 443 spdy ssl; server_name www.example.com;