summaryrefslogtreecommitdiff
path: root/src/Propellor/Property/Apache.hs
diff options
context:
space:
mode:
authorJoey Hess2014-07-22 16:40:11 -0400
committerJoey Hess2014-07-22 16:40:11 -0400
commit660f77c28fe11534139e8d9ecda2d573921fa8dd (patch)
tree67c85b0e02d37ed31f2c375f85121a635ba0add3 /src/Propellor/Property/Apache.hs
parented8396646039c68eeb7aec7788258205fd998a5f (diff)
propellor spin
Diffstat (limited to 'src/Propellor/Property/Apache.hs')
-rw-r--r--src/Propellor/Property/Apache.hs16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/Propellor/Property/Apache.hs b/src/Propellor/Property/Apache.hs
index a8014999..e6930893 100644
--- a/src/Propellor/Property/Apache.hs
+++ b/src/Propellor/Property/Apache.hs
@@ -68,3 +68,19 @@ multiSSL = "/etc/apache2/conf.d/ssl" `File.hasContent`
]
`describe` "apache SNI enabled"
`onChange` reloaded
+
+-- | Config file fragment that can be inserted into a <Directory>
+-- stanza to allow global read access to the directory.
+--
+-- Works with multiple versions of apache that have different ways to do
+-- it.
+allowAll :: String
+allowAll = unlines
+ [ "<IfVersion < 2.4>"
+ , "Order allow,deny"
+ , "allow from all"
+ , "</IfVersion>"
+ , "<IfVersion >= 2.4>"
+ , "Require all granted"
+ , "</IfVersion>"
+ ]