Modification : etc/nginx/site.d/lhc-stats/site.conf : intègre de la conf de piwik...
[lhc/ateliers.git] / etc / nginx / site.d / lhc-stats / http.conf
diff --git a/etc/nginx/site.d/lhc-stats/http.conf b/etc/nginx/site.d/lhc-stats/http.conf
new file mode 100644 (file)
index 0000000..58563f7
--- /dev/null
@@ -0,0 +1,28 @@
+upstream php5_fpm_lhc_stats {
+       server unix:/run/php5/fpm/lhc_stats;
+ }
+
+map $request_method $no_cache {
+ # NOTE: if non GET/HEAD, don't cache.
+       default 1;
+       HEAD 0;
+       GET  0;
+ }
+map $arg_module $no_cache {
+ ## When we go through installation
+ ## or when we're on the dashboard for specific tasks.
+       Installation 1; # when invoking the installation module.
+       ~[^\&]*(?:Dashboard|Live|Goals|Admin|Manager) 1; # some tasks
+ }
+map $arg_action $no_cache {
+ ## The first installation steps don't invoke the installation module.
+       systemCheck 1;
+       databaseSetup 1;
+ }
+map $http_cookie $no_cache {
+ ## Testing for the session cookie being present.
+ ## If there is then no caching is to be done.
+       ~PIWIK_SESSID 1; # Piwik session cookie
+ }
+
+# vim: ft=sh