ThinkPHP框架Nginx配置省略URL访问index.php
服务器
listen 80
服务器name 47.105.39.223;
index index.PHP index.htmlindex.htm default.PHP default.htm default.html;
root/www/wwwroot/szedu.com/public;
# SSLstartssl相关配置。 请勿删除或修改以下行中带有注释的404规则
#error_page 404/404.html;
# SSL结束
# errorpagestart错误页面配置、注释、删除或修复
错误page 404/404.html;
错误page 502/502.html;
# error页结束
# PHPinfostart PHP参考配置、注释或可以修改
包含启用PHP71.conf;
# PHP信息结束
# rewritestarturl将改写规则引用,更改后面板设置中的伪静态规则将失效
include/www/server/panel/vhost/rewrite/szedu.com.conf;
# rewrite结束
#禁止访问的文件或目录
位置/((.user.ini (.htaccess (.git (.SVN (.project license readme.MD ) ) )。
返回404;
#一键申请有关SSL证书认证目录的设置
位置. well知识库
allow all;
#开始PHP
位置/
if (! ~~ $ request文件名称)
rewrite^(.*$/index.PHP? =$ 1最后一名;
黑;
从位置. PHP#中移除$
# root 99:/wwwroot/szedu.com/public; 写了,但在这里不写
fastcgipass 127.0.0.1:4571;
fastcgi_index index.php;
fastcgi剥离pathinfo (. PHP ).* ) $; #增加这篇文章
fastcgiparam pathinfo $ fastcgipathinfo; #增加这篇文章
fastcgiparam script文件名称$文档root $ fastcgiscript名称;
include fastcgi参数;
# en d99 Come Come Everybody PHP
accesslog/www/www logs/szedu.com.log;
errorlog/www/www logs/szedu.com.error.log;
转载于:https://www.cn blogs.com/Zhidong Jian //10122088.html