Nginx Support HTTPS interview

Source: Internet
Author: User


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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.