Guest User

Untitled

a guest
May 10th, 2016
573
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
YAML 2.15 KB | None | 0 0
  1. global
  2.     log /dev/log    local0
  3.     log /dev/log    local1 notice
  4.     chroot /var/lib/haproxy
  5.     stats socket /run/haproxy/admin.sock mode 660 level admin
  6.     stats timeout 30s
  7.     user haproxy
  8.     group haproxy
  9.     daemon
  10.  
  11.     # Default SSL material locations
  12.     ca-base /etc/ssl/certs
  13.     crt-base /etc/ssl/private
  14.  
  15.     # Default ciphers to use on SSL-enabled listening sockets.
  16.     # For more information, see ciphers(1SSL).
  17.     ssl-default-bind-ciphers kEECDH+aRSA+AES:kRSA+AES:+AES256:RC4-SHA:!kEDH:!LOW:!EXP:!MD5:!aNULL:!eNULL
  18.         ssl-default-bind-options no-sslv3
  19.  
  20. frontend wiki-https
  21.   mode http
  22.   bind wiki.xxx:443 ssl crt /etc/haproxy/certs/wiki.xxx.com.pem
  23.   reqadd X-Forwarded-Proto:\ https
  24.   acl host_wiki hdr(host) -i wiki.xxx.com
  25.   use_backend dokuwiki if host_wiki
  26.  
  27. frontend filemanager-https
  28.   mode http
  29.   bind files.xxx.com:443 ssl crt /etc/haproxy/certs/files.xxx.com.pem
  30.   reqadd X-Forwarded-Proto:\ https
  31.   acl host_files hdr(host) -i files.xxx.com
  32.   use_backend filemanager if host_files
  33.  
  34.  
  35. frontend http-in
  36.   timeout client 50000
  37.   mode http
  38.   bind *:80
  39.   acl host_wiki hdr(host) -i wiki.xxx.com
  40.   acl host_speedtest hdr(host) -i speedtest.xxx.com
  41.   acl host_filemanager hdr(host) -i files.xxx.com
  42.   use_backend speedtest if host_speedtest
  43.   redirect scheme https code 301 if host_wiki
  44.   redirect scheme https code 301 if host_filemanager
  45.  
  46.  
  47. backend filemanager
  48.   mode http
  49.   timeout connect 5000
  50.   timeout server  50000
  51.   server filemanager 127.0.0.1:8080 check
  52.  
  53. backend dokuwiki
  54.   mode http
  55.   timeout client 50000
  56.   timeout server 50000
  57.   server dokuwiki 127.0.0.1:9090 check
  58.  
  59. backend speedtest
  60.   mode http
  61.   timeout connect 50000
  62.   timeout server 50000
  63.   server speedtest 127.0.0.1:9091 check
  64.  
  65. defaults
  66.     log global
  67.     mode    http
  68.     option  httplog
  69.     option  dontlognull
  70.     timeout connect 5000
  71.     timeout client  50000
  72.     timeout server  50000
  73.     errorfile 400 /etc/haproxy/errors/400.http
  74.     errorfile 403 /etc/haproxy/errors/403.http
  75.     errorfile 408 /etc/haproxy/errors/408.http
  76.     errorfile 500 /etc/haproxy/errors/500.http
  77.     errorfile 502 /etc/haproxy/errors/502.http
  78.     errorfile 503 /etc/haproxy/errors/503.http
  79.     errorfile 504 /etc/haproxy/errors/504.http
Add Comment
Please, Sign In to add comment