首页 » Linux » 阅读文章

nginx下禁止某目录运行php脚本

2011-11-02 12:00 3945 0 发表评论
标签:

nginx里面禁用目录下文件php执行权限

location /upload/ {
location ~ .*\.(php)?$
{
deny all;
}
}

而对于多个目录的话,可以一起进行限定:
location ~* ^/(attachments|images)/.*\.(php|php5)$
{
deny all;
}

本文地址:http://www.jwzzsw.com/archives/953.html

文章作者:思悟
版权所有 © 转载时请以链接形式注明作者和原始出处!

评论 共0条 (RSS 2.0) 发表评论

  1. 暂无评论,快抢沙发吧。

发表评论

联系我 Contact Me

回到页首