Compare commits

..

No commits in common. "ccfac882d717fba3ee1032d0961fb5bfaa694dd2" and "e7fa464edb2339254b9e3026bff3392a8b2e9e1a" have entirely different histories.

7 changed files with 4 additions and 156 deletions

8
.idea/.gitignore vendored
View File

@ -1,8 +0,0 @@
# 默认忽略的文件
/shelf/
/workspace.xml
# 基于编辑器的 HTTP 客户端请求
/httpRequests/
# Datasource local storage ignored files
/dataSources/
/dataSources.local.xml

View File

@ -1,10 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="cn.fjdmy.uniapp.UniappProjectDataService">
<option name="generalBasePath" value="$PROJECT_DIR$" />
<option name="manifestPath" value="$PROJECT_DIR$/manifest.json" />
<option name="pagesPath" value="$PROJECT_DIR$/pages.json" />
<option name="scanNum" value="1" />
<option name="type" value="store" />
</component>
</project>

View File

@ -1,12 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="WEB_MODULE" version="4">
<component name="NewModuleRootManager">
<content url="file://$MODULE_DIR$">
<excludeFolder url="file://$MODULE_DIR$/.tmp" />
<excludeFolder url="file://$MODULE_DIR$/temp" />
<excludeFolder url="file://$MODULE_DIR$/tmp" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>

View File

@ -1,8 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/.idea/easyai.iml" filepath="$PROJECT_DIR$/.idea/easyai.iml" />
</modules>
</component>
</project>

View File

@ -1,6 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="" vcs="Git" />
</component>
</project>

View File

@ -49,12 +49,6 @@ server {
try_files $uri =404;
}
# 专门处理企业微信验证文件的请求
# location = /WW_verify_9eWb5ozYfqE0Bb2i.txt {
# default_type text/plain; # 设置正确的Content-Type
# return 200 '9eWb5ozYfqE0Bb2i'; # 直接返回验证内容
# }
location / {
proxy_pass http://127.0.0.1:3010/;
proxy_redirect off; # 修改重定向处理
@ -95,20 +89,6 @@ 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 {

View File

@ -1,106 +1,18 @@
# 检查 Nginx 是否已安装
if command -v nginx &> /dev/null; then
echo "✅ Nginx 已安装,跳过安装步骤"
else
echo "🚀 安装 Nginx"
# 检测系统类型
if command -v apt &> /dev/null; then
# Debian/Ubuntu 系统
apt install -y nginx
elif command -v yum &> /dev/null; then
# CentOS/RHEL 系统
yum install -y nginx
elif command -v dnf &> /dev/null; then
# 较新版本的 Fedora/RHEL 系统
dnf install -y nginx
else
echo "❌ 不支持的操作系统:未找到支持的包管理器"
exit 1
fi
apt install -y nginx
fi
# 函数:尝试使用指定的包管理器安装
try_install() {
local cmd=$1
if command -v "$cmd" &> /dev/null; then
echo "📦 尝试使用 $cmd 安装 snapd..."
if sudo "$cmd" install -y snapd; then
return 0
fi
fi
return 1
}
# 检查 Certbot 是否已安装
if command -v certbot &> /dev/null; then
echo "✅ Certbot 已安装,跳过安装步骤"
else
echo "🚀 安装 Certbot"
# 检测系统类型
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 仓库
yum install -y epel-release
# 安装 snapd
# 检查是否已安装
if command -v snap &> /dev/null; then
echo "✅ snapd 已经安装"
exit 0
fi
echo "🔍 检测系统包管理器..."
# 尝试使用 dnf 安装
if try_install "dnf"; then
echo "✅ 使用 dnf 安装 snapd 成功"
# 尝试使用 yum 安装
elif try_install "yum"; then
echo "✅ 使用 yum 安装 snapd 成功"
# 尝试使用 apt-get 安装(适用于 Debian/Ubuntu
elif try_install "apt-get"; then
echo "✅ 使用 apt-get 安装 snapd 成功"
else
echo "❌ 无法安装 snapd未找到支持的包管理器"
exit 1
fi
# 启用 snapd 服务
systemctl enable --now snapd.socket
# 创建符号链接
ln -s /var/lib/snapd/snap /snap
# 安装 certbot
snap install --classic certbot
# Prepare the Certbot command
sudo ln -s /snap/bin/certbot /usr/bin/certbot
else
echo "❌ 不支持的操作系统"
exit 1
fi
fi
# 验证安装
echo "🔍 验证安装"
if command -v nginx &> /dev/null && command -v certbot &> /dev/null; then
echo "✅ Nginx 和 Certbot 安装成功"
nginx -v
certbot --version
else
echo "❌ 安装验证失败"
exit 1
sudo apt install -y certbot
sudo apt install -y python3-certbot-nginx
fi
echo "🚀 复制当前目录的配置文件到nginx配置文件目录"