chore: Switch domain from admin.gogenex.com to admin.gogenex.cn

使用国内 .cn 域名用于 ICP 备案,支持国内 IP 直连加速。
国际域名 gogenex.com 保留在 Namecheap 不受影响。

变更:
- deploy.sh: 默认域名/邮箱改为 admin.gogenex.cn
- nginx 配置: 重命名为 admin.gogenex.cn.conf,替换所有域名引用
- DEPLOY.md: 更新所有域名引用

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
hailin 2026-02-11 05:18:22 -08:00
parent a2a42ebf23
commit 9ce42ed5ac
3 changed files with 27 additions and 27 deletions

View File

@ -19,7 +19,7 @@ frontend/admin-web/
├── Dockerfile # 三阶段 Docker 构建 ├── Dockerfile # 三阶段 Docker 构建
├── docker-compose.yml # Docker Compose 编排 ├── docker-compose.yml # Docker Compose 编排
├── nginx/ ├── nginx/
│ └── admin.gogenex.com.conf # Nginx HTTPS 配置模板 │ └── admin.gogenex.cn.conf # Nginx HTTPS 配置模板
├── package.json # Next.js 15 + React 18 ├── package.json # Next.js 15 + React 18
├── next.config.ts # Next.js 配置 (standalone 输出) ├── next.config.ts # Next.js 配置 (standalone 输出)
├── tsconfig.json # TypeScript 配置 ├── tsconfig.json # TypeScript 配置
@ -45,7 +45,7 @@ cd frontend/admin-web
sudo ./deploy.sh nginx install sudo ./deploy.sh nginx install
``` ```
部署完成后访问: https://admin.gogenex.com 部署完成后访问: https://admin.gogenex.cn
--- ---
@ -79,11 +79,11 @@ curl http://localhost:3000/api/health
在域名 DNS 管理中添加 A 记录: 在域名 DNS 管理中添加 A 记录:
``` ```
admin.gogenex.com<服务器公网 IP> admin.gogenex.cn<服务器公网 IP>
``` ```
确保: 确保:
- DNS 已生效 (可用 `dig admin.gogenex.com` 验证) - DNS 已生效 (可用 `dig admin.gogenex.cn` 验证)
- 服务器防火墙已放行 80 和 443 端口 - 服务器防火墙已放行 80 和 443 端口
### 第三步: 安装 Nginx + SSL 证书 ### 第三步: 安装 Nginx + SSL 证书
@ -136,7 +136,7 @@ sudo ./deploy.sh nginx ssl [域名] [邮箱]
sudo ./deploy.sh nginx reload sudo ./deploy.sh nginx reload
``` ```
默认域名: `admin.gogenex.com`,默认邮箱: `admin@gogenex.com` 默认域名: `admin.gogenex.cn`,默认邮箱: `admin@gogenex.com`
### 自定义域名部署 ### 自定义域名部署
@ -144,8 +144,8 @@ sudo ./deploy.sh nginx reload
```bash ```bash
# 1. 复制并修改 Nginx 配置模板 # 1. 复制并修改 Nginx 配置模板
cp nginx/admin.gogenex.com.conf nginx/myapp.example.com.conf cp nginx/admin.gogenex.cn.conf nginx/myapp.example.com.conf
# 编辑文件,替换所有 admin.gogenex.com 为新域名 # 编辑文件,替换所有 admin.gogenex.cn 为新域名
# 2. 使用自定义域名安装 # 2. 使用自定义域名安装
sudo ./deploy.sh nginx install myapp.example.com admin@example.com sudo ./deploy.sh nginx install myapp.example.com admin@example.com
@ -182,7 +182,7 @@ PORT=8080 ./deploy.sh start
### 证书位置 ### 证书位置
``` ```
/etc/letsencrypt/live/admin.gogenex.com/ /etc/letsencrypt/live/admin.gogenex.cn/
├── fullchain.pem # 完整证书链 ├── fullchain.pem # 完整证书链
├── privkey.pem # 私钥 ├── privkey.pem # 私钥
├── cert.pem # 服务器证书 ├── cert.pem # 服务器证书
@ -210,7 +210,7 @@ sudo certbot renew
```bash ```bash
sudo certbot certonly --force-renewal \ sudo certbot certonly --force-renewal \
--webroot --webroot-path=/var/www/certbot \ --webroot --webroot-path=/var/www/certbot \
-d admin.gogenex.com -d admin.gogenex.cn
sudo systemctl reload nginx sudo systemctl reload nginx
``` ```
@ -218,7 +218,7 @@ sudo systemctl reload nginx
## Nginx 配置说明 ## Nginx 配置说明
HTTPS 配置 (`nginx/admin.gogenex.com.conf`) 包含: HTTPS 配置 (`nginx/admin.gogenex.cn.conf`) 包含:
| 特性 | 说明 | | 特性 | 说明 |
|------|------| |------|------|
@ -260,14 +260,14 @@ docker compose build --no-cache 2>&1 | tee build.log
### SSL 证书申请失败 ### SSL 证书申请失败
常见原因: 常见原因:
1. DNS 未生效 - 用 `dig admin.gogenex.com` 检查 A 记录 1. DNS 未生效 - 用 `dig admin.gogenex.cn` 检查 A 记录
2. 80 端口未放行 - 用 `sudo ufw allow 80` 放行 2. 80 端口未放行 - 用 `sudo ufw allow 80` 放行
3. 防火墙/安全组拦截 - 检查云服务商安全组规则 3. 防火墙/安全组拦截 - 检查云服务商安全组规则
```bash ```bash
# 手动测试 ACME 验证路径 # 手动测试 ACME 验证路径
echo "test" > /var/www/certbot/.well-known/acme-challenge/test echo "test" > /var/www/certbot/.well-known/acme-challenge/test
curl http://admin.gogenex.com/.well-known/acme-challenge/test curl http://admin.gogenex.cn/.well-known/acme-challenge/test
# 应返回 "test" # 应返回 "test"
``` ```
@ -278,10 +278,10 @@ curl http://admin.gogenex.com/.well-known/acme-challenge/test
./deploy.sh logs ./deploy.sh logs
# Nginx 访问日志 # Nginx 访问日志
tail -f /var/log/nginx/admin.gogenex.com.access.log tail -f /var/log/nginx/admin.gogenex.cn.access.log
# Nginx 错误日志 # Nginx 错误日志
tail -f /var/log/nginx/admin.gogenex.com.error.log tail -f /var/log/nginx/admin.gogenex.cn.error.log
# Certbot 日志 # Certbot 日志
tail -f /var/log/letsencrypt/letsencrypt.log tail -f /var/log/letsencrypt/letsencrypt.log

