diff --git a/client/nginx.conf b/client/nginx.conf index 15f5137..42016aa 100644 --- a/client/nginx.conf +++ b/client/nginx.conf @@ -2,25 +2,28 @@ server { listen 80; server_name _; - root /usr/share/nginx/html; + # ⚠ Ici on pointe directement sur le dossier "browser" + root /usr/share/nginx/html/browser; index index.html; - # --- Angular SPA sous /gameovergne --- - location /gameovergne/ { - try_files $uri $uri/ /gameovergne/index.html; + # === App Angular (SPA) servie à la racine du conteneur === + # Traefik enlève déjà /gameovergne, donc ici on voit "/" + location / { + try_files $uri $uri/ /index.html; } - # --- Proxy PrestaShop --- - # Angular appelle /gameovergne/ps/xxx - # On doit forward vers https://shop.gameovergne.fr/api/xxx - location ^~ /gameovergne/ps/ { - # IMPORTANT : supprime le prefixe /gameovergne/ps/ - rewrite ^/gameovergne/ps/(.*)$ /api/$1 break; - - proxy_pass https://shop.gameovergne.fr; + # === Proxy PrestaShop : /ps/* -> https://shop.gameovergne.fr/api/* === + # Côté navigateur, ton code appelle /gameovergne/ps/... + # Traefik strippe /gameovergne -> Nginx voit /ps/... + location /ps/ { + proxy_pass https://shop.gameovergne.fr/api/; + # "changeOrigin: true" proxy_set_header Host shop.gameovergne.fr; + + # Auth Basic comme dans ton ancien proxy.conf.json proxy_set_header Authorization "Basic MkFRUEcxM01KOFgxMTdVNkZKNU5HSFBTOTNIRTM0QUI="; + proxy_ssl_server_name on; proxy_set_header X-Real-IP $remote_addr;