diff --git a/system/encam.standalone.nginx b/system/encam.standalone.nginx index 07b5104..bb5d0f1 100644 --- a/system/encam.standalone.nginx +++ b/system/encam.standalone.nginx @@ -1,7 +1,14 @@ server { listen 8080; server_name _; + location /.well-known/ { + # Stop processing here to serve content from .well-known + root /config/updates; + try_files $uri =404; + } + location / { return 301 https://$host$request_uri; + } } server { listen 8443 ssl http2; @@ -11,10 +18,6 @@ ssl_certificate_key /code/key.pem; root /app/dist/; - location ^~ /.well-known/ { - # Stop processing here to serve content from .well-known - } - location / { # Forward to index.html if the file does not exist to allow javascript to route # https://stackoverflow.com/questions/43951720/react-router-and-nginx