forked from countable/countable-haproxy
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathhaproxy.cfg.template
More file actions
67 lines (53 loc) · 2.14 KB
/
haproxy.cfg.template
File metadata and controls
67 lines (53 loc) · 2.14 KB
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
global
# intermediate configuration
ssl-default-bind-ciphers ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES>
ssl-default-bind-options no-sslv3 no-tlsv10 no-tlsv11 no-tls-tickets
ssl-default-server-ciphers ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-A>
ssl-default-server-options no-sslv3 no-tlsv10 no-tlsv11 no-tls-tickets
log stdout format raw daemon debug
maxconn 60000
daemon
defaults
log global
option dontlognull
option redispatch
retries 3
timeout connect 4s
timeout client 300s
timeout server 300s
listen stats # Define a listen section called "stats"
bind :9000 # Listen on localhost:9000
mode http
stats enable # Enable stats page
stats hide-version # Hide HAProxy version
stats realm Haproxy\ Statistics # Title text for popup window
stats uri / # Stats URI
stats auth admin:password # Authentication credentials
frontend http_proxy
mode http
bind *:80
bind *:443 ssl crt /openosp.pem
option httplog
option http-server-close
maxconn 60000
#block all PUT requests
acl is_put_method method PUT
http-request deny if is_put_method
#block IP spoofing
acl domain hdr(host) -i *.openosp.ca
http-request del-header X-Forwarded-For if domain # Added by Chitrank
http-request add-header X-Forwarded-For %[src] if domain # Added by Chitrank
redirect scheme https code 301 if !{ ssl_fc }
http-response set-header Strict-Transport-Security max-age=63072000
# uncomment and modify below according to local server backend requirements.
# use_backend test if { hdr_beg(host) test.openosp.ca }
# use_backend test2
# backend test
# mode http
# http-request set-header X-Forwarded-Port %[dst_port]
# http-request add-header X-Forwarded-Proto https if { ssl_fc }
# server site example.com:8003 check ssl verify none
#
#backend test2
# mode http
# server site example.com:8000