AjoutĀ : srv/ateliers/etc/nginx/org/heureux-cyclage/stats
[lhc/admin.git] / srv / ateliers / etc / nginx / org / heureux-cyclage / stats / server.conf.m4
diff --git a/srv/ateliers/etc/nginx/org/heureux-cyclage/stats/server.conf.m4 b/srv/ateliers/etc/nginx/org/heureux-cyclage/stats/server.conf.m4
new file mode 100644 (file)
index 0000000..4e9ed67
--- /dev/null
@@ -0,0 +1,45 @@
+define(`DOMAIN',`org/heureux-cyclage')dnl
+define(`SITE',`DOMAIN/stats')dnl
+upstream php_fpm_lhc_stats {
+        server unix:CAT(sys/php5/fpm/org/heureux-cyclage/stats/socket);
+ }
+
+map $request_method $lhc_stats_no_cache {
+ # NOTE: if non GET/HEAD, don't cache.
+        default 1;
+        HEAD 0;
+        GET  0;
+ }
+map $arg_module $lhc_stats_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 $lhc_stats_no_cache {
+ ## The first installation steps don't invoke the installation module.
+        systemCheck 1;
+        databaseSetup 1;
+ }
+map $http_cookie $lhc_stats_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
+ }
+
+server {
+       listen 80;
+       include /etc/nginx/SITE/common.conf;
+       access_log /home/www/log/SITE/access.log main;
+       error_log  /home/www/log/SITE/error.log warn;
+ }
+server {
+       listen 443;
+       include /etc/nginx/SITE/common.conf;
+       include /etc/nginx/conf.d/ssl-pfs.conf;
+       ssl_certificate     /etc/nginx/DOMAIN/crt.pem;
+       ssl_certificate_key /etc/nginx/DOMAIN/key.pem;
+       access_log /home/www/log/SITE/tls/access.log main;
+       error_log  /home/www/log/SITE/tls/error.log warn;
+}
+