2024-04-09 10:09:33 +08:00
|
|
|
|
|
|
|
worker_processes 1;
|
|
|
|
|
|
|
|
events {
|
|
|
|
worker_connections 1024;
|
|
|
|
}
|
|
|
|
|
|
|
|
http {
|
|
|
|
include mime.types;
|
|
|
|
default_type application/octet-stream;
|
|
|
|
sendfile on;
|
|
|
|
keepalive_timeout 65;
|
|
|
|
|
2024-04-12 18:03:51 +08:00
|
|
|
gzip on;
|
2024-04-09 10:09:33 +08:00
|
|
|
|
|
|
|
server {
|
|
|
|
listen 80;
|
|
|
|
server_name localhost;
|
|
|
|
|
|
|
|
location / {
|
2024-04-12 18:03:51 +08:00
|
|
|
root /app/nginx/html;
|
|
|
|
index index.html;
|
|
|
|
# try_files $uri $uri/ /index.html;
|
|
|
|
if ($request_filename ~* ^.*?.(html|htm)$) {
|
|
|
|
add_header Cache-Control "private, no-store, no-cache, must-revalidate, proxy-revalidate";
|
|
|
|
}
|
2024-04-09 10:09:33 +08:00
|
|
|
}
|
|
|
|
|
2024-04-12 18:03:51 +08:00
|
|
|
location /stage-api/ {
|
|
|
|
proxy_ignore_client_abort on;
|
|
|
|
client_max_body_size 600M;
|
|
|
|
client_body_buffer_size 600M;
|
|
|
|
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-NginX-Proxy true;
|
|
|
|
add_header Access-Control-Allow-Origin $http_origin;
|
|
|
|
add_header Access-Control-Allow-Method GET,POST,OPTIONS;
|
|
|
|
add_header Access-Control-Allow-Headers version,location,lat,long,device,did,macaws_sign;
|
2024-04-12 18:17:35 +08:00
|
|
|
proxy_pass http://172.24.0.2:7781/;
|
2024-04-09 10:49:14 +08:00
|
|
|
}
|
|
|
|
|
2024-04-12 18:03:51 +08:00
|
|
|
|
|
|
|
location /file {
|
|
|
|
alias /file;
|
2024-04-09 10:09:33 +08:00
|
|
|
}
|
|
|
|
|
2024-04-12 18:03:51 +08:00
|
|
|
#error_page 404 /404.html;
|
2024-04-09 10:09:33 +08:00
|
|
|
error_page 500 502 503 504 /50x.html;
|
|
|
|
location = /50x.html {
|
|
|
|
root html;
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|