Angular routes not available directly in nginx

Here's the deal: I installed the simplest nginx configuration for angular practice, and I configured routeProvider to use html5mode. So far, so good! I set the base to '/', my links to / view 1 and / view2 work fine, but only when I click these links on my index page. When I try to access them directly in the browser (or reload the page), nginx returns me 403 forbidden ones. This is a simple configuration, but I cannot find a simple explanation :(

I want everything to be configured in such a way that any route works fine, no need to explicitly set it (one by one) in my nginx site.conf. By the way, the permissions are good!

Here is the actual conf file:

server { listen *:80; server_name rbs.ang; root /_dev/angularjs/app; index index.html; charset UTF-8; location / { expires -1; add_header Pragma "no-cache"; add_header Cache-Control "no-store, no-cache, must-revalidate, post-check=0, pre-check=0"; try_files $uri $uri/ index.html; } } 
+7
angularjs nginx
source share

No one has answered this question yet.

See similar questions:

thirteen
NGINX and Angular 2

or similar:

1195
How do I access the $ scope variable in the browser console using AngularJS?
1006
What is the difference between angular -route and angular -ui-router?
954
Node.js + Nginx - What Now?
6
403 is prohibited in wordpress index with nginx, other pages work fine
2
Nginx server configuration share
one
NGINX Server Configuration for Static Applications
0
Nginx 403 error on a specific corner path
0
using nginx to execute a basic project with angular sowing
0
Nginx Unicorn AngularJS html5 URL Configuration

All Articles