【发布时间】:2013-10-23 18:46:34
【问题描述】:
最后我切换到 nginx 网络服务器。但是每次我访问例如http://mywebsite.com时,它都会将我重定向到https://mywebsite.com。我的服务器块(虚拟主机)中没有任何 ssl 选项。这里是精简版(仅删除了帮助 cmets):
server {
listen 80;
root /usr/share/nginx/www/mywebsite/htdocs;
index index.php index.html index.htm;
server_name mywebsite.com;
location / {
try_files $uri $uri/ /index.html;
}
location ~ \.php$ {
fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_index index.php;
fastcgi_param CONTEXT Staging;
include fastcgi_params;
}
}
我真的不知道我是否在正确的位置搜索错误?!
PS:PHP 回复我["SERVER_PROTOCOL"]=> string(8) "HTTP/1.1"
感谢您的建议!
【问题讨论】:
标签: http redirect ssl https nginx