【发布时间】:2014-09-03 07:53:03
【问题描述】:
我已经在我的 Nginx 实例上配置了 SPDY 并使用 http://spdycheck.org/ 来确认它的设置,但是由于某些奇怪的原因 Nginx 将 https 重定向到默认的 Nginx 页面,我已经从启用的站点中删除了默认符号链接,重新启动服务器,但问题仍然存在。我的站点 conf 文件有:
server {
listen 443 spdy ssl;
server_name foobar;
ssl_certificate /etc/nginx/ssl/server.crt;
ssl_certificate_key /etc/nginx/ssl/server.key;
}
server {
listen 80;
server_name foobar;
return 301 https://sub.foobar.com$request_uri;
#error_page 404 = @notfound;
access_log /var/log/access.foobar.com.log;
error_log /var/log/error.foobar.com.log;
location / {
proxy_pass http://127.0.0.1:9030;
proxy_pass_header Server;
proxy_set_header Host $http_host;
proxy_redirect off;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Scheme $scheme;
proxy_connect_timeout 60;
proxy_read_timeout 120;
}
}
我需要进行哪些更改才能使其正常工作?
【问题讨论】:
-
这个问题似乎离题了,因为它与编程无关。请参阅帮助中心的What topics can I ask about here。也许Server Fault 或Webmaster Stack Exchange 会是一个更好的提问地点。
-
您是否尝试使用其他浏览器来检查问题是否仍然存在?有时浏览器会缓存一些重定向响应。