diff options
Diffstat (limited to 'web')
-rw-r--r-- | web/homepage/nginx.nix | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/web/homepage/nginx.nix b/web/homepage/nginx.nix index 011f48d51ba9..100c0cc9ee3a 100644 --- a/web/homepage/nginx.nix +++ b/web/homepage/nginx.nix @@ -16,7 +16,7 @@ let oldRedirects = lib.concatStringsSep "\n" (map (post: '' location ~* ^(/en)?/${post.oldKey} { # TODO(tazjin): 301 once this works - return 302 /blog/${post.key}; + return 302 https://tazj.in/blog/${post.key}; } '') (filter (hasAttr "oldKey") blog.posts)); @@ -44,6 +44,7 @@ let server { listen 8080 default_server; + server_name tazj.in; root ${website}; ${oldRedirects} @@ -58,6 +59,12 @@ let try_files $uri $uri.html $uri/ =404; } } + + server { + listen 8080; + server_name www.tazj.in; + return 301 https://tazj.in$request_uri; + } } ''; in writeShellScriptBin "homepage" '' |