aboutsummaryrefslogtreecommitdiff
path: root/modules/private/websites
diff options
context:
space:
mode:
authorIsmaël Bouya <ismael.bouya@normalesup.org>2020-01-25 16:40:47 +0100
committerIsmaël Bouya <ismael.bouya@normalesup.org>2020-01-25 16:40:47 +0100
commit6da0830ee38b68f3edc020792d446d166c0642a0 (patch)
tree14131f09ccd2570868972176420ac940617e84e6 /modules/private/websites
parent5138d96cea26ee4c7f859793d8f70f87185e967b (diff)
downloadNix-6da0830ee38b68f3edc020792d446d166c0642a0.tar.gz
Nix-6da0830ee38b68f3edc020792d446d166c0642a0.tar.zst
Nix-6da0830ee38b68f3edc020792d446d166c0642a0.zip
Add immae.eu website
Diffstat (limited to 'modules/private/websites')
-rw-r--r--modules/private/websites/immae/production.nix15
1 files changed, 14 insertions, 1 deletions
diff --git a/modules/private/websites/immae/production.nix b/modules/private/websites/immae/production.nix
index 87bb848..3d76b86 100644
--- a/modules/private/websites/immae/production.nix
+++ b/modules/private/websites/immae/production.nix
@@ -14,12 +14,25 @@ in {
14 services.websites.env.production.vhostConfs.immae = { 14 services.websites.env.production.vhostConfs.immae = {
15 certName = "eldiron"; 15 certName = "eldiron";
16 addToCerts = true; 16 addToCerts = true;
17 hosts = [ "www.immae.eu" ]; 17 hosts = [ "www.immae.eu" "immae.eu" ];
18 root = varDir; 18 root = varDir;
19 extraConfig = [ 19 extraConfig = [
20 '' 20 ''
21 Use Stats www.immae.eu 21 Use Stats www.immae.eu
22 22
23 <LocationMatch /.well-known/(webfinger|host-meta)>
24 Header always set Referrer-Policy "strict-origin-when-cross-origin"
25 Header always set Strict-Transport-Security "max-age=31536000"
26 RequestHeader set X-Forwarded-Proto "https"
27
28 RewriteRule ^(.*)$ https://mastodon.immae.eu%{REQUEST_URI} [QSA,L]
29 </LocationMatch>
30
31 RewriteEngine On
32 RewriteCond "%{REQUEST_URI}" "!^/.well-known/(webfinger|host-meta)"
33 RewriteCond "%{HTTP_HOST}" "!^www\.immae\.eu$" [NC]
34 RewriteRule ^(.+)$ https://www.immae.eu$1 [R=302,L]
35
23 <Directory ${varDir}> 36 <Directory ${varDir}>
24 DirectoryIndex index.htm index.html 37 DirectoryIndex index.htm index.html
25 Options Indexes FollowSymLinks MultiViews Includes 38 Options Indexes FollowSymLinks MultiViews Includes