File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -13,6 +13,9 @@ apache_allowed_methods:
1313 - POST
1414 - HEAD
1515
16+ apache_allow_server_status_addresses :
17+ - 127.0.0.1
18+
1619# etags almost always cause more trouble than they're worth, unless
1720# you're hosting a large repository of filesystem content.
1821apache_allow_etags : False
@@ -54,3 +57,7 @@ apache_default_tls_lists:
5457 veryhigh :
5558 sslprotocol : ' +ALL -sslv3 -sslv2 -TLSv1 -TLSv1.1'
5659 sslciphersuite : ' EECDH+AES:@STRENGTH'
60+
61+ apache_enable_logrotate : True
62+ apache_logrotate_compress : False
63+ apache_logrotate_days : 7
Original file line number Diff line number Diff line change 7272 state : started
7373 enabled : true
7474 tags : ['apache']
75+
76+ - name : ensure the logrotate config is in place
77+ template :
78+ src : " etc.logrotate.d.httpd.j2"
79+ dest : " /etc/logrotate.d/httpd"
80+ owner : root
81+ group : root
82+ mode : 0640
83+ when : apache_enable_logrotate
84+ tags : ['logrotate', 'apache']
Original file line number Diff line number Diff line change @@ -122,11 +122,9 @@ ExtendedStatus on
122122 SetHandler server-status
123123 Order Deny,Allow
124124 Deny from all
125- Allow from 127.0.0.1
126- Allow from 10.0.0.0/8
127- Allow from 70.184.247.66
128- Allow from 70.39.246.214
129- Allow from 70.39.246.66
125+ {% for address in apache_allow_server_status_addresses %}
126+ Allow from {{ address }}
127+ {% endfor %}
130128</Location >
131129
132130
@@ -168,8 +166,8 @@ LogFormat "{ \
168166 }" json-proxy
169167
170168
171- {% if ansible_distribution_major_version < '7 ' %}
169+ {% if ansible_distribution_major_version == '6 ' %}
172170NameVirtualHost *:{{ apache_server_listen_port }}
173171{% endif %}
174172
175- Include conf.d/*.conf
173+ IncludeOptional conf.d/*.conf
Original file line number Diff line number Diff line change 1+ # {{ ansible_managed }}
2+ /var/log/httpd/*log {
3+ missingok
4+ notifempty
5+ sharedscripts
6+ delaycompress
7+ {% if apache_logrotate_compress | default (false ) %}
8+ compress
9+ {% endif %}
10+ daily
11+ rotate {{ apache_logrotate_days }}
12+ postrotate
13+ /sbin/service httpd reload > /dev/null 2>/dev/null || true
14+ endscript
15+ }
You can’t perform that action at this time.
0 commit comments