Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

584
Visualizações
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 Respostas
Responde à pergunta

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 Relatório

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda