Solution 1:
Modify the try_files line to:
try_files $uri $uri/ /index.html =404;
Ref: https://nginx.org/en/docs/http/ngx_http_core_module.html#try_files
Modify the try_files line to:
try_files $uri $uri/ /index.html =404;
Ref: https://nginx.org/en/docs/http/ngx_http_core_module.html#try_files