VPS侦探论坛

 找回密码
 注册
查看: 6630|回复: 4

lnmpa 1.1防盗链失败,设置貌似没问题!求指点

[复制链接]
发表于 2015-1-29 23:35:13 | 显示全部楼层 |阅读模式

  1. server
  2.         {
  3.                 listen 80;
  4.                 #listen [::]:80;
  5.                 server_name wuraowo.com;
  6.                 index index.html index.htm index.php default.html default.htm default.php;
  7.                 root  /home/wwwnet/wuraowo;

  8.                 location / {
  9.                         try_files $uri @apache;
  10.                         }

  11.                 location @apache {
  12.                         internal;
  13.                         proxy_pass http://127.0.0.1:88;
  14.                         include proxy.conf;
  15.                         }

  16.                 location ~ [^/]\.php(/|$)
  17.                         {
  18.                                 proxy_pass http://127.0.0.1:88;
  19.                                 include proxy.conf;
  20.                         }

  21.                 location ~ .*\.(js|css)?$
  22.                         {
  23.                                 expires      12h;
  24.                         }

  25. location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$
  26. {
  27. valid_referers none blocked *.wuraowo.com;
  28. if ($invalid_referer)
  29. {
  30. rewrite ^/ http://ckvip.com/error.jpg;
  31. #return 403;
  32. }
  33. }
  34.                 access_log off;
  35.         }
复制代码
  1. /usr/local/nginx/sbin/nginx -t
  2. nginx: the configuration file /usr/local/nginx/conf/nginx.conf syntax is ok
  3. nginx: configuration file /usr/local/nginx/conf/nginx.conf test is successful
复制代码
貌似没有用

HttpAccessKeyModule模版需要重新编译才有吗,默认有这个模块吗

[ 本帖最后由 coo 于 2015-1-29 23:51 编辑 ]
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
发表于 2015-1-30 10:18:35 | 显示全部楼层


加到root行下面,重启nginx

你说的HttpAccessKeyModule和用valid_referers是不一样的模块
HttpAccessKeyModule是不默认安装的
Linux下Nginx+MySQL+PHP自动安装工具:https://lnmp.org
发表于 2015-8-11 01:59:12 | 显示全部楼层

测试下我的设置
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
发表于 2016-12-13 14:53:17 | 显示全部楼层



原帖由 9o8i7u 于 2015-8-11 01:59 发表
http://www.thexq.com/wp-content/uploads/2015/08/640.jpg测试下我的设置
没防盗,可以打开
Linux下Nginx+MySQL+PHP自动安装工具:https://lnmp.org
发表于 2019-11-21 12:18:12 | 显示全部楼层

测试一下

军哥运维代购:http://shop63846532.taobao.com/

您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|Archiver|VPS侦探 ( 鲁ICP备16040043号-1 )

GMT+8, 2024-4-20 19:10 , Processed in 0.027342 second(s), 16 queries .

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表