server { listen 80; listen [::]:80; server_name lists.fripost.org; include snippets/acme-challenge.conf; access_log /var/log/nginx/lists.access.log; error_log /var/log/nginx/lists.error.log info; location / { return 301 https://$host$request_uri; } } server { listen 443; listen [::]:443; server_name lists.fripost.org; access_log /var/log/nginx/lists.access.log; error_log /var/log/nginx/lists.error.log info; include snippets/ssl.conf; ssl_certificate /etc/nginx/ssl/lists.fripost.org.pem; ssl_certificate_key /etc/nginx/ssl/lists.fripost.org.key; location = / { return 302 /sympa$args; } location ^~ /static-sympa/ { alias /var/lib/sympa/static_content/; expires 30d; } location ^~ /sympa { fastcgi_split_path_info ^(/sympa)(.*)$; include snippets/fastcgi.conf; fastcgi_pass unix:/run/wwsympa.socket; gzip off; } location ~* ^/([^/]+)/?$ { return 302 /$1/sympa$args; } location ~* ^/([^/]+)/sympa(/.*)?$ { set $vhost $1; if (!-f /etc/sympa/$vhost/robot.conf) { return 404; } fastcgi_split_path_info ^(/[^/]+/sympa)(.*)$; include snippets/fastcgi.conf; fastcgi_pass unix:/run/wwsympa.socket; gzip off; fastcgi_param SERVER_NAME $vhost; } location / { return 404; } }