http 网站升级 https
在 https 状态下打印 $_SERVER
["REQUEST_SCHEME"] => string(4) "http"
["SERVER_PROTOCOL"] => string(8) "HTTP/1.0"
等信息全是http,这是什么原因??
先谢谢大家回答,我的 $_server 全部都没有标识https;附上我的nginx 配置
server {
listen 80;
root /www;
server_name xx.com;
rewrite ^(.*)$ https://$host$1 permanent;
index index.html index.php index.htm;
location ~ \.php$ {
proxy_pass http://127.0.0.1:88;
include naproxy.conf;
}
location ~ /\.ht {
deny all;
}
location / {
try_files $uri @apache;
}
location @apache {
internal;
proxy_pass http://127.0.0.1:88;
include naproxy.conf;
}
}
server {
listen 443;
root /www;
ssl on;
ssl_certificate cert/xx.com.crt;
ssl_certificate_key cert/xx.com.key;
ssl_prefer_server_ciphers on;
ssl_session_timeout 10m;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
server_name xx.com;
index index.html index.php index.htm;
location ~ \.php$ {
proxy_pass http://127.0.0.1:88;
include naproxy.conf;
}
location ~ /\.ht {
deny all;
}
location / {
try_files $uri @apache;
}
location @apache {
internal;
proxy_pass http://127.0.0.1:88;
include naproxy.conf;
}
}
jeck猫
暮色呼如
人到中年有点甜
RISEBY
米脂