自建证书

This commit is contained in:
2024-02-19 18:17:40 +08:00
parent fc6f8f051a
commit 9dc0e4fb6e
4 changed files with 73 additions and 0 deletions

View File

@@ -156,4 +156,20 @@ docker build --no-cache \
-t mojosdk:latest \
-f mojo/examples/docker/Dockerfile.mojosdk .
docker buildx build --build-arg AUTH_KEY=mut_efe460b898e3482bb6208bfcd4a51d7e -t hotwa/notebook:latest . -f Dockerfile.base-notebook --load
```
## 自建证书
openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout nginx-selfsigned.key -out nginx-selfsigned.crt
openssl dhparam -out dhparam.pem 2048
这将会在当前目录生成私钥nginx-selfsigned.key自签名证书nginx-selfsigned.crt以及Diffie-Hellman参数dhparam.pem。
然后在您的nginx.conf中您需要使用这些文件
```shell
ssl_certificate /path/to/nginx-selfsigned.crt;
ssl_certificate_key /path/to/nginx-selfsigned.key;
ssl_dhparam /path/to/dhparam.pem;
```