问题描述
我的网站具有SSL证书,我正在点击 https://mysite.com/info.php ,但未报告"PHP变量"部分下的_SERVER ["HTTPS"].我相信这会导致Drupal网站出现问题,其中某些URL是以https://...的形式写入页面的,而另一些URL是以http://...
My site has an SSL cert and I'm hitting https://mysite.com/info.php, but under the PHP Variables section _SERVER["HTTPS"] is not being reported. I believe this is causing a problem with a Drupal site where some URLs are being written to the page as https://... where others are being written as http://...
由什么决定是否设置_SERVER ["HTTPS"]?
What determines if _SERVER["HTTPS"] is set?
编辑:这可能是我的问题的答案.可能是负载平衡器问题
This may be the answer to my problem Detecting HTTPS vs HTTP on server sending back nothing useful. Could be a load balancer issue
推荐答案
事实证明,由于负载均衡器可处理SSL加密/解密,因此Web服务器无法获得$ _SERVER ["HTTPS"],但$ _SERVER ["HTTP_USESSL"]已设置,可以用作SSL流量的闪存.
It turns out that because of the Load Balancer, which handles the SSL encryption/decryption the Web Server doesn't get $_SERVER["HTTPS"], but $_SERVER["HTTP_USESSL"] is set and can be used as a flash for SSL traffic.
这篇关于_SERVER ["HTTPS"]为什么未设置为1?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!