Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormattab <matthieu.aubry@gmail.com>2014-12-01 05:46:47 +0300
committermattab <matthieu.aubry@gmail.com>2014-12-01 05:46:47 +0300
commite3139a3557ef685725516e693325ecebe7f1c247 (patch)
tree6920182b9eb14eb3d7ae9ba8fc264369575521ec /plugins/Installation/ServerFilesGenerator.php
parentfb26f670b82a6ab280207d8d18099c643ecf1b49 (diff)
Fixes #5398 use Apache AddHandler only when mod_mime module is enabled. This may create situations where it's hard to debug what the problem is when mod_mime is not activated... maybe should be added to system check
Diffstat (limited to 'plugins/Installation/ServerFilesGenerator.php')
-rw-r--r--plugins/Installation/ServerFilesGenerator.php8
1 files changed, 5 insertions, 3 deletions
diff --git a/plugins/Installation/ServerFilesGenerator.php b/plugins/Installation/ServerFilesGenerator.php
index 9551340e4a..64ad8e83d8 100644
--- a/plugins/Installation/ServerFilesGenerator.php
+++ b/plugins/Installation/ServerFilesGenerator.php
@@ -32,9 +32,11 @@ class ServerFilesGenerator
"</Files>\n";
$allowStaticAssets =
- "# Serve HTML files as text/html mime type\n" .
- "AddHandler text/html .html\n" .
- "AddHandler text/html .htm\n\n" .
+ "# Serve HTML files as text/html mime type - Note: requires mod_mime apache module!\n" .
+ "<IfModule mod_mime.c>\n" .
+ " AddHandler text/html .html\n" .
+ " AddHandler text/html .htm\n" .
+ "</IfModule>\n\n" .
"# Allow to serve static files which are safe\n" .
"<Files ~ \"\\.(gif|ico|jpg|png|svg|js|css|htm|html|swf|mp3|mp4|wav|ogg|avi)$\">\n" .