diff --git a/scripts/vhost b/scripts/vhost index 970807f..d5b8f4a 100644 --- a/scripts/vhost +++ b/scripts/vhost @@ -8,8 +8,10 @@ DocumentRoot HOME_DIR/XXX/www/ # SSL - IncludeOptional /etc/apache2/ssl/XXX.conf - + # Apache < 2.4.30 (Jessie, Stretch) va générer une erreur si le fichier + # désigné sans regex n'existe pas. On contourne ça avec [f] à place de f + IncludeOptional /etc/apache2/ssl/XXX.con[f] + # Propriete du repertoire #Options +Indexes +SymLinksIfOwnerMatch @@ -67,4 +69,3 @@ #php_value default_charset ISO-8859-15 php_admin_value sendmail_path "/usr/sbin/sendmail -t -i -f www-XXX" php_admin_value open_basedir "/usr/share/php:HOME_DIR/XXX:/tmp" - diff --git a/scripts/web-add.sh b/scripts/web-add.sh index 876209a..811314d 100755 --- a/scripts/web-add.sh +++ b/scripts/web-add.sh @@ -438,6 +438,9 @@ EOT random=$RANDOM if [ "$WEB_SERVER" == "apache" ]; then + # On s'assure que /etc/apache2/ssl pour le IncludeOptional de la conf + mkdir -p /etc/apache2/ssl + vhostfile="/etc/apache2/sites-available/${in_login}.conf" sed -e "s/XXX/$in_login/g ; s/SERVERNAME/$in_wwwdomain/ ; s/RANDOM/$random/ ; s#HOME_DIR#$HOME_DIR#" < $TPL_VHOST > "$vhostfile"