前提条件:
证书公钥(以crt结尾)
证书私钥(以key结尾)
nginx配置如下(下面新增的内容是必须要配置的,其它的省略部分该怎么配置还是怎么配置):
点击(此处)折叠或打开
- server {
- listen 443;
- server_name xxx.xxx.cn;
- ssl on;
- ssl_certificate sslkey/_.xxx.xxx_bundle.crt;
- ssl_certificate_key sslkey/_.xxx.xxx.key;
- ssl_session_timeout 5m;
- ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
- ssl_ciphers AESGCM:ALL:!DH:!EXPORT:!RC4:+HIGH:!MEDIUM:!LOW:!aNULL:!eNULL;
- ssl_prefer_server_ciphers on;
-
...//省略部分
-
}
点击(此处)折叠或打开
-
- connectionTimeout="20000"
- redirectPort="8443" minSpareThreads="50"
- enableLookups="false" disableUploadTimeout="true"
- acceptCount="300" maxThreads="400" processorCache="400"
- URIEncoding="UTF-8"/>
点击(此处)折叠或打开
-
- connectionTimeout="20000"
- redirectPort="443" minSpareThreads="50"
- proxyPort="443"
- enableLookups="false" disableUploadTimeout="true"
- acceptCount="300" maxThreads="400" processorCache="400"
- URIEncoding="UTF-8"/>
当然如果前端是nginx,后端是apache服务器,那apache就不用做任何配置,直接和配置nginx证书一样就行。