【www.bbyears.com--apache】
apache nginx设置目录无执行权限的方法web服务有iis,apache,nginx,使用操作系统无非是windows or *nux
代码如下 location ~ ^/upload/.*.(php教程|php5)$
{
deny all;
}
来看俩段通常对上传目录设置无权限的列子,配置如下:
代码如下
order allow,deny
deny from all
*nux就不同了,大家都是知道的*nux操作系统是区分大小写的
order allow,deny
deny from all
另外看一一nginx虚拟主机防webshell完美版
nginx.conf
代码如下server
{
listen 80;
server_name www.a.com;
index index.html index.htm index.php;
root /data/htdocs/www.a.com/;
#limit_conn crawler 20;
location ~ .*.(php|php5)?$
{
#fastcgi_pass unix:/tmp/php-cgi.sock;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
include fcgi.conf;
}
}
server
{
listen 80;
server_name www.b.com;
index index.html index.htm index.php;
root /data/htdocs/www.111cn.net/;
#limit_conn crawler 20;
location ~ .*.(php|php5)?$
{
#fastcgi_pass unix:/tmp/php-cgi.sock;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
include fcgi.conf;
}
}