Files
mengyamonitor/公网部署/monitor.api.shumengya.top.conf
2026-05-16 19:03:34 +08:00

48 lines
1.5 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.
# 萌芽监控 — 浏览器 / 前端对接 APIHTTPS
# 仅 REST + WebSocket → 9393。采集端 gRPC 为 **stream TCP 透传**,见 grpc.monitor.api.shumengya.top.conf并入 nginx 顶层 stream{})。
# 上游 IP 按实际修改(内网中心或可路由到的穿透内网地址)。
upstream mengyamonitor_http {
server 10.1.1.233:9393;
keepalive 32;
}
server {
listen 80;
listen [::]:80;
server_name monitor.api.shumengya.top;
location /.well-known/acme-challenge/ {
root /var/www/certbot;
}
location / {
return 301 https://$host$request_uri;
}
}
server {
listen 443 ssl;
listen [::]:443 ssl;
http2 on;
server_name monitor.api.shumengya.top;
ssl_certificate /etc/letsencrypt/live/monitor.api.shumengya.top/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/monitor.api.shumengya.top/privkey.pem;
include /etc/letsencrypt/options-ssl-nginx.conf;
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem;
location / {
proxy_pass http://mengyamonitor_http;
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 https;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_read_timeout 86400s;
proxy_send_timeout 86400s;
}
}