33 lines
1019 B
Nginx Configuration File
33 lines
1019 B
Nginx Configuration File
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 ===
|
|
# Traefik a déjà supprimé /gameovergne, donc ici on sert tout sur /
|
|
location / {
|
|
try_files $uri $uri/ /index.html;
|
|
}
|
|
|
|
# === Proxy PrestaShop ===
|
|
# Côté Angular tu appelles : /gameovergne/ps/...
|
|
# Traefik strip /gameovergne -> Nginx voit /ps/...
|
|
location /ps/ {
|
|
proxy_pass https://shop.gameovergne.fr/api/;
|
|
|
|
# équivalent 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;
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
proxy_set_header X-Forwarded-Proto $scheme;
|
|
}
|
|
} |