]> git.donarmstrong.com Git - dsa-puppet.git/commitdiff
apache hosts load mod info and status, and serve it
authorStephen Gran <steve@lobefin.net>
Fri, 16 Oct 2009 20:15:25 +0000 (21:15 +0100)
committerStephen Gran <steve@lobefin.net>
Fri, 16 Oct 2009 20:15:25 +0000 (21:15 +0100)
Signed-off-by: Stephen Gran <steve@lobefin.net>
modules/apache2/files/common/etc/apache2/conf.d/local-serverinfo [new file with mode: 0644]
modules/apache2/files/common/etc/apache2/conf.d/server-status [new file with mode: 0644]
modules/apache2/manifests/init.pp

diff --git a/modules/apache2/files/common/etc/apache2/conf.d/local-serverinfo b/modules/apache2/files/common/etc/apache2/conf.d/local-serverinfo
new file mode 100644 (file)
index 0000000..cd52b7a
--- /dev/null
@@ -0,0 +1,14 @@
+##
+## THIS FILE IS UNDER PUPPET CONTROL. DON'T EDIT IT HERE.
+## USE: git clone git+ssh://$USER@puppet.debian.org/srv/puppet.debian.org/git/dsa-puppet.git
+##
+
+<IfModule mod_info.c>
+        <Location /server-info>
+                SetHandler server-info
+                order deny,allow
+                deny from all
+                allow from localhost
+        </Location>
+</IfModule>
+
diff --git a/modules/apache2/files/common/etc/apache2/conf.d/server-status b/modules/apache2/files/common/etc/apache2/conf.d/server-status
new file mode 100644 (file)
index 0000000..3e25f8a
--- /dev/null
@@ -0,0 +1,19 @@
+##
+## THIS FILE IS UNDER PUPPET CONTROL. DON'T EDIT IT HERE.
+## USE: git clone git+ssh://$USER@puppet.debian.org/srv/puppet.debian.org/git/dsa-puppet.git
+##
+
+<IfModule mod_status.c>
+    #
+    # Allow server status reports generated by mod_status,
+    # with the URL of http://servername/server-status
+    # Change the ".example.com" to match your domain to enable.
+    #
+    ExtendedStatus on
+    <Location /server-status>
+        SetHandler server-status
+        Order deny,allow
+        Deny from all
+        Allow from 127.0.0.1
+    </Location>
+</IfModule>
index 0e74f7b1088bd14b366b6449832a27808335cf42..633a47328605ae80ffdd53ce360011739849b9fb 100644 (file)
@@ -1,9 +1,18 @@
+define enable_module($module) {
+        exec { "/usr/sbin/a2enmod $module": }
+}
+
 class apache2 {
        package {
                apache2: ensure => installed;
                logrotate: ensure => installed;
        }
 
+        enable_module {
+                "info": module => info;
+                "status": module => status;
+        }
+
        file {
                "/etc/apache2/conf.d/ressource-limits":
                        content => template("apache2/ressource-limits.erb"),
@@ -14,6 +23,15 @@ class apache2 {
                                     "puppet:///apache2/common/etc/apache2/conf.d/security" ],
                        require => Package["apache2"],
                        notify  => Exec["apache2 reload"];
+               "/etc/apache2/conf.d/local-serverinfo":
+                       source  => [ "puppet:///apache2/per-host/$fqdn/etc/apache2/conf.d/local-serverinfo",
+                                    "puppet:///apache2/common/etc/apache2/conf.d/local-serverinfo" ],
+                       require => Package["apache2"],
+               "/etc/apache2/conf.d/server-status":
+                       source  => [ "puppet:///apache2/per-host/$fqdn/etc/apache2/conf.d/server-status",
+                                    "puppet:///apache2/common/etc/apache2/conf.d/server-status" ],
+                       require => Package["apache2"],
+                       notify  => Exec["apache2 reload"];
 
                "/etc/apache2/sites-available/default-debian.org":
                        source  => [ "puppet:///apache2/per-host/$fqdn/etc/apache2/sites-available/default-debian.org",