Nginx failing to ask for PEM SSL key password
|Reported by:||Owned by:|
|Keywords:||ssl key pem||Cc:|
|uname -a:||Linux - 2.6.32-042stab111.11 #1 SMP Tue Sep 1 18:19:12 MSK 2015 x86_64 GNU/Linux|
|nginx -V:||nginx version: nginx/1.6.2|
While starting/restarting nginx with "service nginx start", no password is asked on the terminal and nginx fails to start.
By checking journalctl, I receive the following error :
nov. 17 ... systemd: Failed to reset devices.list on /system.slice/nginx.service: No nov. 17 ... nginx: Enter PEM pass phrase: nov. 17 ... nginx: nginx: [emerg] SSL_CTX_use_PrivateKey_file("/etc/nginx/ssl/mykeycert") failed (SSL: error:0906406D:PEM routines:PEM_def_callback:problems getting password error:0906A nov. 17 ... nginx: nginx: configuration file /etc/nginx/nginx.conf test failed nov. 17 ... systemd: nginx.service: control process exited, code=exited status=1 nov. 17 ... systemd: Failed to start A high performance web server and a revers
The nginx server fail to start because no password is provided, however no password is required when starting it with service or /etc/init.d/.
Please note that :
- nginx server starts correctly in command line (#nginx ), not using service. SSL configuration (like file locations and permissions seems therefore correct). Password is -that way- asked on terminal.
- when doing the same SSL configuration with Apache2, the password is well required when starting/restarting Apache2 server with "service apache2 start".
How could I fix it please ? Is there a way to compare nginx and apache2 service files to understand why no password is asked when starting nginx, but actually is when starting apache2 ?
Thank you in advance for your help.