Hello, honestly I’m not sure whether my issue here is related to my Caddy configuration,
but I’m a little stuck, because I have not much experience in web servers.
I’m running a Django web application behind “gunicorn” and a Caddy web server.
The URL is
On top of the landing page in the yellow box, there is a simple static link to a URL starting with “http”:
http://legacy.contact.engineering/
It has the same domain name as the first link, but points to another physical server.
If I click that second link on the page, I’m always redirected to “https://legacy.contact.engineering/”,
with “https” (SSL!). That target does not exist.
This does not happen on my development machine where I don’t use Caddy simply Django’s runserver.
So I think it’s related to Caddy (correct me, if I’m wrong).
My Caddyfile looks like this
{$DOMAIN_NAME} {
proxy / django:5000 {
header_upstream Host {host}
header_upstream X-Real-IP {remote}
header_upstream X-Forwarded-Proto {scheme}
except /media
timeout 300s
}
log stdout
errors stdout
gzip
}
where DOMAIN_NAME=contact.engineering
.
It’s strange, because I thought that my browser (Firefox 68.0.1) just asks DNS for the IP of the host “legacy” and points me to that URL, using the “http” protocol, because that’s the link it sees.
Do I need to explicitly mention the host “legay.contact.engineering” in my Caddyfile so that “http://” persists? Or is this more related to the DNS configuration?
Thank you for any hint. Michael