diff --git a/easyai-proxy.conf b/easyai-proxy.conf index b0c5f15..0db4865 100644 --- a/easyai-proxy.conf +++ b/easyai-proxy.conf @@ -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 { diff --git a/https.sh b/https.sh index bc11f8d..9a9d096 100755 --- a/https.sh +++ b/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 仓库