20 lines
301 B
Bash
20 lines
301 B
Bash
|
#!/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
|