刚配置好的nginx服务器 在安装fastadmin的时候出现重定向次数过多
配置文件
server{MAdeb1Zdl/wVRhMvzvs5MQ==listen 443;
ssl on;
server_name www.*****;
root /mnt/web/1-web/public;
#index index.php;
ssl_certificate /mnt/ssl/ssl.pem;
ssl_certificate_key /mnt/ssl/ssl.key;
location / {
index index.html index.htm index.php;
#主要是这一段一定要确保存在
if (!-e $request_filename) {
rewrite ^(.*)$ /index.php?s=/$1 last;
break;
}
#结束
#autoindex on;
}
location ~ (\.php|/)$ {
root /mnt/web/1-web/public;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME /mnt/web/1-web/public$fastcgi_script_name;
include fastcgi_params;
}
location ~ /.ht {
deny all;
}
rewrite ^([^\.]*|.*\.php|.*\.html|.*\.txt)$ /index.php break;
}