View File

@ -19,8 +19,8 @@
# ./deploy.sh nginx status 查看 Nginx 状态 # ./deploy.sh nginx status 查看 Nginx 状态
# ./deploy.sh nginx reload 重载 Nginx 配置 # ./deploy.sh nginx reload 重载 Nginx 配置
# #
# 默认域名: admin.gogenex.com # 默认域名: admin.gogenex.cn
# 默认邮箱: admin@gogenex.com # 默认邮箱: admin@gogenex.cn
# #
# ============================================================================= # =============================================================================
@ -38,8 +38,8 @@ PROJECT_NAME="genex-admin-web"
IMAGE_NAME="genex-admin-web" IMAGE_NAME="genex-admin-web"
CONTAINER_NAME="genex-admin-web" CONTAINER_NAME="genex-admin-web"
DEFAULT_PORT=3000 DEFAULT_PORT=3000
DEFAULT_DOMAIN="admin.gogenex.com" DEFAULT_DOMAIN="admin.gogenex.cn"
DEFAULT_EMAIL="admin@gogenex.com" DEFAULT_EMAIL="admin@gogenex.cn"
# 脚本目录 # 脚本目录
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
@ -196,7 +196,7 @@ cmd_nginx_install() {
log_error "请先在 nginx/ 目录下创建 ${domain}.conf" log_error "请先在 nginx/ 目录下创建 ${domain}.conf"
log_info "" log_info ""
log_info "可以复制模板并修改:" log_info "可以复制模板并修改:"
log_info " cp nginx/admin.gogenex.com.conf nginx/${domain}.conf" log_info " cp nginx/admin.gogenex.cn.conf nginx/${domain}.conf"
log_info " 然后替换其中的域名和端口" log_info " 然后替换其中的域名和端口"
exit 1 exit 1
fi fi

View File

@ -1,9 +1,9 @@
# Genex Admin Web - Nginx HTTPS 配置 # Genex Admin Web - Nginx HTTPS 配置
# 域名: admin.gogenex.com # 域名: admin.gogenex.cn
# 后端: genex-admin-web (Next.js, 端口 3000) # 后端: genex-admin-web (Next.js, 端口 3000)
# #
# 此文件由 deploy.sh nginx install 自动部署到: # 此文件由 deploy.sh nginx install 自动部署到:
# /etc/nginx/sites-available/admin.gogenex.com # /etc/nginx/sites-available/admin.gogenex.cn
# #
# SSL 证书由 Let's Encrypt (certbot) 自动申请和管理 # SSL 证书由 Let's Encrypt (certbot) 自动申请和管理
@ -11,7 +11,7 @@
server { server {
listen 80; listen 80;
listen [::]:80; listen [::]:80;
server_name admin.gogenex.com; server_name admin.gogenex.cn;
# Let's Encrypt 验证目录 # Let's Encrypt 验证目录
location /.well-known/acme-challenge/ { location /.well-known/acme-challenge/ {
@ -28,11 +28,11 @@ server {
server { server {
listen 443 ssl http2; listen 443 ssl http2;
listen [::]:443 ssl http2; listen [::]:443 ssl http2;
server_name admin.gogenex.com; server_name admin.gogenex.cn;
# SSL 证书 (Let's Encrypt) # SSL 证书 (Let's Encrypt)
ssl_certificate /etc/letsencrypt/live/admin.gogenex.com/fullchain.pem; ssl_certificate /etc/letsencrypt/live/admin.gogenex.cn/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/admin.gogenex.com/privkey.pem; ssl_certificate_key /etc/letsencrypt/live/admin.gogenex.cn/privkey.pem;
# SSL 配置优化 # SSL 配置优化
ssl_session_timeout 1d; ssl_session_timeout 1d;
@ -48,8 +48,8 @@ server {
add_header Strict-Transport-Security "max-age=63072000" always; add_header Strict-Transport-Security "max-age=63072000" always;
# 日志 # 日志
access_log /var/log/nginx/admin.gogenex.com.access.log; access_log /var/log/nginx/admin.gogenex.cn.access.log;
error_log /var/log/nginx/admin.gogenex.com.error.log; error_log /var/log/nginx/admin.gogenex.cn.error.log;
# Gzip 压缩 # Gzip 压缩
gzip on; gzip on;