Nginx Support HTTPS interview
# yum-y Install OpenSSL openssl-devel
Then you give yourself a certificate.
# cd/usr/local/nginx/conf
1. Create private keys key with secret keys password
# OpenSSL genrsa-des3-out server.key 1024x768
2. Create a certificate to apply for the document CSR
# OpenSSL req-new-key server.key-out SERVER.CSR
3, clear the password of the private keys, regenerate the key without the secret keys (do not clear the password, restart the Web service request to enter the secret keys password, to avoid trouble, create a certificate before the West clear secret keys password)
# OpenSSL rsa-in server.key-out server1.key
4. Create a certificate CRT
# OpenSSL x509-req-days 365-in server.csr-signkey server1.key-out server.crt
Now that the certificate has been generated, the following is the configuration Nginx
server {
Listen 443;
SSL on;
Ssl_certificate /usr/local/nginx/conf/server.crt;
Ssl_certificate_key /usr/local/nginx/conf/server1.key;
}
Then restart the nginx.
If "[Emerg] 10464#0:unknown directive" SSL "in/usr/local/nginx-0.6.32/conf/nginx.conf:74" is present, the SSL module is not compiled into Nginx, Add "--with-http_ssl_module" to the Configure.
This article from "Meteor Yu" blog, declined reproduced!
Nginx Support HTTPS interview