thinkphp配置nginx伪静态并解决PATHINFO问题和fix_pathinfo漏洞
来源:互联网 发布:手机自动应答软件 编辑:程序博客网 时间:2024/05/02 02:11
nginx.conf的server配置,当文件不存在时,就采用伪静态
server{ listen 801; index index.html index.htm index.php; root D:/data/code/jsjh-admin/wwwroot; location /{ if (!-e $request_filename) { rewrite ^(.*)$ /index.php$1 last; } } include dotphp.conf;}
dotphp.conf配置php的PATH_INFO
location ~ (\.php$|\.php/) { #定义变量 $path_info ,用于存放pathinfo信息 set $path_info ""; #定义变量 $real_script_name,用于存放真实地址 set $real_script_name $fastcgi_script_name; #如果地址与引号内的正则表达式匹配 if ($fastcgi_script_name ~ "^(.+?\.php)(/.+)$") { #将文件地址赋值给变量 $real_script_name set $real_script_name $1; #将文件地址后的参数赋值给变量 $path_info set $path_info $2; } fastcgi_index index.php; include fastcgi_params;#先载入默认的 #然后在下面加就能覆盖默认的配置 fastcgi_param SCRIPT_FILENAME $document_root$real_script_name; fastcgi_param SCRIPT_NAME $real_script_name; fastcgi_param PATH_INFO $path_info; if (-e $document_root$real_script_name){ fastcgi_pass 127.0.0.1:9000; }}
配置php.ini解决nginx文件类型错误解析漏洞
[PHP]cgi.fix_pathinfo=0;设0可解决nginx文件类型错误解析漏洞
0 0
- thinkphp配置nginx伪静态并解决PATHINFO问题和fix_pathinfo漏洞
- nginx+thinkphp下解决pathinfo的问题
- nginx的fix_pathinfo漏洞
- ThinkPHP Nginx pathinfo rewrite 配置
- 在Nginx上部署ThinkPHP,解决Pathinfo问题
- 解决thinkphp在不支持pathinfo的nginx上的问题
- Thinkphp 伪静态Nginx配置方式
- Nginx 下配置支持thinkphp 伪静态
- 配置修改Nginx支持ThinkPHP的PATHINFO
- nginx配置 thinkphp需要的pathinfo
- LNMP 配置NGINX 支持THINKPHP PATHINFO模式
- thinkphp nginx下面完美配置解决404 file not found(让nginx支持PATHINFO路由模式)
- 关于wdcp伪静态。pathinfo的配置。
- ThinkPHP 伪静态问题
- thinkPHP在apache和IIS,nginx下的伪静态配置
- nginx配置location对thinkphp伪静态影响
- 解决ThinkPHP在nginx下的pathinfo问题即url问题
- thinkcmf5 nginx配置pathinfo和安装过程中的问题
- WINDOWS计划任务设置MYSQL自动备份
- 深入理解ISO七层模型
- FileZilla Client Windows 2003 最新可用版本
- IIS的URL REWRITE功能设置
- VC运行库相关地址
- thinkphp配置nginx伪静态并解决PATHINFO问题和fix_pathinfo漏洞
- iptables配置允许vpnserver(softether vpn)
- MYSQL存储过程:批量更新数据
- MYSQL存储过程:批量更新数据2(产品品牌)
- org.json.JSONException: Value of type java.lang.String cannot be converted to JSONObject
- 让阿里云支持ipv6(其他多数VPS通用)
- LeetCode 28. Implement strStr()
- 柬埔寨手机上网资费套餐(3G/4G上网)
- JavaScript 变量 的一些认识