AjoutĀ : etc/nginx/conf.d/letsencrypt.conf
[lhc/admin.git] / srv / ateliers / etc / nginx / org / heureux-cyclage / stats / server.conf.m4
1 define(`DOMAIN',`org/heureux-cyclage')dnl
2 define(`SITE',`DOMAIN/stats')dnl
3 upstream php_fpm_lhc_stats {
4 server unix:CAT(sys/php5/fpm/org/heureux-cyclage/stats/socket);
5 }
6
7 map $request_method $lhc_stats_no_cache {
8 # NOTE: if non GET/HEAD, don't cache.
9 default 1;
10 HEAD 0;
11 GET 0;
12 }
13 map $arg_module $lhc_stats_no_cache {
14 ## When we go through installation
15 ## or when we're on the dashboard for specific tasks.
16 Installation 1; # when invoking the installation module.
17 ~[^\&]*(?:Dashboard|Live|Goals|Admin|Manager) 1; # some tasks
18 }
19 map $arg_action $lhc_stats_no_cache {
20 ## The first installation steps don't invoke the installation module.
21 systemCheck 1;
22 databaseSetup 1;
23 }
24 map $http_cookie $lhc_stats_no_cache {
25 ## Testing for the session cookie being present.
26 ## If there is then no caching is to be done.
27 ~PIWIK_SESSID 1; # Piwik session cookie
28 }
29
30 server {
31 listen 80;
32 include /etc/nginx/conf.d/letsencrypt.conf;
33 include /etc/nginx/SITE/common.conf;
34 access_log /home/www/log/SITE/access.log main;
35 error_log /home/www/log/SITE/error.log warn;
36 }
37 server {
38 listen 443;
39 include /etc/nginx/SITE/common.conf;
40 include /etc/nginx/conf.d/ssl-pfs.conf;
41 ssl_certificate /etc/nginx/DOMAIN/crt.pem;
42 ssl_certificate_key /etc/nginx/DOMAIN/key.pem;
43 access_log /home/www/log/SITE/tls/access.log main;
44 error_log /home/www/log/SITE/tls/error.log warn;
45 }
46