mirror of
https://github.com/chatopera/cosin.git
synced 2025-08-14 05:15:17 +08:00
Created 私有部署配置HTTPS (markdown)
parent
c29c488a10
commit
fba31dc20b
46
私有部署配置HTTPS.md
Normal file
46
私有部署配置HTTPS.md
Normal file
@ -0,0 +1,46 @@
|
|||||||
|
# 私有部署配置HTTPS
|
||||||
|
针对春松客服开源版的HTTPS配置方案。
|
||||||
|
|
||||||
|
## 下载源码
|
||||||
|
|
||||||
|
https://github.com/chatopera/cosin
|
||||||
|
|
||||||
|
```
|
||||||
|
git clone https://github.com/chatopera/cosin.git
|
||||||
|
cd cosin
|
||||||
|
```
|
||||||
|
|
||||||
|
以下内容假设源码路径是cosin。
|
||||||
|
|
||||||
|
## 配置NGINX
|
||||||
|
本节目的配置 nginx。
|
||||||
|
春松客服官方包含nginx的docker容器,按照如下方案配置NGINX。
|
||||||
|
|
||||||
|
### 复制证书
|
||||||
|
复制证书到 ```nginx/certs``` 目录
|
||||||
|
|
||||||
|
```
|
||||||
|
cd cosin
|
||||||
|
cp nginx/templates/ssl.conf nginx/conf.d/default.conf
|
||||||
|
```
|
||||||
|
|
||||||
|
修改 `nginx/conf.d/default.conf` 添加如下配置,`YOUR_CER`和`YOUR_KEY` 替换为真实证书名字,完整配置参考 `nginx/templates/ssl.conf`.
|
||||||
|
|
||||||
|
```
|
||||||
|
listen 443 ssl;
|
||||||
|
|
||||||
|
ssl_certificate /certs/YOUR_CER.cer;
|
||||||
|
ssl_certificate_key /certs/YOUR_KEY.key;
|
||||||
|
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
|
||||||
|
ssl_ciphers HIGH:!aNULL:!MD5;
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
## 配置春松客服contact-center
|
||||||
|
|
||||||
|
修改 `.env` 设置 `CC_SOCKET_PORT=443`,使websocket走443端口。
|
||||||
|
|
||||||
|
## 重启项目
|
||||||
|
执行 ```docker-compose restart``` 重启项目
|
||||||
|
|
||||||
|
启动完成后,使用https地址访问测试。
|
Loading…
x
Reference in New Issue
Block a user