summaryrefslogtreecommitdiffstats
path: root/roles
diff options
context:
space:
mode:
Diffstat (limited to 'roles')
-rw-r--r--roles/git/files/etc/nginx/sites-available/git9
-rw-r--r--roles/lists/files/etc/nginx/sites-available/sympa1
-rw-r--r--roles/webmail/files/etc/nginx/sites-available/roundcube1
-rw-r--r--roles/wiki/files/etc/nginx/sites-available/website9
-rw-r--r--roles/wiki/files/etc/nginx/sites-available/wiki9
5 files changed, 17 insertions, 12 deletions
diff --git a/roles/git/files/etc/nginx/sites-available/git b/roles/git/files/etc/nginx/sites-available/git
index ca5555e..ca71e0d 100644
--- a/roles/git/files/etc/nginx/sites-available/git
+++ b/roles/git/files/etc/nginx/sites-available/git
@@ -21,15 +21,16 @@ server {
server_name git.fripost.org;
- include snippets/ssl.conf;
- ssl_certificate /etc/nginx/ssl/git.fripost.org.pem;
- ssl_certificate_key /etc/nginx/ssl/git.fripost.org.key;
-
access_log /var/log/nginx/git.access.log;
error_log /var/log/nginx/git.error.log info;
include snippets/headers.conf;
+ include snippets/ssl.conf;
+ ssl_certificate /etc/nginx/ssl/git.fripost.org.pem;
+ ssl_certificate_key /etc/nginx/ssl/git.fripost.org.key;
+ add_header Public-Key-Pins 'pin-sha256="HOoiXgC7tolzZ31b65UzbAKhpCCA7I0iNdO7NEuL0lU="; pin-sha256="7F+6dSG3D3X3SSLXmb4GWWqUViztamLmmCBlYCi4a10="; max-age=15778800';
+
location ^~ /static/ {
alias /usr/share/cgit/;
expires 30d;
diff --git a/roles/lists/files/etc/nginx/sites-available/sympa b/roles/lists/files/etc/nginx/sites-available/sympa
index 79df229..732f09f 100644
--- a/roles/lists/files/etc/nginx/sites-available/sympa
+++ b/roles/lists/files/etc/nginx/sites-available/sympa
@@ -31,6 +31,7 @@ server {
include snippets/ssl.conf;
ssl_certificate /etc/nginx/ssl/lists.fripost.org.pem;
ssl_certificate_key /etc/nginx/ssl/lists.fripost.org.key;
+ add_header Public-Key-Pins 'pin-sha256="OLx1hOEqnCdS/7ZgzTzAl8Ig/Cwpz5MY9J9Fishg6/0="; pin-sha256="v/Ow0Ou2m08HO10wxci1IVrMC/pbihnoDNxvUwKBsMY="; max-age=15778800';
location = / {
return 302 /sympa$args;
diff --git a/roles/webmail/files/etc/nginx/sites-available/roundcube b/roles/webmail/files/etc/nginx/sites-available/roundcube
index f4461ca..c66ec7a 100644
--- a/roles/webmail/files/etc/nginx/sites-available/roundcube
+++ b/roles/webmail/files/etc/nginx/sites-available/roundcube
@@ -33,6 +33,7 @@ server {
include snippets/ssl.conf;
ssl_certificate /etc/nginx/ssl/mail.fripost.org.pem;
ssl_certificate_key /etc/nginx/ssl/mail.fripost.org.key;
+ add_header Public-Key-Pins 'pin-sha256="SHfniMEapxeYo5YT/2jP+n+WstNaYghDMhZUadLlPDk="; pin-sha256="/Tt92H3ZkfEW1/AOCoGVm1TxZl7u4c+tIBnuvAc7d5w="; max-age=15778800';
location = /favicon.ico {
root /usr/share/roundcube/skins/default/images;
diff --git a/roles/wiki/files/etc/nginx/sites-available/website b/roles/wiki/files/etc/nginx/sites-available/website
index e372aa8..7886860 100644
--- a/roles/wiki/files/etc/nginx/sites-available/website
+++ b/roles/wiki/files/etc/nginx/sites-available/website
@@ -23,10 +23,6 @@ server {
server_name fripost.org;
server_name www.fripost.org;
- include snippets/ssl.conf;
- ssl_certificate /etc/nginx/ssl/www.fripost.org.pem;
- ssl_certificate_key /etc/nginx/ssl/www.fripost.org.key;
-
access_log /var/log/nginx/www.access.log;
error_log /var/log/nginx/www.error.log info;
@@ -34,6 +30,11 @@ server {
add_header Content-Security-Policy
"default-src 'none'; script-src 'self'; style-src 'self'; 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 'none'; base-uri fripost.org www.fripost.org";
+ include snippets/ssl.conf;
+ ssl_certificate /etc/nginx/ssl/www.fripost.org.pem;
+ ssl_certificate_key /etc/nginx/ssl/www.fripost.org.key;
+ add_header Public-Key-Pins 'pin-sha256="fQ+gau72iwOf6rmXvY7/QemB+kYhixPCY/A/EIr3ats="; pin-sha256="MYhOgCyUOp8NRGxa1LZc57g0wREA3kV8C+4SsrDajt8="; max-age=15778800';
+
location / {
try_files $uri $uri/ =404;
index index.html;
diff --git a/roles/wiki/files/etc/nginx/sites-available/wiki b/roles/wiki/files/etc/nginx/sites-available/wiki
index bc44270..ba217a1 100644
--- a/roles/wiki/files/etc/nginx/sites-available/wiki
+++ b/roles/wiki/files/etc/nginx/sites-available/wiki
@@ -22,10 +22,6 @@ server {
server_name wiki.fripost.org;
- include snippets/ssl.conf;
- ssl_certificate /etc/nginx/ssl/www.fripost.org.pem;
- ssl_certificate_key /etc/nginx/ssl/www.fripost.org.key;
-
access_log /var/log/nginx/wiki.access.log;
error_log /var/log/nginx/wiki.error.log info;
@@ -33,6 +29,11 @@ server {
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 wiki.fripost.org";
+ include snippets/ssl.conf;
+ ssl_certificate /etc/nginx/ssl/www.fripost.org.pem;
+ ssl_certificate_key /etc/nginx/ssl/www.fripost.org.key;
+ add_header Public-Key-Pins 'pin-sha256="fQ+gau72iwOf6rmXvY7/QemB+kYhixPCY/A/EIr3ats="; pin-sha256="MYhOgCyUOp8NRGxa1LZc57g0wREA3kV8C+4SsrDajt8="; max-age=15778800';
+
location / {
location ~ ^/website(/.*)?$ { return 302 $scheme://fripost.org$1; }
try_files $uri $uri/ =404;