summaryrefslogtreecommitdiffstats
path: root/debian/tests/proxy-ssl-termination
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--debian/tests/proxy-ssl-termination48
1 files changed, 48 insertions, 0 deletions
diff --git a/debian/tests/proxy-ssl-termination b/debian/tests/proxy-ssl-termination
new file mode 100644
index 0000000..6cc1bcc
--- /dev/null
+++ b/debian/tests/proxy-ssl-termination
@@ -0,0 +1,48 @@
+#!/bin/sh
+
+set -eux
+
+WDIR=$(dirname "$0")
+. "${WDIR}/utils"
+
+CERT_DIR=/etc/ssl/localhost
+create_ca
+create_selfsigned_cert ${CERT_DIR}
+
+cat > /etc/haproxy/haproxy.cfg <<EOF
+global
+ chroot /var/lib/haproxy
+ user haproxy
+ group haproxy
+ daemon
+ maxconn 4096
+ ssl-default-bind-options ssl-min-ver SSLv3
+
+defaults
+ log global
+ option dontlognull
+ option redispatch
+ retries 3
+ timeout client 50s
+ timeout connect 10s
+ timeout http-request 5s
+ timeout server 50s
+ maxconn 4096
+
+frontend test-front
+ bind *:443 ssl crt ${CERT_DIR}/localhost.pem
+ default_backend test-back
+
+backend test-back
+ mode http
+ stick store-request src
+ stick-table type ip size 256k expire 30m
+ server test-1 localhost:80 check
+EOF
+
+systemctl restart haproxy
+sleep 2 # Apache 2 could be still starting... See #976997.
+
+check_index_file "https://localhost"
+
+exit 0