bekkalokk/website: fix some nginx location directives
Eval nix flake / evals (push) Failing after 1m50s Details

This commit is contained in:
Oystein Kristoffer Tveit 2024-04-11 13:21:11 +02:00
parent 614c2d624c
commit 0950fedf98
3 changed files with 11 additions and 7 deletions

View File

@ -173,11 +173,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1712789012, "lastModified": 1712834399,
"narHash": "sha256-d6inEw6LZ5PW7DvEPiuZIrt8du7qM8GtFddzVJpu8ng=", "narHash": "sha256-deNJvqboPk3bEoRZ/FyZnxscsf2BpS3/52JM4qXCNSA=",
"ref": "refs/heads/master", "ref": "refs/heads/master",
"rev": "d528df5f99d32dcc3e9e84dcf32409e09064b774", "rev": "216e153f89f1dbdc4c98a7c1db2a40e52becc901",
"revCount": 450, "revCount": 451,
"type": "git", "type": "git",
"url": "https://git.pvv.ntnu.no/Projects/nettsiden.git" "url": "https://git.pvv.ntnu.no/Projects/nettsiden.git"
}, },

View File

@ -198,6 +198,10 @@ in
} }
''; '';
}; };
"^~ /simplesaml/".extraConfig = ''
rewrite ^/simplesaml/(.*)$ /$1 redirect;
return 404;
'';
}; };
}; };
}; };

View File

@ -82,7 +82,7 @@ in {
locations = { locations = {
# Proxy home directories # Proxy home directories
"/~" = { "^~ /~" = {
extraConfig = '' extraConfig = ''
proxy_redirect off; proxy_redirect off;
proxy_pass https://tom.pvv.ntnu.no; proxy_pass https://tom.pvv.ntnu.no;
@ -94,7 +94,7 @@ in {
}; };
# Redirect the old webmail/wiki paths from spikkjeposche # Redirect the old webmail/wiki paths from spikkjeposche
"/webmail".return = "301 https://webmail.pvv.ntnu.no"; "^~ /webmail".return = "301 https://webmail.pvv.ntnu.no";
"~ /pvv/([^\\n\\r]*)".return = "301 https://wiki.pvv.ntnu.no/wiki/$1"; "~ /pvv/([^\\n\\r]*)".return = "301 https://wiki.pvv.ntnu.no/wiki/$1";
"= /pvv".return = "301 https://wiki.pvv.ntnu.no/"; "= /pvv".return = "301 https://wiki.pvv.ntnu.no/";
@ -115,7 +115,7 @@ in {
# Proxy the matrix well-known files # Proxy the matrix well-known files
# Host has be set before proxy_pass # Host has be set before proxy_pass
# The header must be set so nginx on the other side routes it to the right place # The header must be set so nginx on the other side routes it to the right place
"/.well-known/matrix/" = { "^~ /.well-known/matrix/" = {
extraConfig = '' extraConfig = ''
proxy_set_header Host matrix.pvv.ntnu.no; proxy_set_header Host matrix.pvv.ntnu.no;
proxy_pass https://matrix.pvv.ntnu.no/.well-known/matrix/; proxy_pass https://matrix.pvv.ntnu.no/.well-known/matrix/;