[Unresolved] LetsEncrypt Container + Nginx Container + Nodejs App Containers Don't Work :(

So I’ve been spending the past 2 weeks trying to get LetsEncrypt to work as a container for my setup.

My Setup:
NodeJS App Container
GhostJS App Container
These 2 app containers are served behind a (official) Nginx Container (NOT Jwilder’s Nginx-Proxy).
The Nginx container then broadcasts the 80/443 to the world to see :).

Now… I’ve been following several tutorials online, but no luck.
Challenge used is http-01.

I kept on getting 404 Unauthorized or Invalid Response From… (the acme url).
I’ve also tested making a test file in /var/www/html as root and /var/www/.well-known/test.html. etc.
Then I repeated similar setup using the acme url into the conf (without the hash), but it produces 404 error.

Yes, I made sure the containers are on the same Docker network.

Please help :’(.

Hi @ewliang,

Can you tell us your domain and an example of a URL to a test file that you’ve created in /.well-known/acme-challenge under that domain?

Can you also show us what command and Let’s Encrypt client you’re running that produces those 404 errors?

I just tried another approach by another blog post starting at the section titled "Set up Docker, Nginx and Certbot To Obtain Your First Let's Encrypt SSL/TLS Certificate" at https://www.humankode.com/ssl/how-to-set-up-free-ssl-certificates-from-lets-encrypt-using-docker-and-nginx

I followed his steps up to the point where the first certbot staging command was executed. Sadly, it wasn't successful compared to his results. I kept on getting Unauthorized Invalid Form Response from Acme challenge URL and it shows 404 Not Found.

My domain is www.eric-liang.com. If you go there now, it's a test file in the same directory he specified in his blog post, just my own maintenance content..

I also tried chmod 777 to /.well-known. - No luck.
I also tried disabling the firewall IPv6 ports - No luck. (yes, 80/443 on firewall is allow)
Also made sure my host for domain setup has the right A address and Cname. No records for IPv6. Still on old school IPv4 - haha. No luck.

Sorry, where is the test file located?

I recently relaunched my site back to its normal non-LE form since I had to make it stable for job recruitment. :frowning:

Found a solution after literally days of googling and researching. https://stackoverflow.com/questions/39846649/how-to-use-lets-encrypt-with-docker-container-based-on-the-node-js-image/40114717#40114717

Looks like standalone was my best option after all. Webroot gave me way too much problems. :frowning:

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.