diff --git a/examples/behind-reverse-proxy/setup-linux.sh b/examples/behind-reverse-proxy/setup-linux.sh new file mode 100755 index 000000000..28ae19809 --- /dev/null +++ b/examples/behind-reverse-proxy/setup-linux.sh @@ -0,0 +1,21 @@ +#!/bin/bash + +if [ $(id -u) -ne 0 ] ; then + echo "❌ Run me as root" + exit 1 +fi + +DNF=$(which dnf) +APT=$(which apt) + +if [ ! -z $DNF ] ; then + dnf install -y haproxy +elif [ ! -z $APT ] ; then + apt install -y haproxy +fi + +cp haproxy.cfg /etc/haproxy +systemctl stop haproxy +systemctl start haproxy + +echo "hello" > /opt/bunkerweb/www/index.html \ No newline at end of file diff --git a/examples/behind-reverse-proxy/tests.json b/examples/behind-reverse-proxy/tests.json index aad171c55..cc461bb19 100644 --- a/examples/behind-reverse-proxy/tests.json +++ b/examples/behind-reverse-proxy/tests.json @@ -1,7 +1,8 @@ { "name": "behind-reverse-proxy", "kinds": [ - "docker" + "docker", + "linux" ], "timeout": 60, "tests": [ diff --git a/examples/behind-reverse-proxy/variables.env b/examples/behind-reverse-proxy/variables.env new file mode 100644 index 000000000..64f7b73c7 --- /dev/null +++ b/examples/behind-reverse-proxy/variables.env @@ -0,0 +1,8 @@ +HTTP_PORT=80 +HTTPS_PORT=443 +DNS_RESOLVERS=8.8.8.8 8.8.4.4 +# replace with your domains +SERVER_NAME=www.example.com +# real IP settings +USE_REAL_IP=yes +REAL_IP_FROM=127.0.0.0/8 \ No newline at end of file