Nginx Configuration HTTPS

Source: Internet
Author: User

Recently in the study nginx, the whole good encounter a demand is that the server and the client transfer between the content is encrypted, to prevent the middle of the leakage of information, but to the certificate service provider that the certificate is not cost-effective, because the access to the server are insiders, so they issued their own certificates, Ignore the browser's untrusted alerts. The following is the issuance certificate and configuration process.

1, first ensure that the machine is installed with OpenSSL and Openssl-devel

# yum Install openssl# yum install OpenSSL-devel

2. Generate certificate

/etc/nginx/-des3-out1024x768-new -key server.key-out-  in server.key.org- out Server.key
The last token certificate uses the above private key and csr:# OpenSSL x509-req-days 365-in server.csr-signkey server.key-out server.crt

3. Configure Nginxto include the newly marked certificate and private key

server {    server_name your_domainname_here;     443 ;    SSL on;     server.crt;     Server.key;}

4, restart the nginx can be.

Nginx Configuration HTTPS

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.