我正在解决这个问题,所以我真的很感激一些帮助:/
我正在使用Turpentine和Magento 1.7 CE和Varnish 3,它工作正常.现在我想添加SSL加密功能并不是那么好用.
SSL加密由Pound终止(在443上监听)然后将数据提供给Varnish(监听6081)并最终提供给Nginx(8080).问题是所有生成的URL(产品链接,类别……)都是使用HTTP而不是HTTPS生成的.
我试图将不安全的基本URL设置为https,但这完全打破了我的网站(我有一个404“嵌入循环”,它从未停止加载).
SSL卸载似乎有效,因为所有资源都使用HTTPS加载(如果我搞乱了Magento中的SSL Offloading设置,我会收到有关混合内容的警告).
[...]
_SERVER["HTTPS"] on
_SERVER["HTTP_SSL_OFFLOADED"] 1
[...]
我的配置:
Magento(我认为最重要的部分):
Auto-redirect to Base URL: No
Use Web Server Rewrites: Yes
Unsecure Base URL: http://myurl.com
Secure Base URL: https://myurl.com
Use Secure URLs in Frontend: Yes
Offloader Header: HTTP_SSL_OFFLOADED
磅:
ListenHTTPS
Address 0.0.0.0
Port 443
Cert "/path/to/my/cert.pem"
xHTTP 2
RewriteLocation 1
Ciphers "RC4:!SSLv2:!ADH:!aNULL:!eNULL:!NULL:!LOW:!EXP"
AddHeader "Ssl-Offloaded: 1"
End
Service
BackEnd
Address 127.0.0.1
Port 6081
End
End
Varnish使用Turpentine-Config(没有SSL即可正常工作)
Nginx的:
server {
listen 8080 default_server;
root /var/www/mysite.at;
index index.PHP;
server_name _;
location / {
try_files $uri $uri/ /index.PHP;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/Nginx/www;
}
location ~ \.PHP${
fastcgi_split_path_info ^(.+\.PHP)(/.+)$;
fastcgi_pass unix:/var/run/PHP5-fpm.sock;
fastcgi_index index.PHP;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param HTTPS on;
}
location ~ /\.ht {
deny all;
}
}
我真的没有想法:(如果需要,我很乐意提供有关我配置的更多详细信息.
解决方法:
事实证明我有多个问题.
> Nginx配置为“location /”:
location / {
try_files $uri $uri/ @handler;
}
location @handler {
rewrite / /index.PHP;
}
没有它,没有ajax调用可行.
> Magento配置中不安全的基本URL需要包含“https”
> Turpentine必须使用ESI的HTTP URL,而不是HTTPS.此提交中显示了必要的更改:
https://github.com/eth8505/magento-turpentine/commit/575f499382217f0013eaf097fd79ceddec0b4381
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。