Files
thebet365/docker/nginx/admin.conf
Mars b1ef7dc6f9 feat(admin): set /admin base path for reverse proxy deployment
Configure Vite base, Vue Router history, axios baseURL and container
Nginx to serve the admin panel under /admin/ path prefix.

🤖 Generated with [Qoder][https://qoder.com]
2026-06-09 09:18:16 +08:00

29 lines
703 B
Plaintext

server {
listen 80;
server_name _;
root /usr/share/nginx/html;
index index.html;
resolver 127.0.0.11 valid=10s ipv6=off;
gzip on;
gzip_types text/plain text/css application/json application/javascript text/xml application/xml;
location /admin/api/ {
proxy_pass http://api:3000/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 $scheme;
}
location /admin/ {
try_files $uri $uri/ /admin/index.html;
}
location / {
return 301 /admin/;
}
}