1. The problem I’m having:
I try to allow only specific subdomains. I wish to output a 404 or other error message. But if I try this, my iOS Device with chrome does only output a empty document file and no error or site not found page. Only with a static HTML page the output is ok, but so I have a 200 HTTP Code. What is the best solution for this?
*.domain1.com {
@app1 host app1.domain1.com
handle @app1 {
reverse_proxy localhost:8001
# or: reverse_proxy 192.168.1.100:8001
}
@app2 host app2.domain1.com
handle @app2 {
reverse_proxy localhost:8002
}
handle {
respond 404
}
}
2. Error messages and/or full log output:
Chrome on a iOS Device download a document file instead of showing an 404 error page or other eror page
3. Caddy version:
v2.10.2 h1
4. How I installed and ran Caddy:
Proxmox Helper Script
a. System environment:
cat /etc/debian_version
12.12