Reactjs NGINX没有';不显示反应页面

Reactjs NGINX没有';不显示反应页面,reactjs,nginx,web-deployment,nginx-config,Reactjs,Nginx,Web Deployment,Nginx Config,我有一个使用React路由器、NodeJs和MongoDB的web应用程序。我试图把它放在NGINX上,但当我启动NGINX时,它不会显示我的网页 这些是我的路由器: <BrowserRouter> <Route path="/home" exact component={Home}/> <Route path="/graph/:id" component={Graph}/> </

我有一个使用React路由器、NodeJs和MongoDB的web应用程序。我试图把它放在NGINX上,但当我启动NGINX时,它不会显示我的网页

这些是我的路由器:

<BrowserRouter>
        <Route path="/home" exact component={Home}/>
        <Route path="/graph/:id" component={Graph}/>
 </BrowserRouter>

我做错了什么?

我发现了如何修复:我只是在package.json上添加了主页,并将“.”而不是URL。
server {
    listen 80;
    root /opt/applications/dashboard/frontend/build;    
    index index.html index.htm;

    # Any route that doesn't have a file extension (e.g. /devices)
    location /home{
         try_files $uri /index.html;
    }