Files
hotel-biz-h5/nginx/default.conf.template
2026-07-01 12:19:40 +08:00

78 lines
1.9 KiB
Plaintext

server {
listen 10086;
server_name _;
root /usr/share/nginx/html;
index index.html;
client_max_body_size 20m;
gzip on;
gzip_types text/plain text/css application/javascript application/json image/svg+xml;
location = /index.html {
add_header Cache-Control "no-cache";
}
location /assets/ {
expires 30d;
add_header Cache-Control "public, immutable";
try_files $uri =404;
}
location ^~ /hotel-staff-h5/assets/ {
rewrite ^/hotel-staff-h5/(.*)$ /$1 break;
expires 30d;
add_header Cache-Control "public, immutable";
try_files $uri =404;
}
location = /hotel-staff-h5 {
return 301 /hotel-staff-h5/;
}
location ^~ /hotel-staff-h5/ {
try_files $uri $uri/ /index.html;
}
location /auth/ {
proxy_pass ${BACKEND_GATEWAY}/auth/;
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/ {
proxy_pass ${BACKEND_GATEWAY}/admin/;
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 /hotelStaff/ {
proxy_pass ${BACKEND_GATEWAY}/hotelStaff/;
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 /hotelBiz/ {
proxy_pass ${BACKEND_GATEWAY}/hotelBiz/;
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 / {
try_files $uri $uri/ /index.html;
}
}