changed logig for http vs https and removed index+ welcome file control
This commit is contained in:
@@ -7,7 +7,85 @@
|
||||
Redirect permanent / https://<%= @ng_webserver_name %>/nagios
|
||||
<% end -%>
|
||||
<% if @ng_use_https != true -%>
|
||||
Redirect permanent / http://<%= @ng_webserver_name %>/nagios
|
||||
ScriptAlias /nagios/cgi-bin/ "/usr/lib64/nagios/cgi-bin/"
|
||||
|
||||
<Directory "/usr/lib64/nagios/cgi-bin/">
|
||||
<% if @ng_use_https == true -%>
|
||||
SSLRequireSSL
|
||||
<% else -%>
|
||||
# SSLRequireSSL
|
||||
<% end -%>
|
||||
Options ExecCGI
|
||||
AllowOverride None
|
||||
<IfVersion >= 2.3>
|
||||
<RequireAll>
|
||||
Require all granted
|
||||
<% unless @ng_required_hosts.empty? -%>
|
||||
Require host <%= @ng_required_hosts %>
|
||||
<% end -%>
|
||||
<% unless @ng_required_ips.empty? -%>
|
||||
Require ip <%= @ng_required_ips %>
|
||||
<% end -%>
|
||||
AuthName "Nagios Access"
|
||||
AuthType Basic
|
||||
AuthUserFile /etc/nagios/passwd
|
||||
Require valid-user
|
||||
</RequireAll>
|
||||
</IfVersion>
|
||||
<IfVersion < 2.3>
|
||||
Order allow,deny
|
||||
<% unless @ng_required_hosts.empty? -%>
|
||||
Allow from <%= @ng_required_hosts %>
|
||||
<% end -%>
|
||||
<% unless @ng_required_ips.empty? -%>
|
||||
Allow from <%= @ng_required_ips %>
|
||||
<% end -%>
|
||||
AuthName "Nagios Access"
|
||||
AuthType Basic
|
||||
AuthUserFile /etc/nagios/passwd
|
||||
Require valid-user
|
||||
</IfVersion>
|
||||
</Directory>
|
||||
|
||||
Alias /nagios "/usr/share/nagios/html"
|
||||
|
||||
<Directory "/usr/share/nagios/html">
|
||||
<% if @ng_use_https == true -%>
|
||||
SSLRequireSSL
|
||||
<% else -%>
|
||||
# SSLRequireSSL
|
||||
<% end -%>
|
||||
Options None
|
||||
AllowOverride None
|
||||
<IfVersion >= 2.3>
|
||||
<RequireAll>
|
||||
Require all granted
|
||||
<% unless @ng_required_hosts.empty? -%>
|
||||
Require host <%= @ng_required_hosts %>
|
||||
<% end -%>
|
||||
<% unless @ng_required_ips.empty? -%>
|
||||
Require ip <%= @ng_required_ips %>
|
||||
<% end -%>
|
||||
AuthName "Nagios Access"
|
||||
AuthType Basic
|
||||
AuthUserFile /etc/nagios/passwd
|
||||
Require valid-user
|
||||
</RequireAll>
|
||||
</IfVersion>
|
||||
<IfVersion < 2.3>
|
||||
Order allow,deny
|
||||
<% unless @ng_required_hosts.empty? -%>
|
||||
Allow from <%= @ng_required_hosts %>
|
||||
<% end -%>
|
||||
<% unless @ng_required_ips.empty? -%>
|
||||
Allow from <%= @ng_required_ips %>
|
||||
<% end -%>
|
||||
AuthName "Nagios Access"
|
||||
AuthType Basic
|
||||
AuthUserFile /etc/nagios/passwd
|
||||
Require valid-user
|
||||
</IfVersion>
|
||||
</Directory>
|
||||
<% end -%>
|
||||
<Directory />
|
||||
AllowOverride All
|
||||
|
||||
@@ -2,12 +2,12 @@
|
||||
##### virtual_host file created by puppet, changes will be overwritten ######
|
||||
###############################################################################
|
||||
|
||||
<VirtualHost *:443>
|
||||
<VirtualHost *:<%= @ng_https_port %>>
|
||||
|
||||
ServerAdmin root@localhost
|
||||
DocumentRoot /var/www/html
|
||||
ServerName <%= @ng_webserver_name %>
|
||||
DirectoryIndex index.html
|
||||
ServerAlias <%= @ng_webserver_name %>
|
||||
ErrorLog /var/log/httpd/nagios_ssl_error_log
|
||||
# ErrorLog syslog:local1
|
||||
TransferLog /var/log/httpd/nagios_ssl_transfer_log
|
||||
|
||||
@@ -1,20 +0,0 @@
|
||||
################################################################################
|
||||
########### welcome.conf generated by Puppet ##########
|
||||
########### manual changes will be overwritten !!! ##########
|
||||
################################################################################
|
||||
|
||||
<LocationMatch "^/+$">
|
||||
Options -Indexes
|
||||
ErrorDocument 403 /.noindex.html
|
||||
</LocationMatch>
|
||||
|
||||
<Directory /usr/share/httpd/noindex>
|
||||
AllowOverride None
|
||||
Require all granted
|
||||
</Directory>
|
||||
|
||||
Alias /.noindex.html /usr/share/httpd/noindex/index.html
|
||||
Alias /noindex/css/bootstrap.min.css /usr/share/httpd/noindex/css/bootstrap.min.css
|
||||
Alias /noindex/css/open-sans.css /usr/share/httpd/noindex/css/open-sans.css
|
||||
Alias /images/apache_pb.gif /usr/share/httpd/noindex/images/apache_pb.gif
|
||||
Alias /images/poweredby.png /usr/share/httpd/noindex/images/poweredby.png
|
||||
Reference in New Issue
Block a user