Nginx ssl - SSL: error:0906D06C:PEM routines:PEM_read_bio:no start line

Posted by Alex on Server Fault See other posts from Server Fault or by Alex
Published on 2012-12-04T14:12:42Z Indexed on 2012/12/04 23:06 UTC
Read the original article Hit count: 1169

Filed under:
|

I am trying to enable ssl on a server using a certificate from 123-reg but I keep getting this error:

nginx: [emerg] SSL_CTX_use_certificate_chain_file("/opt/nginx/conf/cleantechlms.crt") failed (SSL: error:0906D06C:PEM routines:PEM_read_bio:no start line error:140DC009:SSL routines:SSL_CTX_use_certificate_chain_file:PEM lib)

This is my nginx config:

server {
  listen 443;
  server_name a-fake-url.com;
  root /file/path/public;   
  passenger_enabled on;

  ssl on;
  ssl_certificate /opt/nginx/conf/cleantechlms.crt;
  ssl_certificate_key /opt/nginx/conf/cleantechlms.key;
 }

I have tried setting my crt and key to full file permissions but there is no difference.

My crt file is the crt I was issued concatenated with the ca crt.

Update

I have tried copying both the keys in sperate files and then running 'cat mykey.crt >> ca.cert'

Also I tried manually copying the keys into the same file.

Any ideas?

© Server Fault or respective owner

Related posts about nginx

Related posts about ssl