开启模块 —with-http_ssl_module

ssl

| Syntax: | ssl on | off;

| | —- | —- | | Default: | ssl off; | | Context: | http, server |

listen 443 ssl; # 配合 listen 更通用


ssl_certificate

| Syntax: | ssl_certificate file;

| | —- | —- | | Default: | — | | Context: | http, server |

ssl_certificate_key

| Syntax: | ssl_certificate_key file;

| | —- | —- | | Default: | — | | Context: | http, server |

ssl_session_cache

| Syntax: | ssl_session_cache off | none | [builtin[:size]] [shared:name:size];

| | —- | —- | | Default: | ssl_session_cache none; | | Context: | http, server |

ssl_session_timeout

| Syntax: | ssl_session_timeout time;

| | —- | —- | | Default: | ssl_session_timeout 5m; | | Context: | http, server |

ssl_ciphers

| Syntax: | ssl_ciphers ciphers;

| | —- | —- | | Default: | ssl_ciphers HIGH:!aNULL:!MD5; | | Context: | http, server |

ssl_prefer_server_ciphers

| Syntax: | ssl_prefer_server_ciphers on | off;

| | —- | —- | | Default: | ssl_prefer_server_ciphers off; | | Context: | http, server |