Files
CmiiDeploy/999-部署模板/202604-飞服模板/real-public-nginx.conf
2026-05-19 14:28:44 +08:00

123 lines
4.1 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

upstream cc_server {
ip_hash;
server 127.0.0.1:30500;
}
server {
listen 8088;
server_name localhost;
location / {
proxy_pass http://cc_server;
client_max_body_size 5120m;
client_body_buffer_size 5120m;
client_body_timeout 6000s;
proxy_send_timeout 10000s;
proxy_read_timeout 10000s;
proxy_connect_timeout 600s;
proxy_max_temp_file_size 5120m;
proxy_request_buffering on;
proxy_buffering off;
proxy_buffer_size 4k;
proxy_buffers 4 12k;
proxy_set_header Host fake-domain.ahyd-app.io;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
location /center/ws {
proxy_pass http://192.168.0.6:38083/mqtt;
proxy_http_version 1.1;
proxy_set_header Sec-WebSocket-Protocol mqtt;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "Upgrade";
proxy_set_header X-real-ip $remote_addr;
proxy_set_header X-Forwarded-For $remote_addr;
}
##############2.1变动#########################
# gis模型地址
location /converge/bigdata/download/ {
# 使用 rewrite + break 剥离前缀,同时保留 URL 编码(避免 %2F 被二次编码)
rewrite ^/converge/bigdata/download/(.*)$ /$1 break;
# 使用内网minio数据端口
proxy_pass http://10.22.48.7:39010/;
# 关键:必须将 Host 固定为 MinIO 后端地址,否则签名校验失败
proxy_set_header Host 10.22.48.7:39010;
# 查询字符串AWS 签名参数)由 nginx 自动透传,无需额外配置
proxy_pass_request_headers 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;
# 关闭缓冲,适合大文件(如 GeoTIFF流式传输
proxy_buffering off;
proxy_request_buffering off;
# 大文件下载超时设置
proxy_connect_timeout 60s;
proxy_send_timeout 300s;
proxy_read_timeout 300s;
}
# 高德内网代理
location /_AMapService/ {
proxy_pass https://restapi.amap.com/;
}
####删除掉/center/storage的配置#######
########################end##################
location /api/mqtt_ws2/token {
proxy_pass http://192.168.0.6:38083/mqtt;
proxy_http_version 1.1;
proxy_set_header Sec-WebSocket-Protocol mqtt;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "Upgrade";
proxy_set_header X-real-ip $remote_addr;
proxy_set_header X-Forwarded-For $remote_addr;
}
location /rtc/v1/ {
add_header Access-Control-Allow-Headers X-Requested-With;
add_header Access-Control-Allow-Methods GET,POST,OPTIONS;
proxy_pass http://127.0.0.1:30985/rtc/v1/;
}
location /_AMapService/v4/map/styles {
set $args "$args&jscode=cf66cea95bdcdfcf8048456b36f357a1";
proxy_pass https://webapi.amap.com/v4/ap/styles;
}
location /_AMapService/ {
set $args "$args&jscode=cf66cea95bdcdfcf8048456b36f357a1";
proxy_pass https://restapi.amap.com/;
}
location ~ ^/.*/(actuator|swagger-resources|api-docs|env|ping|health)(/|$) {
return 403;
}
location /live-play/flv/ {
proxy_pass http://ZLM_HOST_IP:7088/;
}
location /live-play/hls/ {
proxy_pass http://ZLM_HOST_IP:7088/zlm/hls/;
}
location /live-play/webrtc {
proxy_pass http://ZLM_HOST_IP:7088/index/api/webrtc;
}
location /live-play/whip {
proxy_pass http://ZLM_HOST_IP:7088/index/api/whip;
}
location /live-replay/hls-by-time-range/ {
proxy_pass http://MASTET_IN_IP:37086/api/v2/storage/hls-by-time-range/;
}
location /live-replay/fetch_file/ {
proxy_pass http://MASTET_IN_IP:37086/api/v2/storage/fetch_file/;
}
location /live-replay/hls-downloader {
proxy_pass http://MASTET_IN_IP:37080/hls-downloader;
}
}