I've setup nginx for serving my node web app (api + web) but as I see the server is only responding to "/" (web root) calls. When I test it I see the main web page (located at /index.html) but with no images or css styles and also the api which is in route /api/v1/.... (/api/v1/users, /api/v1/cars and so on) can't be reached because nginx is responding "not found".
Current nginx configuration is:
server {
listen 80;
server_name localhost www.mydomain.com mydomain.com
access_log off;
error_log off;
location = / {
proxy_pass http://127.0.0.1:3000;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Real-IP $remote_addr;
}
}
How can I configure nginx in order to serve all routes?