location / { try_files $uri $uri/ /index.html; } location /api{ proxy_pass http://***.***.***/api; }