tests - add behind-reverse-proxy/linux

This commit is contained in:
bunkerity 2022-08-10 15:18:33 +02:00
parent 093d426bc9
commit d53c54d4b8
No known key found for this signature in database
GPG Key ID: 3D80806F12602A7C
3 changed files with 31 additions and 1 deletions

View File

@ -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

View File

@ -1,7 +1,8 @@
{
"name": "behind-reverse-proxy",
"kinds": [
"docker"
"docker",
"linux"
],
"timeout": 60,
"tests": [

View File

@ -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