Home > php教程 > php手册 > nginx下禁止目录运行php

nginx下禁止目录运行php

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-13 11:35:48
Original
816 people have browsed it

   nginx下禁止目录执行php的方法则简单许多,允许设定多个目录

  不知道是否我对apache那个不了解,如果有更好的办法,希望大家指出共享学习。thx

  location ~* ^/(attachments|images)/.*.(php|php5|PHP|PHP5)$

  {

  deny all;

  }

  当web目录不是根目录,或者有多个目录的时候可以是

  location ~* ^(/discuz/|/bbs/)/(attachments|images)/.*.(php|php5|PHP|PHP5)$

  {

  deny all;

  }

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Issues
Error restarting nginx
From 1970-01-01 08:00:00
0
0
0
server - Nginx configuration webapp problem
From 1970-01-01 08:00:00
0
0
0
Nginx default.conf problem
From 1970-01-01 08:00:00
0
0
0
centos7 - NGINX exception occurs
From 1970-01-01 08:00:00
0
0
0
nginx load balancing
From 1970-01-01 08:00:00
0
0
0
Popular Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template