diff --git a/nginx/default.conf b/nginx/default.conf index cf0acc1..ba94583 100644 --- a/nginx/default.conf +++ b/nginx/default.conf @@ -1,14 +1,15 @@ server { listen 80; - # Accès à l'interface principale (Open WebUI) + # Accès à l'interface principale (Corrigé sur le port 8080) location / { - proxy_pass http://open-webui:3000; + proxy_pass http://open-webui:8080; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; } - # Accès direct aux APIs (Optionnel, pour les étudiants avancés) + # Accès aux APIs (Optimisé pour Gradio/Audio) location /audio/ { proxy_pass http://audio-api:7860/; proxy_buffering off; @@ -16,5 +17,9 @@ server { proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade"; + proxy_set_header Host $host; + + # Ajout de timeouts pour éviter les 504 pendant que l'IA réfléchit + proxy_read_timeout 600; } } \ No newline at end of file