nginx制止指定名目运转php
发布时间:09/01 来源:未知 浏览:
关键词:
引荐:《PHP教程》
1、制止某一个名目施行php
location ~* ^/download/.*\.(php|php5)$ { deny all; }
2、制止多个名目施行php
location ~* ^/(download|down)/.*\.(php|php5)$ { deny all; }
留意:要写在php配置前,下面是一个示例
location ~* ^/(download|down)/.*\.(php|php5)$ { deny all; } location ~ [^/]\.php(/|$) { try_files $uri =404; fastcgi_pass unix:/tmp/php-cgi.sock; fastcgi_index index.php; include fastcgi.conf; }
以上就是nginx制止指定名目运转php的具体内容,更多请关注百分百源码网其它相关文章!