Git Product home page Git Product logo

bots's Introduction

Nginx 屏蔽垃圾網頁蜘蛛配置文件

服務器資源有限,受不了垃圾蜘蛛一天到晚的爬取,爬取也就算了,還拿去當做自己盈利點,果斷屏蔽!

本配置文件適合 nginx,apache 可以自己對照著修改,機器人不斷更新中,大家可以根據自己的需要添加或刪除。

用法:

① 下載配置文件,放到適當的位置,比如:

cd /usr/local/nginx/conf/vhost/ && wget https://raw.githubusercontent.com/vircloud/bots/master/deny-bots.conf

② 修改站點配置文件,在適當的位置引入配置,比如:

server

{

......

include deny-bots.conf;

......

}

③ 重啟 nginx 服務:

service nginx reload

444 狀態碼說明:直接由服務器中斷連接,不會向客戶端再返回任何消息,此為 nginx 獨有。

更多方法参见:网站如何屏蔽垃圾蜘蛛爬取?

bots's People

Contributors

vircloud avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar Leal avatar 陌涛 avatar Contropist avatar Kaito Fung avatar chennqqi avatar Python.Swift avatar  avatar  avatar ziloxijs avatar ws26ws avatar  avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.