From 9c2df7acbb45a046e73b663e42d2b46643580a90 Mon Sep 17 00:00:00 2001 From: Simon Vieille Date: Thu, 12 Sep 2019 12:56:40 +0200 Subject: [PATCH] add WEB_BIND_ADDRESS param --- bin/vhost-add | 5 ++++- etc/config.dist | 3 +++ src/templates/vhost-http.twig | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/bin/vhost-add b/bin/vhost-add index 3aed860..c6ffb37 100755 --- a/bin/vhost-add +++ b/bin/vhost-add @@ -97,6 +97,7 @@ export WEB_LOG_PATH export WEB_HTTPS_DEFAULT_CERT_PEM export WEB_HTTPS_DEFAULT_CERT_PRIVKEY export WEB_HTTPS_DEFAULT_CERT_CHAIN +export WEB_BIND_ADDRESS TMP_FILE="/tmp/vhost-add-$(tr -dc "qwertQWERTasdfgASDFGzxcvbZXCVB" < /dev/urandom | head -c 16)" touch "$TMP_FILE" @@ -136,7 +137,9 @@ if [ "$WEB_HTTP" = "yes" ]; then VHOST_FILE_SA="$APACHE_VHOST_SITES_AVAILABLE_PATH/${DOMAIN}.${WEB_HTTP_PORT}.conf" VHOST_FILE_SE="$APACHE_VHOST_SITES_ENABLED_PATH/${DOMAIN}.${WEB_HTTP_PORT}.conf" - PORT=$WEB_HTTP_PORT template vhost-http > "$VHOST_FILE_SA" + #PORT=$WEB_HTTP_PORT template vhost-http > "$VHOST_FILE_SA" + PORT=$WEB_HTTP_PORT template vhost-http + exit ln -rs "$VHOST_FILE_SA" "$VHOST_FILE_SE" fi diff --git a/etc/config.dist b/etc/config.dist index 51abcb0..95df96f 100644 --- a/etc/config.dist +++ b/etc/config.dist @@ -3,6 +3,9 @@ WEB_HTTP_PORT=80 # HTTPS port WEB_HTTPS_PORT=443 +# Address to bind +WEB_BIND_ADDRESS="*" + # User group SYSTEM_USER_GROUP=webgroup diff --git a/src/templates/vhost-http.twig b/src/templates/vhost-http.twig index bd0396c..27d719c 100644 --- a/src/templates/vhost-http.twig +++ b/src/templates/vhost-http.twig @@ -1,5 +1,5 @@ {% block body %} - + ServerName {{ DOMAIN }} {% if DOMAIN_ALIASES is not empty %} ServerAlias {{ DOMAIN_ALIASES }}