Advertisement
Guest User

Untitled

a guest
Sep 18th, 2018
45
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.64 KB | None | 0 0
  1. #---------------------------------------------------------------------
  2. # Global settings
  3. #---------------------------------------------------------------------
  4. global
  5. #log 127.0.0.1 local2 debug #Log configuration
  6. log 127.0.0.1 local2
  7. pidfile /var/run/haproxy.pid
  8. maxconn 4000
  9. nbproc 2
  10. cpu-map 1 0
  11. cpu-map 2 1
  12. user haproxy #Haproxy running under user and group "haproxy"
  13. group haproxy
  14. daemon
  15. # turn on stats unix socket
  16. stats socket /var/lib/haproxy/stats
  17. #---------------------------------------------------------------------
  18. # common defaults that all the 'listen' and 'backend' sections will
  19. # use if not designated in their block
  20. #---------------------------------------------------------------------
  21. defaults
  22. mode http
  23. log 127.0.0.1 local2
  24. log global
  25. option httplog
  26. option dontlognull
  27. option http-server-close
  28. option http-buffer-request
  29. option forwardfor
  30. option http-server-close
  31. option redispatch
  32. retries 3
  33. timeout http-request 10s
  34. timeout queue 1m
  35. timeout connect 10s
  36. timeout client 1m
  37. timeout server 1m
  38. timeout http-keep-alive 10s
  39. timeout check 10s
  40. #---------------------------------------------------------------------
  41. #AProxy Monitoring Config
  42. #---------------------------------------------------------------------
  43. listen stats
  44. bind 0.0.0.0:8443 ssl crt /etc/ssl/domain.cloud/domain.cloud.pem
  45. stats enable
  46. stats uri /
  47. stats hide-version
  48. stats admin if TRUE
  49. stats refresh 30s
  50. frontend HTTPFrontend
  51. bind 0.0.0.0:80
  52. mode tcp
  53. redirect scheme https if !{ ssl_fc }
  54. redirect scheme https code 301
  55. frontend SSLFrontend
  56. bind 0.0.0.0:443 ssl crt /etc/ssl/domain.cloud/domain.cloud.pem
  57. log 127.0.0.1 local2
  58. mode tcp
  59. #mode http
  60. option clitcpka
  61. # option tcplog
  62. option socket-stats
  63. log global
  64. option httplog
  65. # option nolinger
  66. maxconn 300
  67. #tcp-request inspect-delay 5s
  68. tcp-request content accept if { req_ssl_hello_type 1 }
  69. use_backend Unifi if { ssl_fc_sni -i unifi.handsoff.cloud }
  70. #---------------------------------------------------------------------
  71. # Unifi Configuration
  72. #---------------------------------------------------------------------
  73. backend Unifi
  74. redirect scheme https if !{ ssl_fc }
  75. server unifi.domain.cloud 10.50.3.6:8443 ssl verify none check
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement