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
|
2017-10-13 12:30:02 +02:00
|
|
|
DocumentRoot {{ evoadminmail_document_root }}/htdocs/
|
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
|
|
|
|
<Directory {{ evoadminmail_document_root }}/htdocs/>
|
|
|
|
#Options Indexes SymLinksIfOwnerMatch
|
|
|
|
Options SymLinksIfOwnerMatch
|
|
|
|
AllowOverride AuthConfig Limit FileInfo
|
|
|
|
Require all granted
|
|
|
|
</Directory>
|
|
|
|
|
|
|
|
# user - group (thanks to sesse@debian.org)
|
|
|
|
AssignUserID www-{{ evoadminmail_username }} {{ evoadminmail_username }}
|
|
|
|
|
|
|
|
# LOG
|
|
|
|
CustomLog /var/log/apache2/access.log combined
|
|
|
|
CustomLog {{ evoadminmail_log_dir }}/access.log combined
|
|
|
|
ErrorLog {{ evoadminmail_log_dir }}/error.log
|
|
|
|
|
|
|
|
# AWSTATS
|
|
|
|
SetEnv AWSTATS_FORCE_CONFIG {{ evoadminmail_username }}
|
|
|
|
|
|
|
|
# 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 sendmail_path "/usr/sbin/sendmail -t -i -f www-{{ evoadminmail_username }}"
|
|
|
|
php_admin_value open_basedir "none"
|
|
|
|
</VirtualHost>
|