问题描述
我也跟着本指南并成功安装在我的服务器,工作过程如下:
I followed this guide and successfully setup my server which works as follows:
通过https
观众> Nginx的(端口443)> SSL终止>光油(80端口)>的Apache(8080端口)
Visitor > Nginx (port 443) > SSL Termination > Varnish (port 80) > Apache (port 8080)
通过HTTP
观众>光油(80端口)>的Apache(8080端口)
Visitor > Varnish (port 80) > Apache (port 8080)
现在,当我访问我的网站上HTTPS,这是不言而喻的死循环。我上的浏览器页面没有正确重定向错误。
Now when I visit my site on HTTPS, it goes on "endless loop". I get "Page isn't redirecting properly" error on the browser.
我想告诉Apache对HTTPS返回响应如下:
I tried to tell Apache to return response on HTTPS as follows:
添加到了我的Nginx的配置:
Added this to my Nginx config:
proxy_set_header的X转发协议$方案;
proxy_set_header X-Forwarded-Protocol $scheme;
还增加了这对我的.htaccess文件:
Also added this to my .htaccess file:
如果($ _ SERVER ['HTTPS']!== ON){
SetEnvIf之后的X转发协议HTTPS HTTPS =上
if ($_SERVER['HTTPS'] !== on) {SetEnvIf X-Forwarded-Protocol https HTTPS=on
什么是可能会错?我需要什么配置出来的循环?
What possibly is going wrong? What do I need to configure to come out of the loop?
请注意:我在Ubuntu 12.04上运行光油3.0
NOTE: I'm running Varnish 3.0 on Ubuntu 12.04.
推荐答案
尝试使用的时候离开了清漆的路径HTTPS
Try leaving Varnish out of the path when using HTTPS
所以...而不是== >>
So... instead of ==>>
观众> Nginx的(端口443)> SSL终止>光油(80端口)>的Apache(8080端口)
Visitor > Nginx (port 443) > SSL Termination > Varnish (port 80) > Apache (port 8080)
只要使用此== >>
Just use this ==>>
观众> Nginx的(端口443)> SSL终止>阿帕奇(8080端口)
Visitor > Nginx (port 443) > SSL Termination > Apache (port 8080)
这篇关于清漆3.0在Ubuntu 12.04 [无限循环的问题] Nginx的SSL终止的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!