Fix #1628. Jessie compatibilty.
This commit is contained in:
parent
68fa678589
commit
0b1c452ee5
|
@ -1,35 +1,34 @@
|
||||||
<VirtualHost *:80>
|
<VirtualHost *:80>
|
||||||
|
|
||||||
# FQDN principal
|
# FQDN principal
|
||||||
ServerName SERVERNAME
|
ServerName SERVERNAME
|
||||||
#ServerAlias SERVERNAME
|
#ServerAlias SERVERNAME
|
||||||
|
|
||||||
# Repertoire principal
|
# Repertoire principal
|
||||||
DocumentRoot HOME_DIR/XXX/www/
|
DocumentRoot HOME_DIR/XXX/www/
|
||||||
|
|
||||||
# Propriete du repertoire
|
# Propriete du repertoire
|
||||||
<Directory HOME_DIR/XXX/www/>
|
<Directory HOME_DIR/XXX/www/>
|
||||||
#Options Indexes SymLinksIfOwnerMatch
|
#Options +Indexes +SymLinksIfOwnerMatch
|
||||||
Options SymLinksIfOwnerMatch
|
Options +SymLinksIfOwnerMatch
|
||||||
AllowOverride AuthConfig Limit FileInfo
|
AllowOverride AuthConfig Limit FileInfo
|
||||||
</Directory>
|
</Directory>
|
||||||
|
|
||||||
# CGI
|
# CGI
|
||||||
ScriptAlias /cgi-RANDOM /usr/lib/cgi-bin/
|
ScriptAlias /cgi-RANDOM /usr/lib/cgi-bin/
|
||||||
<Directory /usr/lib/cgi-bin/>
|
<Directory /usr/lib/cgi-bin/>
|
||||||
Options ExecCGI -MultiViews
|
Options +ExecCGI -MultiViews
|
||||||
AllowOverride None
|
AllowOverride None
|
||||||
|
|
||||||
AuthName "Restricted"
|
AuthName "Restricted"
|
||||||
AuthUserFile HOME_DIR/XXX/.htpasswd
|
AuthUserFile HOME_DIR/XXX/.htpasswd
|
||||||
AuthGroupFile /dev/null
|
|
||||||
AuthType Basic
|
AuthType Basic
|
||||||
require valid-user
|
require valid-user
|
||||||
|
|
||||||
Order Deny,Allow
|
Order Deny,Allow
|
||||||
Deny from all
|
Deny from all
|
||||||
|
|
||||||
#Allow from YYY.YYY.YYY.YYY
|
#Include /etc/apache2/ipaddr_whitelist.conf
|
||||||
|
|
||||||
Satisfy any
|
Satisfy any
|
||||||
</Directory>
|
</Directory>
|
||||||
|
@ -38,7 +37,7 @@
|
||||||
AssignUserID www-XXX XXX
|
AssignUserID www-XXX XXX
|
||||||
|
|
||||||
# LOG
|
# LOG
|
||||||
CustomLog /var/log/apache2/access.log combined
|
CustomLog /var/log/apache2/access.log vhost_combined
|
||||||
CustomLog HOME_DIR/XXX/log/access.log combined
|
CustomLog HOME_DIR/XXX/log/access.log combined
|
||||||
ErrorLog HOME_DIR/XXX/log/error.log
|
ErrorLog HOME_DIR/XXX/log/error.log
|
||||||
|
|
||||||
|
@ -48,8 +47,6 @@
|
||||||
# REWRITE
|
# REWRITE
|
||||||
UseCanonicalName On
|
UseCanonicalName On
|
||||||
RewriteEngine On
|
RewriteEngine On
|
||||||
RewriteLog "/var/log/apache2/rewrite.log"
|
|
||||||
RewriteLogLevel 0
|
|
||||||
RewriteCond %{HTTP_HOST} !^SERVERNAME$
|
RewriteCond %{HTTP_HOST} !^SERVERNAME$
|
||||||
RewriteRule ^/(.*) http://%{SERVER_NAME}/$1 [L,R]
|
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 error_log "HOME_DIR/XXX/log/php.log"
|
||||||
php_admin_value open_basedir "/usr/share/php:HOME_DIR/XXX:/tmp"
|
php_admin_value open_basedir "/usr/share/php:HOME_DIR/XXX:/tmp"
|
||||||
|
|
||||||
</VirtualHost>
|
</VirtualHost>
|
||||||
|
|
||||||
# vim: set filetype=apache expandtab shiftwidth=4 softtabstop=4 tabstop=4 :
|
|
||||||
|
|
|
@ -249,7 +249,7 @@ create_www_account() {
|
||||||
############################################################################
|
############################################################################
|
||||||
|
|
||||||
random=$RANDOM
|
random=$RANDOM
|
||||||
vhostfile="/etc/apache2/sites-available/$in_login"
|
vhostfile="/etc/apache2/sites-available/${in_login}.conf"
|
||||||
|
|
||||||
cat $TPL_VHOST | \
|
cat $TPL_VHOST | \
|
||||||
sed -e "s/XXX/$in_login/g ; s/SERVERNAME/$in_wwwdomain/ ; s/RANDOM/$random/ ; s#HOME_DIR#$HOME_DIR#" >$vhostfile
|
sed -e "s/XXX/$in_login/g ; s/SERVERNAME/$in_wwwdomain/ ; s/RANDOM/$random/ ; s#HOME_DIR#$HOME_DIR#" >$vhostfile
|
||||||
|
|
Loading…
Reference in a new issue