From 0b1c452ee5317abc895fe0b5df2b76445fadd6a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20S=C3=89RIE?= Date: Fri, 4 Sep 2015 10:20:33 +0200 Subject: [PATCH] Fix #1628. Jessie compatibilty. --- scripts/vhost | 32 +++++++++++++------------------- scripts/web-add.sh | 2 +- 2 files changed, 14 insertions(+), 20 deletions(-) diff --git a/scripts/vhost b/scripts/vhost index 88ac77a..4e68eb8 100644 --- a/scripts/vhost +++ b/scripts/vhost @@ -1,35 +1,34 @@ - # FQDN principal - ServerName SERVERNAME - #ServerAlias SERVERNAME + # FQDN principal + ServerName SERVERNAME + #ServerAlias SERVERNAME # Repertoire principal - DocumentRoot HOME_DIR/XXX/www/ + DocumentRoot HOME_DIR/XXX/www/ # Propriete du repertoire - - #Options Indexes SymLinksIfOwnerMatch - Options SymLinksIfOwnerMatch - AllowOverride AuthConfig Limit FileInfo - + + #Options +Indexes +SymLinksIfOwnerMatch + Options +SymLinksIfOwnerMatch + AllowOverride AuthConfig Limit FileInfo + # CGI ScriptAlias /cgi-RANDOM /usr/lib/cgi-bin/ - Options ExecCGI -MultiViews + Options +ExecCGI -MultiViews AllowOverride None AuthName "Restricted" AuthUserFile HOME_DIR/XXX/.htpasswd - AuthGroupFile /dev/null AuthType Basic require valid-user Order Deny,Allow Deny from all - #Allow from YYY.YYY.YYY.YYY + #Include /etc/apache2/ipaddr_whitelist.conf Satisfy any @@ -38,7 +37,7 @@ AssignUserID www-XXX XXX # LOG - CustomLog /var/log/apache2/access.log combined + CustomLog /var/log/apache2/access.log vhost_combined CustomLog HOME_DIR/XXX/log/access.log combined ErrorLog HOME_DIR/XXX/log/error.log @@ -48,8 +47,6 @@ # REWRITE UseCanonicalName On RewriteEngine On - RewriteLog "/var/log/apache2/rewrite.log" - RewriteLogLevel 0 RewriteCond %{HTTP_HOST} !^SERVERNAME$ RewriteRule ^/(.*) http://%{SERVER_NAME}/$1 [L,R] @@ -67,7 +64,4 @@ php_admin_value error_log "HOME_DIR/XXX/log/php.log" php_admin_value open_basedir "/usr/share/php:HOME_DIR/XXX:/tmp" - - -# vim: set filetype=apache expandtab shiftwidth=4 softtabstop=4 tabstop=4 : - + \ No newline at end of file diff --git a/scripts/web-add.sh b/scripts/web-add.sh index ceb9f8c..3a01929 100755 --- a/scripts/web-add.sh +++ b/scripts/web-add.sh @@ -249,7 +249,7 @@ create_www_account() { ############################################################################ random=$RANDOM - vhostfile="/etc/apache2/sites-available/$in_login" + vhostfile="/etc/apache2/sites-available/${in_login}.conf" cat $TPL_VHOST | \ sed -e "s/XXX/$in_login/g ; s/SERVERNAME/$in_wwwdomain/ ; s/RANDOM/$random/ ; s#HOME_DIR#$HOME_DIR#" >$vhostfile