location / { try_files $uri $uri/ /index.html; }
Last active
November 29, 2023 12:00
-
-
Save ofarukcaki/f59f6eed6230b65dce326434a25010e0 to your computer and use it in GitHub Desktop.
create-react-app with react-router Nginx 404 error solution in page refresh
seems it does not work
Likewise here. This isn't working for me either. Many people online have suggested this.
It's working. Minimal config:
server {
listen 80;
server_name localhost;
root /usr/share/nginx/html;
location / {
try_files $uri $uri/ /index.html;
}
}
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The only code that worked out of many, thanks!