apache: formatting
This commit is contained in:
parent
aaded13176
commit
84fdd356fa
|
@ -38,12 +38,12 @@
|
||||||
LogLevel warn
|
LogLevel warn
|
||||||
|
|
||||||
<IfModule mod_ssl.c>
|
<IfModule mod_ssl.c>
|
||||||
RewriteEngine on
|
RewriteEngine on
|
||||||
# Redirect to HTTPS, execpt for munin, because some plugins
|
# Redirect to HTTPS, execpt for munin, because some plugins
|
||||||
# can't handle HTTPS! :(
|
# can't handle HTTPS! :(
|
||||||
RewriteCond %{REQUEST_URI} !^/server-status.*$ [NC] [OR]
|
RewriteCond %{REQUEST_URI} !^/server-status.*$ [NC] [OR]
|
||||||
RewriteCond %{REQUEST_URI} !^/munin_opcache.php$ [NC]
|
RewriteCond %{REQUEST_URI} !^/munin_opcache.php$ [NC]
|
||||||
RewriteRule ^/(.*) https://{{ ansible_fqdn }}/$1 [L,R=permanent]
|
RewriteRule ^/(.*) https://{{ ansible_fqdn }}/$1 [L,R=permanent]
|
||||||
</IfModule>
|
</IfModule>
|
||||||
|
|
||||||
<Location /munin_opcache.php>
|
<Location /munin_opcache.php>
|
||||||
|
@ -52,53 +52,54 @@
|
||||||
</VirtualHost>
|
</VirtualHost>
|
||||||
|
|
||||||
<IfModule mod_ssl.c>
|
<IfModule mod_ssl.c>
|
||||||
<VirtualHost *:443>
|
<VirtualHost *:443>
|
||||||
ServerName {{ ansible_fqdn }}
|
ServerName {{ ansible_fqdn }}
|
||||||
#ServerAlias {{ ansible_fqdn }}
|
#ServerAlias {{ ansible_fqdn }}
|
||||||
|
|
||||||
DocumentRoot /var/www/
|
DocumentRoot /var/www/
|
||||||
|
|
||||||
<Directory />
|
<Directory />
|
||||||
Include /etc/apache2/private_ipaddr_whitelist.conf
|
Include /etc/apache2/private_ipaddr_whitelist.conf
|
||||||
</Directory>
|
</Directory>
|
||||||
<Directory /var/www/>
|
<Directory /var/www/>
|
||||||
Options -Indexes
|
Options -Indexes
|
||||||
Require all denied
|
Require all denied
|
||||||
Include /etc/apache2/private_ipaddr_whitelist.conf
|
Include /etc/apache2/private_ipaddr_whitelist.conf
|
||||||
</Directory>
|
</Directory>
|
||||||
|
|
||||||
SSLEngine on
|
SSLEngine on
|
||||||
SSLCertificateFile {{ apache_evolinux_default_ssl_cert }}
|
SSLCertificateFile {{ apache_evolinux_default_ssl_cert }}
|
||||||
SSLCertificateKeyFile {{ apache_evolinux_default_ssl_key }}
|
SSLCertificateKeyFile {{ apache_evolinux_default_ssl_key }}
|
||||||
|
|
||||||
# We override these 2 Directory directives setted in apache2.conf.
|
# We override these 2 Directory directives setted in apache2.conf.
|
||||||
# We want no access except from allowed IP address.
|
# We want no access except from allowed IP address.
|
||||||
<Directory />
|
<Directory />
|
||||||
Include /etc/apache2/private_ipaddr_whitelist.conf
|
Include /etc/apache2/private_ipaddr_whitelist.conf
|
||||||
</Directory>
|
</Directory>
|
||||||
|
|
||||||
# Munin. We need to set Directory directive as Alias take precedence.
|
# Munin. We need to set Directory directive as Alias take precedence.
|
||||||
Alias /munin /var/cache/munin/www
|
Alias /munin /var/cache/munin/www
|
||||||
<Directory /var/cache/munin/>
|
<Directory /var/cache/munin/>
|
||||||
Require all denied
|
Require all denied
|
||||||
Include /etc/apache2/private_ipaddr_whitelist.conf
|
Include /etc/apache2/private_ipaddr_whitelist.conf
|
||||||
</Directory>
|
</Directory>
|
||||||
<Directory /usr/lib/munin/cgi/>
|
<Directory /usr/lib/munin/cgi/>
|
||||||
Options -Indexes
|
Options -Indexes
|
||||||
Require all denied
|
Require all denied
|
||||||
Include /etc/apache2/private_ipaddr_whitelist.conf
|
Include /etc/apache2/private_ipaddr_whitelist.conf
|
||||||
</Directory>
|
</Directory>
|
||||||
|
|
||||||
# For CGI Scripts. We need to set Directory directive as ScriptAlias take precedence.
|
# For CGI Scripts. We need to set Directory directive as ScriptAlias take precedence.
|
||||||
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
|
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
|
||||||
<Directory /usr/lib/cgi-bin>
|
<Directory /usr/lib/cgi-bin>
|
||||||
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
|
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
|
||||||
Require all denied
|
Require all denied
|
||||||
Include /etc/apache2/private_ipaddr_whitelist.conf
|
Include /etc/apache2/private_ipaddr_whitelist.conf
|
||||||
</Directory>
|
</Directory>
|
||||||
|
|
||||||
CustomLog /var/log/apache2/access.log vhost_combined
|
CustomLog /var/log/apache2/access.log vhost_combined
|
||||||
ErrorLog /var/log/apache2/error.log
|
ErrorLog /var/log/apache2/error.log
|
||||||
LogLevel warn
|
LogLevel warn
|
||||||
</VirtualHost>
|
|
||||||
|
</VirtualHost>
|
||||||
</IfModule>
|
</IfModule>
|
||||||
|
|
Loading…
Reference in a new issue