docker-nginx-auto/app/add-proxy.sh
2021-08-20 11:28:41 -04:00

20 lines
301 B
Bash
Executable File

#!/bin/sh
NAME="$1"
URL="$2"
. /root/common.sh
cat > "${CONF}/conf.d/auto.${NAME}.conf" <<EOF
server {
server_name ${NAME};
server_tokens off;
include snippets/ssl.conf;
include snippets/gzip.conf;
location / {
proxy_pass ${URL};
include snippets/reverse-proxy.conf;
}
}
EOF