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