nginx apache lighttpd 禁止某些目录执行php
2014-10-10 09:38
696 查看
If your web server is apache ,you can add follow line:
<Directory /website/attachments>
php_flag engine off
</Directory>
We want disable upload directory php execute privileges on nginx,It’s so simple
location /upload/ {
location ~ .*\.(php)?$
{
deny all;
}
}
limit more directory
location ~* ^/(upload|images)/.*\.(php|php5)$
{
deny all;
}
If your web server is lighthttpd you can
$HTTP["url"] =~ “^/(forumdata|templates|customavatars?)/” {
fastcgi.server = ()
}
Apache:
<Location “/forumdata”>
php_admin_flag engine off
Options -ExecCGI
AddType text/plain .html .htm .shtml .php
</Location>
Hope it will help you.
<Directory /website/attachments>
php_flag engine off
</Directory>
We want disable upload directory php execute privileges on nginx,It’s so simple
location /upload/ {
location ~ .*\.(php)?$
{
deny all;
}
}
limit more directory
location ~* ^/(upload|images)/.*\.(php|php5)$
{
deny all;
}
If your web server is lighthttpd you can
$HTTP["url"] =~ “^/(forumdata|templates|customavatars?)/” {
fastcgi.server = ()
}
Apache:
<Location “/forumdata”>
php_admin_flag engine off
Options -ExecCGI
AddType text/plain .html .htm .shtml .php
</Location>
Hope it will help you.
相关文章推荐
- linux下nginx apache lighttpd 禁止某些目录执行php
- Nginx、Apache、Lighttpd禁止目录执行php配置示例
- Apache Nginx 禁止目录执行PHP脚本文件的方法
- Nginx、Apache禁止上传目录的php执行权限
- 如何在Apache和Nginx禁止上传目录里PHP的执行权限
- iis、apache与nginx禁止目录执行asp、php脚本的实现方法
- nginx与Apache禁止目录执行php文件权限
- apache环境下禁止某文件夹内运行PHP脚本、禁止访问文件或目录执行权限的设置方法
- apache禁止访问文件或目录执行权限、禁止运行脚本PHP文件的设置方法
- 服务器反爬虫攻略:Apache/Nginx/PHP禁止某些User Agent抓取网站(转)
- apache环境下禁止某文件夹内运行PHP脚本、禁止访问文件或目录执行权限的设置方法
- linux中nginx下禁止某目录执行php程序
- apache禁止访问文件或目录执行权限、禁止运行脚本PHP文件的设置方法
- Apache下禁止特定目录执行PHP,提高安全性
- apache和nginx下禁止指定目录运行php
- apache环境下禁止某文件夹内运行PHP脚本、禁止访问文件或目录执行权限的设置方法
- nginx 特定目录禁止php执行
- nginx禁止目录php执行权限
- lnmp中禁止nginx上传目录的PHP执行权限方法
- linux中nginx下禁止某目录执行php程序