[不指定 2009/04/13 23:42 | by tinkoko ]
| |
额~我简直爱死nginx了么

配置起来比apache简单多了,不需要额外的模块~


在Nginx.conf里面自己添加

==============================
   #Zone limit

               location / {

                   limit_conn   one  1;

                   limit_rate  20k;
#这个代码是限制速率和并发连接数
:limit_zone(limit_conn) 来限制并发数,limit_rate来限制下载的速率
====================================


关于nginx下防止 盗链么~
更加简单了~

依旧是nginx.conf里面

===========================
   #Preventing hot linking of images and other file types

                     valid_referers none blocked server_names *.aiyomama.cn aiyomama.cn ...你允许连接的网址;

               if ($invalid_referer) {

                rewrite   ^/   http://www.aiyomama.cn/images/logo.gif;  //让别人盗链时显示你指定的图片.

                #return   403;

                                     }
================================================
技术资料 » linux相关 | 评论(3) | 引用(0) | 阅读(1208)
流影
2009/08/27 22:23
==============================
   #Zone limit

               location / {

                   limit_conn   one  1;

                   limit_rate  20k;
#这个代码是限制速率和并发连接数
:limit_zone(limit_conn) 来限制并发数,limit_rate来限制下载的速率
====================================
我是加这段到Nginx.conf里面,Nginx就启动不了shuai
tinkoko Email Homepage
2009/08/19 00:37
http://www.6xuan.com/read.php?326
看这个帖子
nginx下真正的防止图片盗链设置(互联网上)
搞了半天郁闷死,死活不能防止图片盗链。后来看到晚上很多 人你转我的我 转你的。


虚拟站点加入

========================================
location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$
{
valid_referers none blocked www.aiyobaby.com aiyobaby.com www.aiyomama.cn aiyomama.cn bbs.aiyobaby.com home.aiyobaby.com;
if ($invalid_referer) {
rewrite ^/ http://www.aiyobaby.com/images/lji.jpg;
#return 403;
}
}


============================================
完成了别忘记重启服务器啊!

而且这个是过段时间才开始生效。
流影
2009/08/14 00:10
nginx0.7.61 for windows 版本的 Nginx.conf 上添加 以上代码后 nginx 不能启动,是windows版的nginx不支持吗?
分页: 1/1 第一页 1 最后页
 
发表评论
   
表情
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
打开HTML
打开UBB
打开表情
隐藏
昵称   密码   游客无需密码
网址   电邮   [注册]
               

验证码 不区分大小写