1. 虚拟主机的证书配置
Syntax: | ssl_certificate |
---|---|
Default: | — |
Context: | http , server |
Specifies a file
with the certificate in the PEM format for the given virtual server.
2. 虚拟主机的私钥文件
Syntax: | ssl_certificate_key |
---|---|
Default: | — |
Context: | http , server |
Specifies a file
with the secret key in the PEM format for the given virtual server.
3. 加密算法配置
Syntax: | ssl_ciphers |
---|---|
Default: | ssl_ciphers HIGH:!aNULL:!MD5; |
Context: | http , server |
Specifies the enabled ciphers. The ciphers are specified in the format understood by the OpenSSL library, for example:
ssl_ciphers ALL:!aNULL:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP;
4. 传输协议版本配置
Syntax: | ssl_protocols [ |
---|---|
Default: | ssl_protocols TLSv1 TLSv1.1 TLSv1.2; |
Context: | http , server |
Enables the specified protocols.
TheTLSv1.1
andTLSv1.2
parameters (1.1.13, 1.0.12) work only when OpenSSL 1.0.1 or higher is used.
The
TLSv1.3
parameter (1.13.0) works only when OpenSSL 1.1.1 built with TLSv1.3 support is used.
Reference:
1. https://nginx.org/en/docs/http/ngx_http_ssl_module.html;
2. https://nginx.org/en/docs/http/configuring_https_servers.html;