Update environment configuration and simplify nginx settings for API routing
This commit is contained in:
@@ -2,34 +2,11 @@ server {
|
||||
listen 80;
|
||||
server_name _;
|
||||
|
||||
# Le build Angular est dans /usr/share/nginx/html/browser
|
||||
root /usr/share/nginx/html/browser;
|
||||
index index.html;
|
||||
|
||||
# === Angular SPA ===
|
||||
# Angular SPA
|
||||
location / {
|
||||
try_files $uri $uri/ /index.html;
|
||||
}
|
||||
|
||||
# === Proxy PrestaShop ===
|
||||
# Côté Angular tu appelles : /gameovergne/ps/...
|
||||
# Traefik strip /gameovergne -> Nginx voit /ps/...
|
||||
location /ps/ {
|
||||
# ⚠ ICI : on force l'IPv4 de shop.gameovergne.fr
|
||||
proxy_pass https://83.166.157.136/api/;
|
||||
|
||||
# On garde le Host/SNI sur shop.gameovergne.fr pour TLS + Presta
|
||||
proxy_set_header Host shop.gameovergne.fr;
|
||||
|
||||
# SNI explicite, puisque proxy_pass utilise une IP maintenant
|
||||
proxy_ssl_server_name on;
|
||||
proxy_ssl_name shop.gameovergne.fr;
|
||||
|
||||
# Auth basic comme dans ton ancien proxy.conf.json
|
||||
proxy_set_header Authorization "Basic MkFRUEcxM01KOFgxMTdVNkZKNU5HSFBTOTNIRTM0QUI=";
|
||||
|
||||
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 $scheme;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user