Nginx Configure SSL Security certificate avoid start input PEM pass phrase

Source: Internet
Author: User
Tags openssl rsa

The previous two articles have been very good introduction of the Nginx configuration SSL Some cases, the configuration of nginx every boot to lose two times Pem pass phrase, is very uncomfortable, especially after the server restart, Nginx can not automatically start, you must manually start and enter the trouble of PEM Pass phrase. How to avoid nginx boot appears enter PEM pass phrase?

After turning to the almighty search engine, finally got the solution of the method:

This may be the case when setting the private key key when the password settings are written to the key file, causing the Nginx/apache and other series of servers at startup requires the Enter PEM pass phrase. What we need to do is peel this password and generate the Server.key.unsecure file using the following OpenSSL command:

OpenSSL rsa-in server.key-out server.key.unsecure

Refer to "Can I skip the PEM pass phrase question when I restart the webserver?".

If the Server.key.unsecure build succeeds, we'll modify the Nginx configuration, like this:

# here is the relevant configuration of SSL for server {  listen 443;  server_name www.example.com; # your own domain name  root/home/www;  SSL on;  SSL_CERTIFICATE/ETC/NGINX/CERTS/SERVER.CRT;  # Modify the following line to point to the Server.key.unsecure file we generated  ssl_certificate_key/etc/nginx/certs/server.key.unsecure;}

Then use/etc/init.d/nginx restart Restart Nginx, is not found no longer prompt, the whole world is clean:-)

Nginx Configure SSL Security certificate avoid start input PEM pass phrase

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.