This repository has been archived by the owner on Sep 16, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathapache_test_config_no_issue.conf
146 lines (146 loc) · 4.01 KB
/
apache_test_config_no_issue.conf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
#############################################################
# This configuration test must trigger NO audit rules
#############################################################
# See https://httpd.apache.org/docs/2.4/mod
# Point 2.1
# LoadModule auth_digest_module modules/mod_auth_digest.so
LoadModule auth_form_module modules/mod_auth_form.so
LoadModule authn_anon_module modules/mod_authn_anon.so
LoadModule authn_core_module modules/mod_authn_core.so
LoadModule authn_socache_module modules/mod_authn_socache.so
# LoadModule authnz_ldap_module modules/mod_authnz_ldap.so
# LoadModule ldap_module modules/mod_ldap.so
# Point 2.2
LoadModule log_config_module modules/mod_log_config.so
# Point 2.3
# LoadModule dav_module modules/mod_dav.so
# LoadModule dav_fs_module modules/mod_dav_fs.so
# Point 2.4
# LoadModule status_module modules/mod_status.so
# Point 2.5
# LoadModule autoindex_module modules/mod_autoindex.so
# Point 2.6
# LoadModule proxy_module modules/mod_proxy.so
# LoadModule proxy_connect_module modules/mod_proxy_connect.so
# LoadModule proxy_ftp_module modules/mod_proxy_ftp.so
# LoadModule proxy_http_module modules/mod_proxy_http.so
# LoadModule proxy_fcgi_module modules/mod_proxy_fcgi.so
# LoadModule proxy_scgi_module modules/mod_proxy_scgi.so
# LoadModule proxy_ajp_module modules/mod_proxy_ajp.so
# LoadModule proxy_balancer_module modules/mod_proxy_balancer.so
# LoadModule proxy_express_module modules/mod_proxy_express.so
# LoadModule proxy_wstunnel_module modules/mod_proxy_wstunnel.so
# LoadModule proxy_fdpass_module modules/mod_proxy_fdpass.so
# Point 2.7
# LoadModule userdir_module modules/mod_userdir.so
# Point 2.8
# LoadModule info_module modules/mod_info.so
# Point 2.9
# LoadModule mod_auth_digest modules/mod_auth_digest.so
# Point 3.1
User apache
Group apache
# Point 4.1
<Directory>
Require all denied
</Directory>
<Directory "/var/www/html/">
# Point 4.2
Require all denied
# Point 5.2
Options None
</Directory>
# Point 4.2
<Location /portal>
Require valid-user
</Location>
<Directory />
# Point 4.2
Require all denied
# Point 4.3
AllowOverride None
# Point 5.1
Options None
# Point 5.1
# Options Includes all
</Directory>
# Point 4.4
AllowOverride None
# Point 5.8
TraceEnable off
# Point 5.9
LoadModule rewrite_module modules/mod_rewrite.so
RewriteEngine On
RewriteCond %{THE_REQUEST} !HTTP/1\.1$
RewriteRule .* - [F]
# Point 5.10
<FilesMatch "^\.ht">
Require all denied
</FilesMatch>
# Point 5.11
<FilesMatch "^.*$">
Require all denied
</FilesMatch>
# Point 5.12
LoadModule rewrite_module modules/mod_rewrite.so
RewriteCond %{HTTP_HOST} !^www\.example\.com [NC]
RewriteCond %{REQUEST_URI} !^/error [NC]
RewriteRule ^.(.*) - [L,F]
# Point 5.13
Listen 10.1.2.3:80
Listen 192.168.4.5:80
Listen [2001:db8::a00:20ff:fea7:ccea]:80
# Point 5.14
Header always append X-Frame-Options SAMEORIGIN
# Point 6.1
LogLevel warn core:info
# Point 6.2
ErrorLog "syslog:local1"
# Point 6.3
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-agent}i\"" combined
CustomLog log/access_log combined
# Point 6.6
LoadModule security2_module modules/mod_security2.so
# Point 7.1
LoadModule ssl_module modules/mod_ssl.so
# Point 7.4
SSLProtocol TLS1.2
# Point 7.5
SSLHonorCipherOrder On
SSLCipherSuite EECDH:EDH:!NULL:!SSLv2:!RC4:!aNULL:!3DES:!IDEA
# Point 7.6
SSLInsecureRenegotiation off
# Point 7.7
SSLCompression off
# Point 7.11
SSLUseStapling On
SSLStaplingCache dc:UNIX:logs/ssl_staple_socket
# Point 7.12
Header always set Strict-Transport-Security "max-age=600"
#Point 7.13
SSLCipherSuite ECDHE:DHE:!NULL:!SSLv2:!RC4:!aNULL:!3DES:!IDEA
# Point 8.1
ServerTokens Prod
# Point 8.2
ServerSignature Off
# Point 8.4
# FileETag all
# Point 9.1
Timeout 2
# Point 9.2
KeepAlive On
# Point 9.3
MaxKeepAliveRequests 120
# Point 9.4
KeepAliveTimeout 15
# Point 9.5 and 9.6
LoadModule reqtimeout_module modules/mod_reqtimeout.so
RequestReadTimeout header=20-35,MinRate=500 body=15,MinRate=500
# Point 10.1
LimitRequestline 435
# Point 10.2
LimitRequestFields 75
# Point 10.3
LimitRequestFieldsize 1012
# Point 10.4
LimitRequestBody 102350