server { listen 80; listen [::]:80; root /var/www/etcpool; index index.html index.htm index.nginx-debian.html; server_name etc.yourdomain.name; location / { try_files $uri $uri/ =404; } location /api { proxy_pass http://127.0.0.1:8080/api; } }