summaryrefslogtreecommitdiffstats
path: root/machines/jormungand
diff options
context:
space:
mode:
authorDominique Martinet @ jormungand <asmadeus@codewreck.org>2020-05-23 09:55:31 +0200
committerDominique Martinet @ jormungand <asmadeus@codewreck.org>2020-05-23 09:55:38 +0200
commitae06420e11fe2b4f62762d358b13d84351bc4005 (patch)
tree27b49f885496e17d68e7635478f6c0d643cad1bd /machines/jormungand
parente3fff4fb71c642ba9323205ecf8276919b0c88db (diff)
jormungand nginx: redirect / to codewreck.org (leave /local for local data)
Diffstat (limited to 'machines/jormungand')
-rw-r--r--machines/jormungand/nginx.nix9
1 files changed, 7 insertions, 2 deletions
diff --git a/machines/jormungand/nginx.nix b/machines/jormungand/nginx.nix
index 390df14..8432dc1 100644
--- a/machines/jormungand/nginx.nix
+++ b/machines/jormungand/nginx.nix
@@ -4,7 +4,7 @@
imports = [ ../../profiles/nginx.nix ];
systemd.services.nginx = {
- serviceConfig.BindReadOnlyPaths = [ "/home/asmadeus/www:/www" ];
+ serviceConfig.BindReadOnlyPaths = [ "/home/asmadeus/www:/www/local" ];
};
services.nginx.virtualHosts = {
@@ -20,9 +20,14 @@
auth_basic_user_file /var/spool/nginx/mpd.htpasswd;
'';
};
- locations."/" = {
+ locations."/local/" = {
root = "/www";
};
+ locations."/" = {
+ extraConfig = ''
+ rewrite ^ https://codewreck.org$request_uri? redirect;
+ '';
+ };
};
"matrix.codewreck.org" = {