Fix #1628. Jessie compatibilty.

This commit is contained in:
Benoît S. 2015-09-04 10:20:33 +02:00
parent 68fa678589
commit 0b1c452ee5
2 changed files with 14 additions and 20 deletions

View File

@ -1,35 +1,34 @@
<VirtualHost *:80>
# 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
<Directory HOME_DIR/XXX/www/>
#Options Indexes SymLinksIfOwnerMatch
Options SymLinksIfOwnerMatch
AllowOverride AuthConfig Limit FileInfo
</Directory>
<Directory HOME_DIR/XXX/www/>
#Options +Indexes +SymLinksIfOwnerMatch
Options +SymLinksIfOwnerMatch
AllowOverride AuthConfig Limit FileInfo
</Directory>
# CGI
ScriptAlias /cgi-RANDOM /usr/lib/cgi-bin/
<Directory /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
</Directory>
@ -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"
</VirtualHost>
# vim: set filetype=apache expandtab shiftwidth=4 softtabstop=4 tabstop=4 :
</VirtualHost>

View File

@ -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