Signed-off-by: 南通一次元科技有限公司 <guwangtu@icimeta.com>
This commit is contained in:
1 parent
b91954df4a
commit
4b5b119c18
23 files changed
+526
-53
No files matched your search
@@ -0,0 +1,58 @@
|
||||
# Nginx 反向代理与 HTTPS 配置
|
||||
|
||||
## 域名与服务映射
|
||||
|
||||
| 域名 | 后端 |
|
||||
|------|------|
|
||||
| git.icimeta.com | 127.0.0.1:3000(Gitea) |
|
||||
| sj.icimeta.com | 127.0.0.1:8080(审计系统统一入口) |
|
||||
| audit.sj.icimeta.com | 127.0.0.1:8000(审计项目管理) |
|
||||
| risk.sj.icimeta.com | 127.0.0.1:8001(风险管理) |
|
||||
| contract.sj.icimeta.com | 127.0.0.1:8090(合同审核) |
|
||||
|
||||
- HTTP 80 自动 301 到 HTTPS
|
||||
- 证书:`/www/server/panel/vhost/cert/icimeta-sub/`(Let's Encrypt,acme.sh 自动续期)
|
||||
- 证书 SAN:git.icimeta.com、sj.icimeta.com、audit/risk/contract.sj.icimeta.com
|
||||
|
||||
## 服务器配置路径
|
||||
|
||||
```
|
||||
/www/server/panel/vhost/nginx/git.icimeta.com.conf
|
||||
/www/server/panel/vhost/nginx/sj.icimeta.com.conf
|
||||
/www/server/panel/vhost/nginx/audit.sj.icimeta.com.conf
|
||||
/www/server/panel/vhost/nginx/risk.sj.icimeta.com.conf
|
||||
/www/server/panel/vhost/nginx/contract.sj.icimeta.com.conf
|
||||
```
|
||||
|
||||
原有 `yicimeta.com.conf`(icimeta.com / www.icimeta.com)未修改。本次修改前已备份到:
|
||||
`/opt/backup/nginx/vhost_nginx_20261206_204408.tar.gz`
|
||||
|
||||
## 证书申请/续期
|
||||
|
||||
使用 acme.sh:
|
||||
|
||||
```bash
|
||||
/root/.acme.sh/acme.sh --issue --webroot /www/wwwroot/icimeta.com \
|
||||
-d git.icimeta.com -d sj.icimeta.com \
|
||||
-d audit.sj.icimeta.com -d risk.sj.icimeta.com -d contract.sj.icimeta.com \
|
||||
--keylength ec-256
|
||||
```
|
||||
|
||||
安装到 Nginx 并 reload:
|
||||
|
||||
```bash
|
||||
/root/.acme.sh/acme.sh --install-cert -d git.icimeta.com --ecc \
|
||||
--key-file /www/server/panel/vhost/cert/icimeta-sub/privkey.pem \
|
||||
--fullchain-file /www/server/panel/vhost/cert/icimeta-sub/fullchain.pem \
|
||||
--reloadcmd "nginx -s reload"
|
||||
```
|
||||
|
||||
## 验证
|
||||
|
||||
```bash
|
||||
curl -I https://git.icimeta.com/
|
||||
curl -I https://sj.icimeta.com/
|
||||
curl -I https://audit.sj.icimeta.com/
|
||||
curl -I https://risk.sj.icimeta.com/
|
||||
curl -I https://contract.sj.icimeta.com/
|
||||
```
|
||||
Reference in new issue
Block a user