This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
vcl 4.0; | |
import http; | |
import directors; | |
# We define the origin servers | |
# assumption they listen on port 80, please change it if not true | |
backend origin_a { | |
.host = "103.234.96.112"; | |
.port = "80"; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#请替换成你的网址 | |
https://doc.example.com { | |
#将下面的路径替换成你的MinDoc路径 | |
root /go/src/github.com/lifei6671/godoc/ | |
proxy / localhost:8181 { | |
header_upstream Host {host} | |
header_upstream X-Real-IP {remote} | |
header_upstream X-Forwarded-For {remote} | |
header_upstream X-Forwarded-Proto {scheme} | |
except /static /uploads /cache |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package controllers | |
import ( | |
"errors" | |
"fmt" | |
"bitbucket.org/emagine/vdrill-cp/config" | |
"gopkg.in/ldap.v2" | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Unit] | |
Description=Caddy HTTP/2 web server | |
Documentation=https://caddyserver.com/docs | |
After=network-online.target | |
Wants=network-online.target systemd-networkd-wait-online.service | |
[Service] | |
Restart=on-failure | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
type HostReport struct { | |
Download string | |
Upload string | |
Traceroute string | |
} | |
func main(){ | |
reports := make(map[string]HostReport) | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# chkconfig: 2345 88 88 | |
# description: starts the nginx web server | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: starts the nginx web server | |
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin | |
DESC="nginx daemon" | |
NAME=nginx |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
server | |
{ | |
listen 80; | |
server_name yoursite.com; | |
location / { | |
proxy_pass http://sourcesite.com/; | |
proxy_redirect default; | |
proxy_set_header X-Real-IP $remote_addr; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/bash | |
LOGFILE=/var/log/nginx/access.log | |
PREFIX=/etc/spiders | |
#日志中大部分蜘蛛都有spider的关键字,但是百度的不能封,所以过滤掉百度 | |
grep 'spider' $LOGFILE |grep -v 'Baidu' |awk '{print $1}' >$PREFIX/ip1.txt | |
# 封掉网易的有道 | |
grep 'YoudaoBot' $LOGFILE | awk '{print $1}' >>$PREFIX/ip1.txt | |
#封掉雅虎 | |
grep 'Yahoo!' $LOGFILE | awk '{print $1}' >>$PREFIX/ip1.txt | |
# 过滤掉信任IP |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'rubygems' | |
require 'mongo' | |
@conn = Mongo::Connection.new | |
@db = @conn['graylog2'] | |
@db.authenticate('grayloguser','grayloguser-mongo-passwd') | |
@coll = @db['blacklists'] | |
@conf_file = '/etc/rsyslog_disgarding.conf' | |
@conf_content = "" | |
@file = File.open(@conf_file,'r') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# graylog2-web-interface: graylog2 web interface | |
# | |
# chkconfig: - 98 02 | |
# description: Starts graylog2-web-interface using passenger-standalone. \ | |
# Uses RVM to use switch to a specific ruby version. | |
# | |
# config |
NewerOlder