1. The problem I’m having:
I previously posted something today, but I deleted it, since the problem is different now.
I am struggling to set up reverse proxy for Caddy properly. My project is a flask project sitting on a raspberry pi at /home/pi/Documents/DORapis and the file is Main.py.
It runs on the port 56981 and should redirect to 80 of my website www.someurl.no, being visitable at http://someurl.no
Also, I have a Pi hole at port 1080, which I want to access at pi.hole.
My Caddyfile looks like this:
pi.hole:80 {
reverse_proxy 10.0.0.1:1080
}
someurl.no:80 {
reverse_proxy 10.0.0.1:56981
}
2. Error messages and/or full log output:
Both pi.hole:1080 and someurl.no:56981 are accessable. However, only the pihole seems to go throw to 80 properly.
That means, I can access someurl.no:56981 with the correct content, but cannot visit http://someurl.no or someurl.no/80.
With curl, I get the message: curl: (52) Empty reply from server
In the browser, the page is empty.
3. Caddy version:
2.6.4 on a raspberry pi
4. How I installed and ran Caddy:
Installed via apt, running with systemd
a. System environment:
Raspberry Pi 4 with newest software
b. Command:
sudo systemctl restart caddy
d. My complete Caddy config:
see above for my entire caddyfile (only difference is that I use a real correct URL there)