aboutsummaryrefslogtreecommitdiffstats
path: root/modules/apache/templates
diff options
context:
space:
mode:
authorDan Fandrich <danf@mageia.org>2025-12-26 19:28:40 -0800
committerDan Fandrich <danf@mageia.org>2025-12-26 19:29:29 -0800
commit65d58678eb8fffe7983cb626573b20072cef5edc (patch)
treeb61a503045054a4c6b6b2a5c4191debcdcb020f1 /modules/apache/templates
parent6c3c152aa0656700ed4354aaed05d20acc886624 (diff)
downloadpuppet-65d58678eb8fffe7983cb626573b20072cef5edc.tar
puppet-65d58678eb8fffe7983cb626573b20072cef5edc.tar.gz
puppet-65d58678eb8fffe7983cb626573b20072cef5edc.tar.bz2
puppet-65d58678eb8fffe7983cb626573b20072cef5edc.tar.xz
puppet-65d58678eb8fffe7983cb626573b20072cef5edc.zip
Protect the /server-status and /server-info endpoints
These provide potentially sensitive information, so allow access only from localhost. Reported-by: bas
Diffstat (limited to 'modules/apache/templates')
-rw-r--r--modules/apache/templates/info.conf38
1 files changed, 38 insertions, 0 deletions
diff --git a/modules/apache/templates/info.conf b/modules/apache/templates/info.conf
new file mode 100644
index 00000000..1ca918ea
--- /dev/null
+++ b/modules/apache/templates/info.conf
@@ -0,0 +1,38 @@
+#
+# Get information about the requests being processed by the server
+# and the configuration of the server.
+#
+# Required modules: mod_authz_core, mod_authz_host,
+# mod_info (for the server-info handler),
+# mod_status (for the server-status handler)
+
+#
+# Allow server status reports generated by mod_status,
+# with the URL of http://servername/server-status
+# Allow access only from localhost
+
+<Location /server-status>
+ SetHandler server-status
+ Order deny,allow
+ Deny from all
+ Allow from 127
+</Location>
+
+#
+# ExtendedStatus controls whether Apache will generate "full" status
+# information (ExtendedStatus On) or just basic information (ExtendedStatus
+# Off) when the "server-status" handler is called. The default is Off.
+#
+#ExtendedStatus On
+
+#
+# Allow remote server configuration reports, with the URL of
+# http://servername/server-info (requires that mod_info.c be loaded).
+# Allow access only from localhost
+#
+<Location /server-info>
+ SetHandler server-info
+ Order deny,allow
+ Deny from all
+ Allow from 127
+</Location>