让你的LINUX服务器更加安全

/ 2评 / 0

禁止指定目录执行PHP权限!

把下面这段加入在location ~ .*\.(php|php5)?$前面,优秀执行!

location ~* ^/(attachments|images)/.*\.(php|php5)$
{
deny all;
}

 

(attachments|images)为你要禁止PHP执行的目录

发表评论

邮箱地址不会被公开。 必填项已用*标注