From e3478a6748d92717b9bc92c16bbf195c7e45762b Mon Sep 17 00:00:00 2001 From: mharb Date: Tue, 3 Oct 2023 13:34:07 +0000 Subject: [PATCH] Upload alternative reverse proxy config. Haproxy can terminate SSL and forward HTTP requests as a drop-in replacement for nginx. Here is a very minimal configuration file for a single backend. Signed-off-by: mharb --- ansible_playbooks/haproxy.conf | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 ansible_playbooks/haproxy.conf 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