From f0f36d74142111967bb4157d11139d54cbd86fbd Mon Sep 17 00:00:00 2001 From: schererleander Date: Wed, 4 Jun 2025 01:34:29 +0200 Subject: fallback to index.hmtl for react routes --- hosts/vps/configuration.nix | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'hosts') diff --git a/hosts/vps/configuration.nix b/hosts/vps/configuration.nix index 472b4aa..1c873e7 100644 --- a/hosts/vps/configuration.nix +++ b/hosts/vps/configuration.nix @@ -72,6 +72,11 @@ root = "/var/www/site"; forceSSL = true; enableACME = true; + locations = { + "/" = { + tryFiles = "$uri $uri/ /index.html"; + }; + }; }; virtualHosts."cloud.schererleander.de" = { sslCertificate = "/etc/ssl/certs/schererleander.fullchain.pem"; -- cgit v1.3.1