X-Git-Url: https://git.cyclocoop.org/?a=blobdiff_plain;f=etc%2Fnginx%2Fsite.d%2Flhc-stats%2Fsite.conf;h=a70dfeadd951b2306ec857bb645ddb51842d63bd;hb=0844732f8e6296c63a4c09acf6de4d9f0e8b1e18;hp=a98a1a15a733ec4b7502e077ca244f858555c00b;hpb=5c42a4d606c3fb4de3420b220d45077b08f13a40;p=lhc%2Fateliers.git diff --git a/etc/nginx/site.d/lhc-stats/site.conf b/etc/nginx/site.d/lhc-stats/site.conf index a98a1a1..a70dfea 100644 --- a/etc/nginx/site.d/lhc-stats/site.conf +++ b/etc/nginx/site.d/lhc-stats/site.conf @@ -19,10 +19,12 @@ location ~* ^.+\.(?:css|gif|jpe?g|js|png|swf)$ { ## Defining the valid referers. ## Disallow any usage of piwik assets if referer is non valid. valid_referers none blocked - *.cyclocoop.org - *.heureux-cyclage.org - *.ptitvelo.net - *.velosenville.org; + server_names + .cyclocoop.org + .heureux-cyclage.org + .ptitvelo.net + .velosenville.org + .wiklou.org; if ($invalid_referer) { return 444; } @@ -49,16 +51,16 @@ location = /piwik.php { add_header X-Piwik-Long-Cache $upstream_cache_status; expires epoch; fastcgi_cache microcache; - fastcgi_cache_bypass $no_cache; + fastcgi_cache_bypass $lhc_stats_no_cache; fastcgi_cache_use_stale error timeout invalid_header updating http_500; fastcgi_cache_valid 200 301 2h; fastcgi_cache_valid 302 30m; fastcgi_cache_valid 404 10m; fastcgi_ignore_headers Cache-Control Expires; - fastcgi_no_cache $no_cache; + fastcgi_no_cache $lhc_stats_no_cache; fastcgi_param REDIRECT_STATUS 200; - fastcgi_pass php5_fpm_lhc_stats; + fastcgi_pass php_fpm_lhc_stats; } location ~* ^.+\.php$ { ## Any other attempt to access PHP files redirects to the root. @@ -68,7 +70,7 @@ location ~* (?:DESIGN|(?:gpl|README|LICENSE)[^.]*|LEGALNOTICE)(?:\.txt)*$ { ## Redirect to the root if attempting to access a txt file. return 302 /; } -location ~* \.(?:bat|html?|git|ini|sh|svn[^.]*|txt|tpl|xml)$ { +location ~* \.(?:bat|git|ini|sh|svn[^.]*|txt|tpl|xml)$ { ## Disallow access to several helper files. return 404; }