Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

576
Vistas
Installing godaddy ssl certificate to server : getting this below error when i restart service nginx

nginx: [emerg] SSL_CTX_use_PrivateKey_file("/etc/nginx/ssl/mydomain.key") failed (SSL: error:0909006C:PEM routines:get_name:no start line:Expecting: ANY PRIVATE KEY error:140B0009:SSL routines:SSL_CTX_use_PrivateKey_file:PEM lib)

#HTTPS server configuration
 server {
        listen 443;
        listen [::]:443;

        ssl on;

        ssl_certificate /etc/nginx/mydomain.chained.crt;
        ssl_certificate_key /etc/nginx/mydomain.key;

        root /var/www/html;

        server_name mydomain; 

        location / {

        try_files $uri $uri/ =404;

        }
   }
over 4 years ago · Santiago Trujillo
2 Respuestas
Responde la pregunta

0

Today I hit this exact problem and solved it too. Solution was to open the private key file in Notepad++ and change encoding to ANSI and then upload to server and use it.

over 4 years ago · Santiago Trujillo Denunciar

0

In case anyone else encounters this, @aCid was right. The problem for me was the encoding on the .key file.

I used GoDaddy and had them generate the private key for me (then downloaded it). It turns out that it was encoded as UTF-8. This doesn't work for NGINX. You needed it encoded in ASCII.

Since this was already on my server and I was accessing it via SSH, I simply:

  1. opened the original key file (encoded in UTF-8)
  2. Copied the contents.
  3. Created a new key file (vi newfile.key).
  4. Pasted the contents from #2 into the new file.
  5. Moved the new key file into the place of the old one.

After that everything worked fine.

over 4 years ago · Santiago Trujillo Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda