Providing private encrypted key password to nginx
Issue
- We configured nginx with an encrypted private key and now start up fails with errors like below:
[emerg] 2999#0: cannot load certificate key "/etc/pki/nginx/private/myprivate.key": PEM_read_bio_PrivateKey() failed (SSL: error:2807106B:UI routines:UI_process:processing error:while reading strings error:0906406D:PEM routines:PEM_def_callback:problems getting password error:0906A068:PEM routines:PEM_do_header:bad password read)
[emerg] cannot load certificate key "/etc/pki/nginx/private/myprivate.key": PEM_read_bio_PrivateKey() failed (SSL: error:06065064:digital envelope routines:EVP_DeryptFinal_ex:bad decrypt error:0906A065:PEM routines:PEM_do_header:bad decrypt)
nginx: configuration file /etc/nginx/nginx.conf test failed
- Is there a means we can securely provide a private key's password to nginx?
Environment
- Red Hat Enterprise Linux (RHEL)
- nginx
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.