38 lines
1.1 KiB
Plaintext
38 lines
1.1 KiB
Plaintext
|
|
# 仅供参考: 内容已内联到 admin-web.Dockerfile
|
||
|
|
server {
|
||
|
|
listen 80;
|
||
|
|
server_name _;
|
||
|
|
root /usr/share/nginx/html;
|
||
|
|
index index.html;
|
||
|
|
client_max_body_size 50m;
|
||
|
|
add_header X-Frame-Options SAMEORIGIN always;
|
||
|
|
|
||
|
|
location ~* \.(?:js|css|png|jpg|jpeg|gif|svg|woff2?|ttf|map)$ {
|
||
|
|
expires 30d;
|
||
|
|
add_header Cache-Control "public, max-age=2592000, immutable";
|
||
|
|
try_files $uri =404;
|
||
|
|
}
|
||
|
|
|
||
|
|
location /api/ {
|
||
|
|
proxy_pass http://single-admin-api:30032/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;
|
||
|
|
proxy_read_timeout 120s;
|
||
|
|
client_max_body_size 50m;
|
||
|
|
}
|
||
|
|
|
||
|
|
location /adminapi/ {
|
||
|
|
proxy_pass http://single-admin-api:30032/adminapi/;
|
||
|
|
proxy_set_header Host $host;
|
||
|
|
proxy_set_header X-Real-IP $remote_addr;
|
||
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||
|
|
}
|
||
|
|
|
||
|
|
location / {
|
||
|
|
try_files $uri $uri/ /index.html;
|
||
|
|
}
|
||
|
|
}
|