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

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

8
flake.lock generated
View File

@ -173,11 +173,11 @@
]
},
"locked": {
"lastModified": 1712789012,
"narHash": "sha256-d6inEw6LZ5PW7DvEPiuZIrt8du7qM8GtFddzVJpu8ng=",
"lastModified": 1712834399,
"narHash": "sha256-deNJvqboPk3bEoRZ/FyZnxscsf2BpS3/52JM4qXCNSA=",
"ref": "refs/heads/master",
"rev": "d528df5f99d32dcc3e9e84dcf32409e09064b774",
"revCount": 450,
"rev": "216e153f89f1dbdc4c98a7c1db2a40e52becc901",
"revCount": 451,
"type": "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 = {
# Proxy home directories
"/~" = {
"^~ /~" = {
extraConfig = ''
proxy_redirect off;
proxy_pass https://tom.pvv.ntnu.no;
@ -94,7 +94,7 @@ in {
};
# 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".return = "301 https://wiki.pvv.ntnu.no/";
@ -115,7 +115,7 @@ in {
# Proxy the matrix well-known files
# Host has be set before proxy_pass
# The header must be set so nginx on the other side routes it to the right place
"/.well-known/matrix/" = {
"^~ /.well-known/matrix/" = {
extraConfig = ''
proxy_set_header Host matrix.pvv.ntnu.no;
proxy_pass https://matrix.pvv.ntnu.no/.well-known/matrix/;