优化MCP消息转发Nginx配置文件
This commit is contained in:
parent
eaba13df5b
commit
ccfac882d7
@ -95,6 +95,20 @@ server {
|
||||
proxy_set_header Connection $connection_upgrade;
|
||||
proxy_buffering off; # 对于 WebSocket 连接禁用缓冲
|
||||
}
|
||||
# 转发/mcp/messages 消息到3001
|
||||
location /mcp {
|
||||
proxy_pass http://127.0.0.1:3001/mcp;
|
||||
proxy_read_timeout 300s;
|
||||
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_http_version 1.1;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection $connection_upgrade;
|
||||
proxy_buffering off; # 对于 WebSocket 连接禁用缓冲
|
||||
}
|
||||
|
||||
}
|
||||
# chatapi 大语言模型转发子域名配置
|
||||
server {
|
||||
|
6
https.sh
6
https.sh
@ -40,6 +40,12 @@ else
|
||||
if [ -f /etc/debian_version ]; then
|
||||
# Ubuntu/Debian 系统
|
||||
apt install -y certbot python3-certbot-nginx
|
||||
# 也可以使用snapd安装
|
||||
# apt install -y snapd
|
||||
# # 使用snap安装 certbot
|
||||
# snap install --classic certbot
|
||||
# # Prepare the Certbot command
|
||||
# sudo ln -s /snap/bin/certbot /usr/bin/certbot
|
||||
elif [ -f /etc/redhat-release ]; then
|
||||
# CentOS/RHEL 系统
|
||||
# 首先安装 EPEL 仓库
|
||||
|
Loading…
Reference in New Issue
Block a user