Forráskód Böngészése

modified: haproxy.cfg

jaikuai 6 hónapja
szülő
commit
84e2719963
1 módosított fájl, 107 hozzáadás és 107 törlés
  1. 107 107
      haproxy.cfg

+ 107 - 107
haproxy.cfg

@@ -1,107 +1,107 @@
-global
-    log 127.0.0.1 local0 info
-    maxconn 4096
-
-defaults
-    option  dontlognull        # Do not log connections with no requests
-    option  contstats          # Enable continuous traffic statistics updates
-    retries 3                  # Try to connect up to 3 times in case of failure
-    timeout connect 5s         # 5 seconds max to connect or to stay in queue
-    timeout http-keep-alive 1s # 1 second max for the client to post next request
-    timeout http-request 15s   # 15 seconds max for the client to send a request
-    timeout queue 30s          # 30 seconds max queued on load balancer
-    timeout client 300s  # 客户端超时时间设置为30秒,你可以根据需要调整这个值
-    timeout connect 10s # 连接超时时间设置为10秒,你也可以根据需要调整
-    timeout server 300s  # 服务端超时时间设置为30秒,根据需要调整
-    backlog 10000              # Size of SYN backlog queue
-
-frontend ftp_fe
-    bind 0.0.0.0:20-21 name ftp-control
-    bind 0.0.0.0:21100-21110 name ftp-data
-    mode tcp
-    option tcplog
-    log global
-    default_backend ftp_be21
-
-frontend web
-    mode http
-	option accept-invalid-http-request
-	bind 0.0.0.0:443
-
-    acl open_baidu hdr(host) -i openapi.baidu.com
-    acl pan_baidu hdr(host) -i pan.baidu.com
-    acl pcs_baidu hdr(host) -i pcs.baidu.com
-    acl d_pcs_baidu hdr(host) -i d.pcs.baidu.com
-
-    use_backend open_baidu_backend if open_baidu
-    use_backend pan_baidu_backend if pan_baidu
-    use_backend pcs_baidu_backend if pcs_baidu
-    use_backend d_pcs_baidu_backend if d_pcs_baidu
-
-    default_backend open_baidu_backend
-
-backend ftp_be21
-    balance leastconn
-    stick on src
-    stick-table type ip size 100k expire 1h
-    server ftp-server1 47.98.251.134 check port 21
-
-backend open_baidu_backend
-    mode http
-    option forwardfor header X-Real-IP
-	option http-server-close
-    server openbaidu openapi.baidu.com check port 443
-
-backend pan_baidu_backend
-    mode http
-    option forwardfor header X-Real-IP
-	option http-server-close
-    server server pan.baidu.com check port 443
-
-backend pcs_baidu_backend
-    mode http
-    option forwardfor header X-Real-IP
-	option http-server-close
-    server server pcs.baidu.com check port 443
-
-
-backend d_pcs_baidu_backend
-    mode http
-    option forwardfor header X-Real-IP
-	option http-server-close
-    server server d.pcs.baidu.com check port 443
-
-listen nvr
-    bind *:200
-    mode http
-    server s1 192.168.3.200:80 check
-
-listen rtsp
-    bind *:554
-    mode tcp
-    server s1 192.168.3.200:554 check
-
-
-listen car_plate
-    bind *:98
-    mode http
-    server s98 192.168.3.98:80 check
-
-listen cops
-    bind *:10166
-    option http-server-close
-    mode tcp
-    server scops cops.uniquecharge.cn:2526 check
-
-listen registry
-    bind *:5000
-    option http-server-close
-    mode tcp
-    server zhl nas.fast-fun.cn:5000 check
-
-
-listen http_proxy
-    bind *:6667
-    option http-server-close
-    mode tcp
-    server zhl 	10.10.64.1:6667 check
+global
+    log 127.0.0.1 local0 info
+    maxconn 4096
+
+defaults
+    option  dontlognull        # Do not log connections with no requests
+    option  contstats          # Enable continuous traffic statistics updates
+    retries 3                  # Try to connect up to 3 times in case of failure
+    timeout connect 5s         # 5 seconds max to connect or to stay in queue
+    timeout http-keep-alive 1s # 1 second max for the client to post next request
+    timeout http-request 15s   # 15 seconds max for the client to send a request
+    timeout queue 30s          # 30 seconds max queued on load balancer
+    timeout client 300s  # 客户端超时时间设置为30秒,你可以根据需要调整这个值
+    timeout connect 10s # 连接超时时间设置为10秒,你也可以根据需要调整
+    timeout server 300s  # 服务端超时时间设置为30秒,根据需要调整
+    backlog 10000              # Size of SYN backlog queue
+
+frontend ftp_fe
+    bind 0.0.0.0:20-21 name ftp-control
+    bind 0.0.0.0:21100-21110 name ftp-data
+    mode tcp
+    option tcplog
+    log global
+    default_backend ftp_be21
+
+frontend web
+    mode http
+	option accept-invalid-http-request
+	bind 0.0.0.0:443
+
+    acl open_baidu hdr(host) -i openapi.baidu.com
+    acl pan_baidu hdr(host) -i pan.baidu.com
+    acl pcs_baidu hdr(host) -i pcs.baidu.com
+    acl d_pcs_baidu hdr(host) -i d.pcs.baidu.com
+
+    use_backend open_baidu_backend if open_baidu
+    use_backend pan_baidu_backend if pan_baidu
+    use_backend pcs_baidu_backend if pcs_baidu
+    use_backend d_pcs_baidu_backend if d_pcs_baidu
+
+    default_backend open_baidu_backend
+
+backend ftp_be21
+    balance leastconn
+    stick on src
+    stick-table type ip size 100k expire 1h
+    server ftp-server1 47.98.251.134 check port 21
+
+backend open_baidu_backend
+    mode http
+    option forwardfor header X-Real-IP
+	option http-server-close
+    server openbaidu openapi.baidu.com check port 443
+
+backend pan_baidu_backend
+    mode http
+    option forwardfor header X-Real-IP
+	option http-server-close
+    server server pan.baidu.com check port 443
+
+backend pcs_baidu_backend
+    mode http
+    option forwardfor header X-Real-IP
+	option http-server-close
+    server server pcs.baidu.com check port 443
+
+
+backend d_pcs_baidu_backend
+    mode http
+    option forwardfor header X-Real-IP
+	option http-server-close
+    server server d.pcs.baidu.com check port 443
+
+listen nvr
+    bind *:200
+    mode http
+    server s1 192.168.3.200:80 check
+
+listen rtsp
+    bind *:554
+    mode tcp
+    server s1 192.168.3.200:554 check
+
+
+listen car_plate
+    bind *:98
+    mode http
+    server s98 192.168.3.98:80 check
+
+listen cops
+    bind *:10166
+    option http-server-close
+    mode tcp
+    server scops cops.uniquecharge.cn:2526 check
+
+listen registry
+    bind *:5000
+    option http-server-close
+    mode tcp
+    server zhl nas.fast-fun.cn:5000 check
+
+listen http_proxy
+    bind *:6667
+    option http-server-close
+    mode tcp
+    server s1 10.10.64.1:6667 check
+