Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

66 lines
1.8KB

  1. global
  2. maxconn 4096
  3. #tune.ssl.default-dh-param 2048
  4. defaults
  5. mode http
  6. timeout connect 5000ms
  7. timeout client 50000ms
  8. timeout server 50000ms
  9. #log global
  10. #log 127.0.0.1 local0 debug
  11. #option tcplog
  12. # https://www.haproxy.com/blog/how-to-get-ssl-with-haproxy-getting-rid-of-stunnel-stud-nginx-or-pound/
  13. frontend https-in
  14. mode http
  15. bind *:443 ssl crt /etc/letsencrypt/haproxy/${NEXTCLOUD_URL}.pem crt /etc/letsencrypt/haproxy/${GOGS_URL}.pem
  16. acl letsencrypt-acl path_beg /.well-known/acme-challenge/
  17. use_backend letsencrypt-backend if letsencrypt-acl
  18. use_backend nextcloud if { ssl_fc_sni ${NEXTCLOUD_URL} }
  19. use_backend gogs if { ssl_fc_sni ${GOGS_URL} }
  20. default_backend nextcloud
  21. backend nextcloud
  22. # http://cbonte.github.io/haproxy-dconv/1.5/configuration.html#option%20http-server-close
  23. #option http-server-close
  24. #option forwardfor
  25. #redirect http to https
  26. #redirect scheme https if !{ ssl_fc }
  27. server nextcloud nextcloud:443 maxconn 32 check ssl verify none
  28. backend gogs
  29. #redirect http to https
  30. #redirect scheme https if !{ ssl_fc }
  31. server gogs gogs:2443 maxconn 32 check ssl verify none
  32. frontend http-in
  33. bind *:80
  34. acl letsencrypt-acl path_beg /.well-known/acme-challenge/
  35. acl is_nextcloud hdr_end(host) -i ${NEXTCLOUD_URL}
  36. acl is_gogs hdr_end(host) -i ${GOGS_URL}
  37. use_backend letsencrypt-backend if letsencrypt-acl
  38. use_backend nextcloud-insecure if is_nextcloud
  39. use_backend gogs-insecure if is_gogs
  40. default_backend nextcloud-insecure
  41. backend nextcloud-insecure
  42. server nextcloud nextcloud:80 maxconn 32
  43. backend gogs-insecure
  44. server gogs gogs:2080 maxconn 32
  45. # LE Backend
  46. backend letsencrypt-backend
  47. server letsencrypt 127.0.0.1:8888
  48. #listen admin
  49. # bind 127.0.0.1:8080
  50. # stats enable