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

86 lines
2.5KB

  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/${GITEA_URL}.pem
  16. bind *:443 ssl ${HAPROXY_CERTS}
  17. acl letsencrypt-acl path_beg /.well-known/acme-challenge/
  18. #acl nextcloud-acl ssl_fc_sni ${NEXTCLOUD_URL}
  19. #acl gitea-acl ssl_fc_sni ${GITEA_URL}
  20. acl nextcloud-acl ssl_fc_sni_reg ^${NEXTCLOUD_SERVER_NAME}\.
  21. acl gitea-acl ssl_fc_sni_reg ^${GITEA_SERVER_NAME}\.
  22. acl hauk-acl ssl_fc_sni_reg ^${HAUK_SERVER_NAME}\.
  23. use_backend letsencrypt-backend if letsencrypt-acl
  24. use_backend nextcloud if nextcloud-acl
  25. use_backend gitea if gitea-acl
  26. use_backend hauk if hauk-acl
  27. default_backend nextcloud
  28. backend nextcloud
  29. # http://cbonte.github.io/haproxy-dconv/1.5/configuration.html#option%20http-server-close
  30. #option http-server-close
  31. #option forwardfor
  32. #redirect http to https
  33. #redirect scheme https if !{ ssl_fc }
  34. server nextcloud nextcloud:443 maxconn 32 check ssl verify none
  35. backend gitea
  36. #redirect http to https
  37. #redirect scheme https if !{ ssl_fc }
  38. server gitea gitea:2443 maxconn 32 check ssl verify none
  39. backend hauk
  40. server hauk hauk:80 maxconn 32
  41. frontend http-in
  42. bind *:80
  43. acl letsencrypt-acl path_beg /.well-known/acme-challenge/
  44. #acl is_nextcloud hdr_end(host) -i ${NEXTCLOUD_URL}
  45. #acl is_gitea hdr_end(host) -i ${GITEA_URL}
  46. acl is_nextcloud hdr_reg(host) ^${NEXTCLOUD_SERVER_NAME}\.
  47. acl is_gitea hdr_reg(host) ^${GITEA_SERVER_NAME}\.
  48. acl is_hauk hdr_reg(host) ^${HAUK_SERVER_NAME}\.
  49. use_backend letsencrypt-backend if letsencrypt-acl
  50. use_backend nextcloud-insecure if is_nextcloud
  51. use_backend gitea-insecure if is_gitea
  52. use_backend hauk-insecure if is_hauk
  53. default_backend pihole-insecure
  54. backend nextcloud-insecure
  55. server nextcloud nextcloud:80 maxconn 32
  56. backend gitea-insecure
  57. server gitea gitea:3000 maxconn 32
  58. backend hauk-insecure
  59. server hauk hauk:80 maxconn 32
  60. backend pihole-insecure
  61. server pihole pihole:80 maxconn 32
  62. # LE Backend
  63. backend letsencrypt-backend
  64. server letsencrypt 127.0.0.1:8888
  65. #listen admin
  66. # bind 127.0.0.1:8080
  67. # stats enable