全球主机交流论坛

标题: DEDE防黑小招 [打印本页]

作者: junhan    时间: 2014-10-16 15:31
标题: DEDE防黑小招
优点:可以让用户只能访问HTML页面,除了服务器安全外无优!此方法不限于DEDE,其它CMS只想静态化也可以使用
缺点:无法使用自带搜索,想搜索的话只有自己可以添加第三方搜索了
环境:LNMP 0.9

  1.                 location ~ ^/(include|plus|data|后台等不想让用户访问的目录)/ {
  2.                          allow 允许访问的IP;
  3.                          deny all;
  4.                          index index.php index.html index.htm;
  5.                             location ~ .*\.(php|php5)?$ {
  6.                                 try_files $uri =404;
  7.                                 fastcgi_pass  unix:/tmp/php-cgi.sock;
  8.                                 fastcgi_index index.php;
  9.                                 include fcgi.conf;
  10.                             }
  11.                         }
复制代码


效果:非允许的IP访问限制的目录403

没有独立IP怎么办?
可以用一些非常低价的有独立IP的VPS搭一个扶墙就可以了


作者: hostvps    时间: 2014-10-16 15:35
高人啊
作者: ballpen    时间: 2014-10-16 15:39
怎么用 ?nginux 规则?
作者: woshigaozhen    时间: 2014-10-16 16:03
万一扶墙跑路了怎么办?要附上破解方法啊。呵呵




欢迎光临 全球主机交流论坛 (https://hostloc.gdisk.cf/) Powered by Discuz! X3.4