The location block in your nginx config should be:
location / {
try_files $uri /index.html;
}
The problem is that requests to the index.html file work, but you’re not currently telling nginx to forward other requests to the index.html file too.
More Related Contents:
- Nginx — static file serving confusion with root & alias
- Nginx: Redirect non-www to www https
- Why is nginx responding to any domain name?
- How to edit nginx.conf to increase file size upload
- nginx doesn’t listen on port 80 twice?
- Nginx reverse proxy causing 504 Gateway Timeout
- Possible reason for NGINX 499 error codes
- nginx – client_max_body_size has no effect
- NGINX: upstream timed out (110: Connection timed out) while reading response header from upstream
- uwsgi upstart on amazon linux
- How to set the allowed url length for a nginx request (error code: 414, uri too large)
- nginx reverse proxy – how to serve multiple apps
- Tuning nginx worker_process to obtain 100k hits per min
- Dealing with nginx 400 “The plain HTTP request was sent to HTTPS port” error
- nginx: [emerg] “server” directive is not allowed here
- NGinx Default public www location?
- Use nginx to serve static files from subdirectories of a given directory
- How to serve all existing static files directly with NGINX, but proxy the rest to a backend server.
- Nginx Different Domains on Same IP
- How do you change the server header returned by nginx?
- Configure nginx with multiple locations with different root folders on subdomain
- nginx server_name wildcard or catch-all
- “proxy_pass” cannot have URI part in location given by regular expression
- Nginx reverse proxy multiple backends
- Nginx: Reject request if header is not present or wrong
- React Router BrowserRouter leads to “404 Not Found – nginx ” error when going to subpage directly without through a home-page click
- nginx add headers when returning 400 codes
- NGINX try_files + alias directives
- SSL Pass-Through in Nginx Reverse proxy?
- Assigning vhosts to Docker ports