Windows部署: 后端端口统一改为8080

This commit is contained in:
2026-09-11 16:34:30 +08:00
parent 064dbb7561
commit fc51641700
4 changed files with 8 additions and 8 deletions
+1 -1
View File
@@ -56,7 +56,7 @@ function Install-NssmService {
New-Item -ItemType Directory -Force -Path (Join-Path $RepoRoot "logs") | Out-Null
New-Item -ItemType Directory -Force -Path (Join-Path $RepoRoot "frontend\logs") | Out-Null
# --- 后端:wagtailcms-backend(waitress WSGI,监听 127.0.0.1:8000) -------------
# --- 后端:wagtailcms-backend(waitress WSGI,监听 127.0.0.1:8080) -------------
Install-NssmService `
-Name "wagtailcms-backend" `
-Application $Powershell `
+3 -3
View File
@@ -1,6 +1,6 @@
# wagtailcms Windows Server 生产环境 Nginx 反向代理配置模板
# (Windows 版 nginx 不支持 Unix Domain Socket 反向代理到 gunicorn,
# 后端改用监听 127.0.0.1:8000 的 waitress,因此这里全部走 TCP 端口。)
# 后端改用监听 127.0.0.1:8080 的 waitress,因此这里全部走 TCP 端口。)
#
# 使用方法:
# 1. 下载 nginx for Windows(http://nginx.org/en/download.html),解压到 C:\nginx
@@ -10,7 +10,7 @@
# 3. 将下面的 example.com / cms.example.com 替换为真实域名
# 4. nginx.exe -t 测试配置,nginx.exe -s reload 重载
#
# 架构:浏览器 -> Nginx(TLS 终止) -> {Next.js:3000(页面渲染) | waitress:8000(/admin /api /static /media 等后端路径)}
# 架构:浏览器 -> Nginx(TLS 终止) -> {Next.js:3000(页面渲染) | waitress:8080(/admin /api /static /media 等后端路径)}
# ---------------------------------------------------------------------------
# 后端管理域名(Wagtail 管理后台 / API),对应 WAGTAILADMIN_BASE_URL
@@ -34,7 +34,7 @@ server {
}
location / {
proxy_pass http://127.0.0.1:8000;
proxy_pass http://127.0.0.1:8080;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
+1 -1
View File
@@ -18,4 +18,4 @@ if (-not (Test-Path $python)) {
throw "找不到虚拟环境解释器:$python,请先创建虚拟环境并安装 requirements/production-windows.txt"
}
& $python -m waitress --listen=127.0.0.1:8000 --threads=8 wagtailcms.wsgi:application
& $python -m waitress --listen=127.0.0.1:8080 --threads=8 wagtailcms.wsgi:application