1. The problem I’m having:
I am having various issues when trying to log into to proxied sites. Two example:
BlueIris camera server. The site initially loads fine, but when trying to log in, the page displays the following error: Unable to contact Blue Iris Server
Bitwarden server. SSL is configured on the backend. The site initially loads fine, but when trying to log in, it hangs for about a minute (presumably timeout setting), then throws an error. If I hit login again, it will immediately login just fine. This cycle happens every time.
Not sure how to troubleshoot this.
Note: Sites are only accessible internally; no WAN access.
2. Error messages and/or full log output:
journalctl doesn’t seem to exist in the docker container. Here are access logs from enabling logging and trying to visit the Blue Iris server:
curl output won’t be an accurate representation because certificates are installed in browsers rather than OS trust store. Happy to work on this if curl output would be of use. If any other logs are needed, I can find them too.
3. Caddy version:
v2.8.4
4. How I installed and ran Caddy:
Caddy was built using xcaddy (2.8.4-builder) with Coraza plugin using a Dockerfile that is called in the compose file.
Network has an internal PKI. Certificates are managed on IDM server. A wildcard cert was generated for Caddy to use. Some servers use [require] SSL, and have SSL certificates from the PKI. The root cert was added for servers that have SSL on the backend.
a. System environment:
Ubuntu 24.04
Docker Compose
b. Command:
docker compose up -d
c. Service/unit/compose file:
services:
caddy:
build:
dockerfile: ./Dockerfile
restart: unless-stopped
ports:
- "80:80"
- "443:443"
volumes:
- $PWD/Caddyfile:/etc/caddy/Caddyfile
- $PWD/site:/srv
- caddy_data:/data
- caddy_config:/config
- $PWD/ssl:/sslcerts
volumes:
caddy_data:
caddy_config:
d. My complete Caddy config:
{
order coraza_waf first
}
*.contoso.com {
coraza_waf {
load_owasp_crs
directives `
Include @coraza.conf-recommended
Include @crs-setup.conf.example
Include @owasp_crs/*.conf
SecRuleEngine On
`
}
log {
output file /var/log/access.log
}
tls /sslcerts/wildcard.pem /sslcerts/wildcard.key
@wiki host wiki.contoso.com
handle @wiki {
reverse_proxy 192.168.0.10:3000
}
@cams host cams.contoso.com
handle @cams {
reverse_proxy 172.168.22.5
}
@bitwarden host bitwarden.contoso.com
handle @bitwarden {
reverse_proxy 192.168.0.9:443 {
transport http {
tls_trusted_ca_certs /sslcerts/root.pem
tls_server_name bitwarden.contoso.com
}
}
}
}
5. Links to relevant resources:
These are some native options that can be adjusted inside of Blue Iris
Error within Blue Iris (don’t get it when not using proxy)