2 stats.heureux-cyclage.org;
3 root /home/www/data/org/heureux-cyclage/stats/www/;
5 client_body_buffer_size 8k;
6 client_max_body_size 10m;
20 location ~* ^.+\.(?:css|gif|jpe?g|js|png|swf)$ {
21 ## Defining the valid referers.
22 ## Disallow any usage of piwik assets if referer is non valid.
23 valid_referers none blocked
31 if ($invalid_referer) {
36 # NOTE: Static files use the OS buffer cache.
37 open_file_cache max=500 inactive=120s;
38 open_file_cache_errors off;
39 open_file_cache_min_uses 2;
40 open_file_cache_valid 45s;
43 location = /favicon.ico {
44 ## Support for favicon. Return a 204 (No Content) if the favicon doesn't exist.
45 try_files /favicon.ico =204;
48 ## Try all locations and relay to index.php as a fallback.
49 try_files $uri /index.php?$query_string;
51 location ~* ^.+\.php$ {
52 ## Relay all piwik.php requests to fastcgi.
53 include /etc/nginx/conf.d/fastcgi.conf;
54 add_header X-Piwik-Long-Cache $upstream_cache_status;
56 fastcgi_cache microcache;
57 fastcgi_cache_bypass $lhc_stats_no_cache;
58 fastcgi_cache_use_stale error timeout invalid_header updating http_500;
59 fastcgi_cache_valid 200 301 2h;
60 fastcgi_cache_valid 302 30m;
61 fastcgi_cache_valid 404 10m;
62 fastcgi_ignore_headers Cache-Control Expires;
63 fastcgi_no_cache $lhc_stats_no_cache;
64 fastcgi_param REDIRECT_STATUS 200;
66 fastcgi_pass unix:CAT(sys/php5/fpm/org/heureux-cyclage/stats/socket);
68 location ~* (?:DESIGN|(?:gpl|README|LICENSE)[^.]*|LEGALNOTICE)(?:\.txt)*$ {
69 ## Redirect to the root if attempting to access a txt file.
72 location ~* \.(?:bat|git|ini|sh|svn[^.]*|txt|tpl|xml)$ {
73 ## Disallow access to several helper files.
76 location = /robots.txt {
77 ## No crawling of this site for bots that obey robots.txt.
78 return 200 "User-agent: *\nDisallow: /\n";