欢迎访问热站网,开始您的建站营销之旅!!

您现在的位置: 首页>>建站知识>>维护安全

宝塔Nginx下禁网站某些特定目录下运行php

来源:热站网 发布时间:2023-12-15 12:50:20 热度:464 ℃

  #下面禁止了CSS,JS,UPLOADS等五个目录运行php脚本文件的权限
    location ~* ^/(css|js|uploads|fengshui|templets)/.*.(php)$ {
            deny all;
        }
        location ~ .php$ {
            fastcgi_pass   127.0.0.1:9000;
            fastcgi_index  index.php;
            fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;
            include        fastcgi_params;
        }
    error_page  404 /404.html;


本文地址:https://www.rezhanwang.com/weihu/2730.html

责任编辑:热站网
 
QQ在线咨询