2 sympa.heureux-cyclage.org
3 sympa.cyclocoop.heureux-cyclage.org
6 client_body_buffer_size 8k;
7 client_max_body_size 10m;
8 location /static-sympa {
9 alias /var/lib/sympa/static_content;
17 include /etc/nginx/conf.d/fastcgi.conf;
19 if ($request_method !~ ^(GET|HEAD)$) {
20 # NOTE: if non GET/HEAD, don't cache and mark user as uncacheable for 1 second via cookie.
23 if ($no_cache = "1") {
24 # NOTE: drop no cache cookie if need be (for some reason, add_header fails if included in prior if-block).
25 add_header Set-Cookie "_mcnc=1; Max-Age=2; Path=/";
26 add_header X-Microcachable "0";
28 if ($http_cookie ~* "_mcnc") {
29 # NOTE: bypass cache if no-cache cookie is set.
32 fastcgi_cache_bypass $no_cache;
33 fastcgi_cache_use_stale updating;
34 fastcgi_cache_valid 200 10s;
35 fastcgi_cache_valid 404 30m;
36 fastcgi_ignore_headers Cache-Control Expires Set-Cookie;
37 fastcgi_no_cache $no_cache;
38 fastcgi_param SCRIPT_NAME '';
39 set $sympa_robot $host;
40 if ($host = "sympa.cyclocoop.heureux-cyclage.org") {
41 set $sympa_robot "sympa.cyclocoop.org";
43 fastcgi_param SERVER_NAME $sympa_robot;
44 fastcgi_param PATH_INFO $uri;
46 fastcgi_pass_header Cookie;
47 fastcgi_pass_header Set-Cookie;
48 fastcgi_split_path_info ^(.+\.cgi)(/.+)$;
50 fastcgi_pass unix:/run/spawn-fcgi/sympa;