mirror of
https://github.com/bunkerity/bunkerized-nginx
synced 2023-12-13 21:30:18 +01:00
tests - add behind-reverse-proxy/linux
This commit is contained in:
parent
093d426bc9
commit
d53c54d4b8
3 changed files with 31 additions and 1 deletions
21
examples/behind-reverse-proxy/setup-linux.sh
Executable file
21
examples/behind-reverse-proxy/setup-linux.sh
Executable 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
|
|
@ -1,7 +1,8 @@
|
|||
{
|
||||
"name": "behind-reverse-proxy",
|
||||
"kinds": [
|
||||
"docker"
|
||||
"docker",
|
||||
"linux"
|
||||
],
|
||||
"timeout": 60,
|
||||
"tests": [
|
||||
|
|
8
examples/behind-reverse-proxy/variables.env
Normal file
8
examples/behind-reverse-proxy/variables.env
Normal 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
|
Loading…
Reference in a new issue