-
Notifications
You must be signed in to change notification settings - Fork 26
/
Copy pathhaproxy.txt
66 lines (55 loc) · 1.45 KB
/
haproxy.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
# Example configuration for HAProxy with https://github.com/somenonymous/OshiUpload
global
# daemon
maxconn 2048
tune.ssl.default-dh-param 2048
defaults
# timeout for client handshakes and eof's optimized for anonymous overlay networks
timeout client 1m
# backend inactivity timeout
timeout server 2m
# backend connection timeout
timeout connect 10s
frontend http
bind *:80
mode http
acl insecure_exception path_reg ^\/nossl
redirect scheme https code 301 unless insecure_exception
default_backend default
frontend https
bind *:443 ssl crt /path/to/your_ssl_bundle.pem
mode http
http-request set-header X-Forwarded-Proto https
default_backend default
backend default
mode http
option httpclose
server default_backend 127.0.0.1:4019
# the configuration below only needed when remote reverse-proxy server is used (non-local configuration)
# also check reverse_proxy_tcp.txt for iptables forwarding instead using HAProxy
#
#frontend tcp_raw
# mode tcp
# bind :7777
# default_backend tcpupload_raw
#
#frontend tcp_b64
# mode tcp
# bind :7778
# default_backend tcpupload_base64
#
#frontend tcp_hex
# mode tcp
# bind :7779
# default_backend tcpupload_hex
#
# Assuming the backend is at 10.0.0.1
#backend tcpupload_raw
# mode tcp
# server tcpraw 10.0.0.1:7777
#backend tcpupload_base64
# mode tcp
# server tcpraw 10.0.0.1:7778
#backend tcpupload_hex
# mode tcp
# server tcpraw 10.0.0.1:7779