Focus on cloud service provider activities
Notes on website operation and maintenance

Resolve the problem of "PEM_read_bio: bad end line" when configuring SSL certificates

Lao Zuo saw that netizens mentioned it for reference“ Use SSL For Free tool to obtain Let's Encrypt free SSL certificate in 3 minutes "In the article tutorial, when applying for and configuring the SSL website security certificate, it was mentioned that there was an error prompt when configuring to the VPS WEB environment. Because I introduced the use of the cPanel virtual host environment in this article, it is not necessary to modify the file according to the three certificate files produced.

However, if we want to use it in the server, we need to merge the three certificate files: Privacy Key, CA_bundle.crt, and certificate.crt. Here, if we do not merge correctly, the following error message will appear:

nginx: [emerg] PEM_read_bio_X509_AUX("/root/domain.crt") failed (SSL: error:0906D066:PEM routines:PEM_read_bio:bad end line)

This problem occurs because we have a problem with the delimiter when merging certificate.crt and CA_bundle.crt into the domain.crt file.

 Resolve the problem of "PEM_read_bio: bad end line" when configuring SSL certificates

We can see that the end and beginning separators overlap, so we can split the empty line with a carriage return directly at the arrow position.

Finally, when we restart Nginx, there will be no error prompt.

Domain name host preferential information push QQ group: six hundred and twenty-seven million seven hundred and seventy-five thousand four hundred and seventy-seven Get preferential promotion from merchants.
Like( one )
Do not reprint without permission: Lao Zuo's Notes » Resolve the problem of "PEM_read_bio: bad end line" when configuring SSL certificates


Scan the code to follow the official account

Get more news about webmaster circle!
Entrepreneurship, operation and new knowledge