aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLouise Crow <louise.crow@gmail.com>2014-12-22 16:44:59 +0000
committerLouise Crow <louise.crow@gmail.com>2014-12-22 16:44:59 +0000
commit022fc57cccd8c4e86ea4c5c283ef4eb34e1845a4 (patch)
tree073f690bf16a24f46db04e8f719f38a5077d853d
parent6eb64e26f7420d392b9df9998da897f4bd9328c9 (diff)
Don't allow script execution from the cache directory
-rw-r--r--config/httpd.conf-example6
1 files changed, 6 insertions, 0 deletions
diff --git a/config/httpd.conf-example b/config/httpd.conf-example
index dc2e4966e..a7183e4cc 100644
--- a/config/httpd.conf-example
+++ b/config/httpd.conf-example
@@ -43,6 +43,12 @@ RewriteMap escape int:escape
RewriteCond %{DOCUMENT_ROOT}/views_cache/request/$2/$1/${escape:$3} -f
RewriteRule ^/request/((\d{1,3})\d*)/(response/\d+/attach/(html/)?\d+/.+) /views_cache/request/$2/$1/${escape:$3} [L]
+# Don't allow anything to execute from the cache
+<Directory "/var/www/alaveteli/public/views_cache">
+ Options -ExecCGI
+ SetHandler default-handler
+ AllowOverride None
+</Directory>
<IfModule mod_passenger.c>
# Set this to something like 100 if you have memory leak issues