diff --git a/ansible_playbooks/haproxy.conf b/ansible_playbooks/haproxy.conf new file mode 100644 index 0000000..0490c42 --- /dev/null +++ b/ansible_playbooks/haproxy.conf @@ -0,0 +1,24 @@ +global + log stdout local0 + +defaults + log global + mode http + option forwardfor + option http-buffer-request + option httplog + option logasap + timeout client 60000 + timeout connect 60000 + timeout server 60000 + +frontend proxy + bind *:443 ssl crt /path/to/ssl/cert/bundle.pem ssl-min-ver TLSv1.3 + bind *:80 + default_backend code-server + acl 4XX status 400:499 + http-request redirect scheme https unless { ssl_fc } + http-request silent-drop if 4XX + +backend code-server + server code-server code-server:8443 check \ No newline at end of file