2017-10-10 00:03:22 +02:00
|
|
|
<VirtualHost *:80>
|
|
|
|
ServerName {{ evoadminmail_host }}
|
|
|
|
Redirect permanent / https://{{ evoadminmail_host }}/
|
|
|
|
</VirtualHost>
|
|
|
|
|
|
|
|
<VirtualHost *:443>
|
|
|
|
|
|
|
|
# FQDN principal
|
|
|
|
ServerName {{ evoadminmail_host }}
|
|
|
|
#ServerAlias {{ evoadminmail_host }}
|
|
|
|
|
|
|
|
# Repertoire principal
|
2018-12-05 14:59:19 +01:00
|
|
|
DocumentRoot /usr/share/evoadmin-mail/
|
2017-10-10 00:03:22 +02:00
|
|
|
|
|
|
|
# SSL
|
|
|
|
SSLEngine on
|
|
|
|
SSLCertificateFile /etc/ssl/certs/{{ evoadminmail_host }}.crt
|
|
|
|
SSLCertificateKeyFile /etc/ssl/private/{{ evoadminmail_host }}.key
|
|
|
|
SSLProtocol all -SSLv2 -SSLv3
|
|
|
|
|
|
|
|
# Propriete du repertoire
|
2018-12-05 14:59:19 +01:00
|
|
|
<Directory /usr/share/evoadmin-mail/>
|
2017-10-10 00:03:22 +02:00
|
|
|
#Options Indexes SymLinksIfOwnerMatch
|
|
|
|
Options SymLinksIfOwnerMatch
|
2018-01-27 23:28:46 +01:00
|
|
|
AllowOverride AuthConfig Limit FileInfo Indexes
|
2017-10-10 00:03:22 +02:00
|
|
|
Require all granted
|
|
|
|
</Directory>
|
|
|
|
|
|
|
|
# user - group (thanks to sesse@debian.org)
|
2018-12-05 14:59:19 +01:00
|
|
|
AssignUserID evoadmin-mail evoadmin-mail
|
2017-10-10 00:03:22 +02:00
|
|
|
|
|
|
|
# LOG
|
|
|
|
CustomLog /var/log/apache2/access.log combined
|
2018-12-05 14:59:19 +01:00
|
|
|
ErrorLog /var/log/apache2/error.log
|
2017-10-10 00:03:22 +02:00
|
|
|
|
|
|
|
# AWSTATS
|
2018-12-05 14:59:19 +01:00
|
|
|
SetEnv AWSTATS_FORCE_CONFIG evoadmin-mail
|
|
|
|
SetEnv EVOADMINMAIL_CONFIG_FILE /etc/evoadmin-mail/config.ini
|
2017-10-10 00:03:22 +02:00
|
|
|
|
|
|
|
# REWRITE
|
|
|
|
UseCanonicalName On
|
|
|
|
RewriteEngine On
|
|
|
|
RewriteCond %{HTTP_HOST} !^{{ evoadminmail_host }}$
|
|
|
|
RewriteRule ^/(.*) https://%{SERVER_NAME}/$1 [L,R]
|
|
|
|
|
|
|
|
# PHP
|
|
|
|
#php_admin_flag engine off
|
|
|
|
#AddType text/html .html
|
|
|
|
#php_admin_flag display_errors On
|
|
|
|
#php_flag short_open_tag On
|
|
|
|
#php_flag register_globals On
|
|
|
|
#php_admin_value memory_limit 256M
|
|
|
|
#php_admin_value max_execution_time 60
|
|
|
|
#php_admin_value upload_max_filesize 8M
|
|
|
|
#php_admin_flag allow_url_fopen Off
|
|
|
|
php_admin_value open_basedir "none"
|
|
|
|
</VirtualHost>
|