What’s wrong with the Container?

I wanted to provision a Japanese version of my website but one of the containers kept on restarting. I couldn’t figure out what’s wrong with it for a while.

I finally figured out how to view the log of the container.

docker logs --tail 50 --follow --timestamps [container ID]

Here is the log output.

2022-03-13T05:46:44.573226016Z /docker-entrypoint.sh: Configuration complete; ready for start up
2022-03-13T05:46:44.579540345Z 2022/03/13 05:46:44 [emerg] 1#1: cannot load certificate "/home/opc/wordpress/nginx/conf.d/ssl/cert1.pem": BIO_new_file() failed (SSL: error:02001002:system library:fopen:No such file or directory:fopen('/home/opc/wordpress/nginx/conf.d/ssl/cert1.pem','r') error:2006D080:BIO routines:BIO_new_file:no such file)
2022-03-13T05:46:44.579598505Z nginx: [emerg] cannot load certificate "/home/opc/wordpress/nginx/conf.d/ssl/cert1.pem": BIO_new_file() failed (SSL: error:02001002:system library:fopen:No such file or directory:fopen('/home/opc/wordpress/nginx/conf.d/ssl/cert1.pem','r') error:2006D080:BIO routines:BIO_new_file:no such file)

Of course, I made a mistake in specifying the path of the certificate files. When I corrected it, the site came up correctly.

Leave a Reply

Your email address will not be published.