server { listen 80 default_server; listen [::]:80 default_server; server_name _; root /etc/nginx/www; index index.html; location / { index index.html; try_files $uri $uri/ /index.html; } location /invoicer/ { add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS'; proxy_pass http://localhost:8181/api/; } }