summaryrefslogtreecommitdiffstats
path: root/roles
diff options
context:
space:
mode:
authorGuilhem Moulin <guilhem@fripost.org>2020-05-16 04:07:47 +0200
committerGuilhem Moulin <guilhem@fripost.org>2020-05-16 05:51:06 +0200
commit30c52c6fd758059604b44564384ae919940cf994 (patch)
tree8025ab2ea4a4e69457ad1b9233dd45fb43fc4cae /roles
parent655e051437391797e0e6a152e650c80b2517a723 (diff)
antilop: Upgrade baseline to Debian 10.
Diffstat (limited to 'roles')
-rw-r--r--roles/lists/files/etc/nginx/sites-available/sympa34
-rw-r--r--roles/lists/files/etc/sympa/sympa/sympa.conf10
-rw-r--r--roles/lists/files/etc/systemd/system/wwsympa.service9
3 files changed, 30 insertions, 23 deletions
diff --git a/roles/lists/files/etc/nginx/sites-available/sympa b/roles/lists/files/etc/nginx/sites-available/sympa
index f5a67bf..cdc2364 100644
--- a/roles/lists/files/etc/nginx/sites-available/sympa
+++ b/roles/lists/files/etc/nginx/sites-available/sympa
@@ -1,82 +1,86 @@
server {
listen 80;
listen [::]:80;
server_name lists.fripost.org;
- include snippets/acme-challenge.conf;
+ include /etc/lacme/nginx.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 ssl http2;
listen [::]:443 ssl http2;
server_name lists.fripost.org;
access_log /var/log/nginx/lists.access.log;
error_log /var/log/nginx/lists.error.log info;
include snippets/headers.conf;
add_header Content-Security-Policy
- "default-src 'none'; script-src 'self' 'unsafe-inline'; style-src 'self' 'unsafe-inline'; img-src 'self'; font-src 'self'; upgrade-insecure-requests; block-all-mixed-content; reflected-xss block; referrer no-referrer-when-downgrade; frame-ancestors 'none'; form-action 'self'; base-uri lists.fripost.org";
+ "default-src 'none'; script-src 'self' 'unsafe-inline'; style-src 'self' 'unsafe-inline'; img-src 'self'; font-src 'self'; frame-ancestors 'none'; form-action 'self'; base-uri lists.fripost.org";
include snippets/ssl.conf;
ssl_certificate ssl/lists.fripost.org.pem;
ssl_certificate_key ssl/lists.fripost.org.key;
include snippets/lists.fripost.org.hpkp-hdr;
+ gzip on;
+ gzip_vary on;
+ gzip_min_length 256;
+ gzip_proxied expired no-cache no-store private no_last_modified no_etag auth;
+ gzip_types application/javascript application/json application/xml image/x-icon text/css text/plain;
+
location = /robots.txt {
allow all;
log_not_found off;
access_log off;
alias /etc/sympa/robots.txt;
}
location = / {
return 302 /sympa$args;
}
- location ^~ /static-sympa/ {
- alias /var/lib/sympa/static_content/;
- expires 30d;
- }
+ location ^~ /static-sympa/ { alias /usr/share/sympa/static_content/; }
+ location ^~ /css-sympa/ { alias /var/lib/sympa/css/; }
+ location ^~ /pictures-sympa/ { alias /var/lib/sympa/pictures; }
+
+ location ~* ^/sympa(?:/|$) {
+ gzip off;
- location ^~ /sympa {
fastcgi_split_path_info ^(/sympa)(.*)$;
include snippets/fastcgi.conf;
-
+ fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_pass unix:/run/wwsympa.socket;
- gzip off;
}
location ~* ^/([^/]+)/?$ {
return 302 /$1/sympa$args;
}
- location ~* ^/([^/]+)/sympa(/.*)?$ {
- set $vhost $1;
+ location ~* ^/(?<vhost>[^/]+)/sympa(?:/|$) {
+ gzip off;
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 PATH_INFO $fastcgi_path_info;
fastcgi_param SERVER_NAME $vhost;
+ fastcgi_pass unix:/run/wwsympa.socket;
}
location / {
return 404;
}
}
diff --git a/roles/lists/files/etc/sympa/sympa/sympa.conf b/roles/lists/files/etc/sympa/sympa/sympa.conf
index 0e88baf..94182cd 100644
--- a/roles/lists/files/etc/sympa/sympa/sympa.conf
+++ b/roles/lists/files/etc/sympa/sympa/sympa.conf
@@ -1,49 +1,53 @@
###\\\\ Site customization ////###
## Main robot hostname
domain lists.fripost.org
## Local part of sympa email address
## Effective address will be [EMAIL]@[HOST]
email sympa
## Listmasters email list comma separated
## Sympa will associate listmaster privileges to these email addresses (mail and web interfaces). Some error reports may also be sent to these addresses.
listmaster listmaster@fripost.org
## URL of main Web page
wwsympa_url http://lists.fripost.org/sympa
max_wrong_password 19
## Directory for storing static contents (CSS, members pictures, documentation) directly delivered by Apache
-static_content_path /var/lib/sympa/static_content
+static_content_path /usr/share/sympa/static_content
## URL mapped with the static_content_path directory defined above
static_content_url /static-sympa
-css_url /static-sympa/css
+css_url /css-sympa
+css_path /var/lib/sympa/css
+
+pictures_path /var/lib/sympa/pictures
+pictures_url /pictures-sympa
## Secret used by Sympa to make MD5 fingerprint in web cookies secure
## Should not be changed ! May invalid all user password
-cookie `head -n1 /etc/sympa/cookie`
+cookie `/usr/bin/head -n1 /etc/sympa/cookie`
## Who is able to create lists
## This parameter is a scenario, check sympa documentation about scenarios if you want to define one
create_list intranet
###\\\\ Directories ////###
## Directory containing mailing lists subdirectories
home /var/lib/sympa/list_data
## Directory for configuration files; it also contains scenari/ and templates/ directories
etc /etc/sympa
###\\\\ System related ////###
## Syslog facility for sympa
## Do not forget to edit syslog.conf
syslog `cat /etc/sympa/facility`
## Log verbosity
diff --git a/roles/lists/files/etc/systemd/system/wwsympa.service b/roles/lists/files/etc/systemd/system/wwsympa.service
index 3f76aca..1d302ef 100644
--- a/roles/lists/files/etc/systemd/system/wwsympa.service
+++ b/roles/lists/files/etc/systemd/system/wwsympa.service
@@ -1,31 +1,30 @@
[Unit]
Description=WWSympa Service
After=network.target
PartOf=sympa.service
Requires=wwsympa.socket
[Service]
StandardInput=socket
User=sympa
Group=sympa
ExecStart=/usr/lib/cgi-bin/sympa/wwsympa.fcgi
# Hardening
NoNewPrivileges=yes
-PrivateDevices=yes
-ProtectHome=yes
-ProtectSystem=strict
-PrivateTmp=yes
ReadWriteDirectories=/etc/sympa
ReadWriteDirectories=/var/lib/sympa
-ReadWriteDirectories=-/var/run/sympa
ReadWriteDirectories=/var/spool/sympa
+RuntimeDirectory=sympa
PrivateDevices=yes
PrivateNetwork=yes
+ProtectHome=yes
+ProtectSystem=strict
+PrivateTmp=yes
ProtectControlGroups=yes
ProtectKernelModules=yes
ProtectKernelTunables=yes
RestrictAddressFamilies=
[Install]
WantedBy=multi-user.target