server { listen 80; location = /qr { # Exact match for /qr proxy_pass http://backend:3000/qr; } location / { root /usr/share/nginx/html; index index.html; } }