Most primary usage of SSL nginx web hosting articles

Note: You must be used to start encryption parameter --with-http_ssl_module nginx mounted in the source module.

genrsa openssl > CERT .key // issued their own private use openssl

REQ OpenSSL - new new -x509- -key CERT .key > CERT .pem certificate issued //

Nginx modify configuration files, encrypted Web site set up virtual hosts

server {

listen 443 ssl;

server_name          www.baidu.com;

CERT ssl_certificate .pem ; # This is the certificate file

CERT ssl_certificate_key .key ; # This is the private key file

ssl_session_cache shared:SSL:1m;

ssl_session_timeout 5m;

ssl_ciphers HIGH:!aNULL:!MD5;

ssl_prefer_server_ciphers on;

  location / {

  root html;

  index index.html index.htm;

  }

}

 

Guess you like

Origin www.cnblogs.com/lqinghua/p/11619749.html