Django, Docker and traefik shows 404 on deploy but no error logs - using django-cookiecutter

Viewed 178

I recently decided to move my website to use docker along with the template that django-cookiecutter with the goal in mind of easy deployment and easy to setup environments.

Localy the project runs fine and I can access the website through the ip address of the virtualmachine on port 8000.

But when deploying it to DO with the production.yml file it does not fail, the build and up both run successfull. But when I try access the ip of my droplet I get a 404. The only error that I get is from traefik, SSL related and I don't think this is causing the 404.

traefik_1   | time="2020-10-07T16:47:26Z" level=error msg="Unable to obtain ACME certificate for domains \"bgan.be,www.bgan.be\": unable to generate a certificate for the domains [bgan.be www.bgan.be]: error: one or more domains had a problem:\n[bgan.be] acme: error: 403 :: urn:ietf:params:acme:error:unauthorized :: Invalid response from http://bgan.be/.well-known/acme-challenge/4AvrIU9r8F3PwtyrK_6yq8fwHc4CgiHeT_4Vk5Yo0G4 [138.68.98.118]: \"<html>\\r\\n<head><title>404 Not Found</title></head>\\r\\n<body>\\r\\n<center><h1>404 Not Found</h1></center>\\r\\n<hr><center>nginx/1.18.0 (Ub\", url: \n[www.bgan.be] acme: error: 403 :: urn:ietf:params:acme:error:unauthorized :: Invalid response from http://www.bgan.be/.well-known/acme-challenge/gToGrbtaQN5SBFyArzNz8r1SQx8QSB2Wax3_CqzYXCk [138.68.98.118]: \"<html>\\r\\n<head><title>404 Not Found</title></head>\\r\\n<body>\\r\\n<center><h1>404 Not Found</h1></center>\\r\\n<hr><center>nginx/1.18.0 (Ub\", url: \n" providerName=letsencrypt.acme routerName=web-secure-router@file rule="Host(`bgan.be`) || Host(`www.bgan.be`)"

Would anyone have any suggestions on why this is happening? been stuck on this for 3 days now and have tried to follow serveral tutorials and look at the docs but this is breaking my head.

The .yml files were left unchanged, just like cookiecutter provides them. Normally this should work out of the box...

Thanks for any help.

0 Answers
Related