forked from evolix/ansible-roles
62 lines
1.7 KiB
Django/Jinja
62 lines
1.7 KiB
Django/Jinja
<VirtualHost *:80>
|
|
ServerName {{ ansible_fqdn }}
|
|
ServerAdmin webmaster@localhost
|
|
|
|
RewriteEngine on
|
|
RewriteCond %{REQUEST_URI} !^/server-status.*$ [NC]
|
|
# RewriteCond %{REQUEST_URI} !^/munin_opcache.php$ [NC]
|
|
RewriteRule ^/(.*) https://{{ ansible_fqdn }}/$1 [L,R=permanent]
|
|
</VirtualHost>
|
|
|
|
<VirtualHost *:443>
|
|
ServerName {{ ansible_fqdn }}
|
|
ServerAdmin webmaster@localhost
|
|
|
|
DocumentRoot /var/www/
|
|
|
|
SSLEngine on
|
|
SSLCertificateFile {{ apache_evolinux_default_ssl_cert }}
|
|
SSLCertificateKeyFile {{ apache_evolinux_default_ssl_key }}
|
|
# SSLProtocol all -SSLv2 -SSLv3
|
|
|
|
<Directory /var/www/>
|
|
Options +Indexes +FollowSymLinks +MultiViews
|
|
AllowOverride None
|
|
Require all denied
|
|
|
|
Include /etc/apache2/private_ipaddr_whitelist.conf
|
|
</Directory>
|
|
|
|
Alias /munin /var/cache/munin/www
|
|
<Directory /var/cache/munin/www/>
|
|
Options +Indexes +FollowSymLinks +MultiViews
|
|
AllowOverride None
|
|
|
|
Include /etc/apache2/private_ipaddr_whitelist.conf
|
|
</Directory>
|
|
|
|
<Location /munin_opcache.php>
|
|
Include /etc/apache2/private_ipaddr_whitelist.conf
|
|
</Location>
|
|
|
|
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
|
|
<Directory "/usr/lib/cgi-bin">
|
|
AllowOverride None
|
|
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
|
|
</Directory>
|
|
|
|
#ErrorDocument 403 {{ apache_default_redirect_url }}
|
|
|
|
CustomLog /var/log/apache2/access.log vhost_combined
|
|
ErrorLog /var/log/apache2/error.log
|
|
LogLevel warn
|
|
|
|
Alias /phpmyadmin-{{ apache_phpmyadmin_suffix }} /usr/share/phpmyadmin/
|
|
IncludeOptional /etc/apache2/conf-available/phpmyadmin*
|
|
|
|
<Files ~ "\.(inc|bak)$">
|
|
Require all denied
|
|
</Files>
|
|
|
|
</VirtualHost>
|