I uploaded the react.js application to the server. I am using nginx server. The application is working fine. But when I go to another page and update, the site does not work. It shows 404 No error found.
How can i solve this.
Thank.
react.js , react-router. , , http://a.com. http://a.com/b. . , url http://a.com/b , nginx, , , , 404.
react.js
react-router
http://a.com
http://a.com/b
nginx
, ( index.html) , nginx , . , nginx.conf sites-enabled
nginx.conf
sites-enabled
location / { try_files $uri /index.html; }
nginx $uri, , index.html .
$uri
index.html
, . location/{ try_files $uri/index.html; }
location/{ try_files $uri/index.html; }
? . .
Source: https://habr.com/ru/post/1675393/More articles:How to build an array of intervals from other intervals - algorithmFind the most common row or matrix mode of vectors - Python / NumPy - pythonPre-processing function of both continuous and categorical variables (integer type) with scikit-learn - pythonTrying to split an element of an array by space - javascripthow to make git log --graph the default value - gitIcons / images not displayed with TabBarBottom in React Native - react-nativeБаза данных _replicator не масштабируется, или мой дизайн нуждается в настройке - couchdbWhy is Hugo serving blank pages? - hugoHow to get a list of running android 7 applications (Nougat)? - androidF #: Do double reverse name names interfere with function names? - backticksAll Articles