有两个网站用这个配置,但另外一个好的,这个就提示重定向过多,帮忙看一下,配置如下:
server{
listen 443 ssl;
server_name
zhidao.xxxx.com;
index index.html index.htm index.php default.html default.htm default.php;
root /mnt/xxxx/zhidao;
ssl_certificate /mnt/xxxx/zhidao/zhidao.chained.crt;
ssl_certificate_key /mnt/xxxx/zhidao/zhidao.ikanfan.com.key;
ssl_ciphers "EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH";
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_prefer_server_ciphers on;
ssl_session_cache shared:SSL:10m;
include zhidao.conf;
#error_page 404 /404.html;
location ~ [^/]\.php(/|$)
{
# comment try_files $uri =404; to enable pathinfo
try_files $uri =404;
fastcgi_pass unix:/tmp/php-cgi.sock;
fastcgi_index index.php;
include fastcgi.conf;
#include pathinfo.conf;
}
location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$
{
expires 30d;
}
location ~ .*\.(js|css)?$
{
expires 12h;
}
access_log off;
}
server
{
listen 80;
server_name
zhidao.xxxx.com;
location /.well-known/ {
add_header Content-Type 'text/plain;';
root /mnt/xxxx/zhidao;
}
location / {
return 301
https://zhidao.xxxx.com$request_uri;
}
}