react.js application showing 404 not found in nginx server

后端 未结 7 2277
广开言路
广开言路 2020-12-05 10:07

I uploaded react.js application to server. I\'m using nginx server. Application is working fine. But when I go to other page & refresh, site is not working. It\'s showin

7条回答
  •  悲哀的现实
    2020-12-05 10:35

    For me the solution was:

    location / {
                root /var/www/myapp/build;
                index index.html;
                try_files $uri /index.html$is_args$args =404;
        }
    

提交回复
热议问题