Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- global
- log /dev/log local0
- log /dev/log local1 notice
- chroot /var/lib/haproxy
- stats socket /run/haproxy/admin.sock mode 660 level admin
- stats timeout 30s
- user haproxy
- group haproxy
- daemon
- # Default SSL material locations
- ca-base /etc/ssl/certs
- crt-base /etc/ssl/private
- # Default ciphers to use on SSL-enabled listening sockets.
- # For more information, see ciphers(1SSL).
- ssl-default-bind-ciphers kEECDH+aRSA+AES:kRSA+AES:+AES256:RC4-SHA:!kEDH:!LOW:!EXP:!MD5:!aNULL:!eNULL
- ssl-default-bind-options no-sslv3
- frontend wiki-https
- mode http
- bind wiki.xxx:443 ssl crt /etc/haproxy/certs/wiki.xxx.com.pem
- reqadd X-Forwarded-Proto:\ https
- acl host_wiki hdr(host) -i wiki.xxx.com
- use_backend dokuwiki if host_wiki
- frontend filemanager-https
- mode http
- bind files.xxx.com:443 ssl crt /etc/haproxy/certs/files.xxx.com.pem
- reqadd X-Forwarded-Proto:\ https
- acl host_files hdr(host) -i files.xxx.com
- use_backend filemanager if host_files
- frontend http-in
- timeout client 50000
- mode http
- bind *:80
- acl host_wiki hdr(host) -i wiki.xxx.com
- acl host_speedtest hdr(host) -i speedtest.xxx.com
- acl host_filemanager hdr(host) -i files.xxx.com
- use_backend speedtest if host_speedtest
- redirect scheme https code 301 if host_wiki
- redirect scheme https code 301 if host_filemanager
- backend filemanager
- mode http
- timeout connect 5000
- timeout server 50000
- server filemanager 127.0.0.1:8080 check
- backend dokuwiki
- mode http
- timeout client 50000
- timeout server 50000
- server dokuwiki 127.0.0.1:9090 check
- backend speedtest
- mode http
- timeout connect 50000
- timeout server 50000
- server speedtest 127.0.0.1:9091 check
- defaults
- log global
- mode http
- option httplog
- option dontlognull
- timeout connect 5000
- timeout client 50000
- timeout server 50000
- errorfile 400 /etc/haproxy/errors/400.http
- errorfile 403 /etc/haproxy/errors/403.http
- errorfile 408 /etc/haproxy/errors/408.http
- errorfile 500 /etc/haproxy/errors/500.http
- errorfile 502 /etc/haproxy/errors/502.http
- errorfile 503 /etc/haproxy/errors/503.http
- errorfile 504 /etc/haproxy/errors/504.http
Add Comment
Please, Sign In to add comment