自建证书
This commit is contained in:
16
README.md
16
README.md
@@ -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;
|
||||
```
|
||||
Reference in New Issue
Block a user