From 166804e99e33c8ec5760e88ba1f52d4fc301334c Mon Sep 17 00:00:00 2001 From: Guilhem Moulin Date: Thu, 14 May 2015 22:00:36 +0200 Subject: Configure the list manager (Sympa). --- roles/lists/files/etc/nginx/sites-available/sympa | 62 +++++++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 roles/lists/files/etc/nginx/sites-available/sympa (limited to 'roles/lists/files/etc/nginx/sites-available') diff --git a/roles/lists/files/etc/nginx/sites-available/sympa b/roles/lists/files/etc/nginx/sites-available/sympa new file mode 100644 index 0000000..5887dd0 --- /dev/null +++ b/roles/lists/files/etc/nginx/sites-available/sympa @@ -0,0 +1,62 @@ +server { + listen 80; + listen [::]:80 ipv6only=on; + + server_name lists.fripost.org; + + access_log /var/log/nginx/lists.access.log; + error_log /var/log/nginx/lists.error.log info; + + return 301 https://$host$request_uri; +} + + +server { + listen 443; + listen [::]:443 ipv6only=on; + + server_name lists.fripost.org; + + include ssl/config; + ssl_certificate /etc/nginx/ssl/lists.fripost.org.pem; + ssl_certificate_key /etc/nginx/ssl/lists.fripost.org.key; + + location = / { + return 301 /sympa$args; + } + + location ^~ /static-sympa/ { + alias /var/lib/sympa/static_content/; + } + + location ^~ /sympa { + fastcgi_split_path_info ^(/sympa)(.*)$; + include fastcgi/params; + + fastcgi_pass unix:/run/wwsympa.socket; + gzip off; + } + + location ~* ^/([^/]+)/?$ { + return 301 /$1/sympa$args; + } + location ~* ^/([^/]+)/sympa(/.*)?$ { + set $vhost $1; + + if (!-f /etc/sympa/$vhost/robot.conf) { + return 404; + } + + fastcgi_split_path_info ^(/[^/]+/sympa)(.*)$; + include fastcgi/params; + + fastcgi_pass unix:/run/wwsympa.socket; + gzip off; + + fastcgi_param SERVER_NAME $vhost; + } + + location / { + return 404; + } +} -- cgit v1.2.3