server { listen 80; server_name _; root /usr/share/nginx/html; index index.html; # Apache en Sinbad2 termina TLS en https://sinbad2.ujaen.es/deckofcards # y reenvía el tráfico a este contenedor (puerto 8071) sin el prefijo público: # ProxyPass /deckofcards http://host.docker.internal:8071/ # El navegador sigue viendo /deckofcards/...; aquí llegan rutas como /, /api/, /assets/. location /api/ { proxy_pass http://backend:8000/api/; proxy_http_version 1.1; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $http_x_forwarded_proto; proxy_set_header X-Forwarded-Host $http_x_forwarded_host; } location / { try_files $uri $uri/ /index.html; } }