nginx禁止dedecms目录php执行权限的配置
类别:建站知识   时间:02-23

为了织梦dedecms的安全性,我们常常会禁止一些目录中php的执行权限,下面就是在nginx下禁止dedecms目录php执行权限的配置方法。
如下配置即可:

location ~ /mm/(data|uploads|templets)/*.(php)$ {deny all;}location ~ .php$ {try_files $uri /404.html;fastcgi_pass 127.0.0.1:9000;fastcgi_index index.php;fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;includefastcgi_params;}
说明:我的dedecms是安装在mm目录下的,如果你安装在根目录,要删除mm ,
完成!

智慧半岛,是一家专注于青岛网站建设青岛网站开发的青岛网络公司,Copyright ©2007-2019 Ebandao.Cn 版权所有 All Rights Reserved.(建议在1366x768以上的浏览器中访问)鲁ICP备08014496号

13153297890