Not disabling HTTPS redirect

1. The problem I’m having:

Caddy will not disable HTTPS redirects. I would like to add that I just started learning Docker and Caddy yesterday. Sorry HA. Could it be cloudflare?

2. Error messages and/or full log output:

None, just keeps redirecting to HTTPS

3. Caddy version:

v2.8.4

4. How I installed and ran Caddy:

Docker

a. System environment:

TOS

b. Command:

I have added to the top of my caddyfile

{
    auto_https disable_redirects
}

or

{
	auto_https off
}

I have also put http:// in the reverse proxy.

c. Service/unit/compose file:

services:
  caddy:
    image: serfriz/caddy-cloudflare:latest
    restart: unless-stopped
    container_name: caddy
    network_mode: host
    ports:
      - "80:80"
      - "443:443"
      - "443:443/udp"
    volumes:
      - /Volume1/Software/Docker/Caddy/data/Caddyfile:/etc/caddy/Caddyfile
      - /Volume1/Software/Docker/Caddy/data/site:/srv
      - /Volume1/Software/Docker/Caddy/data/caddy_data:/data
      - /Volume1/Software/Docker/Caddy/data/caddy_config:/config

volumes:
  caddy_data:
    external: true
  caddy_config:

d. My complete Caddy config:

{
    auto_https disable_redirects
	auto_https off
}
http://homarr.domain.us {
	reverse_proxy 192.168.37.5:7575
}
http://sonarr.domain.us {
	reverse_proxy 192.168.37.5:8989
}
http://radarr.domain.us {
	reverse_proxy 192.168.37.5:7878
}

I just noticed that radarr redirects properly. sonarr and homarr do not. I am investigating this but I am hoping that helps. I am sure I did something somewhere, I am looking still while waiting

Howdy @Evan_Sullivan, welcome to the Caddy community.

It certainly could. Double check this isn’t set: Always Use HTTPS | Cloudflare SSL/TLS docs

If that doesn’t work, the next step in troubleshooting would be gathering logs. Use the debug global option to turn on more in-depth Caddy logging, then run curl -v against your websites to get an idea of what the client is seeing. Post both sets of outputs here and we can help you make sense of it.

Thanks. We are heading to the airport for vacation. Going to take this back up end of week.

Looks like automatic HTTPS Rewrites was enabled. I turned it off but it’s still redirecting. Knowing DNS it might just take a couple of minutes or hours to propagate. “It’s always DNS”

Its been 30 minutes now I have flushdns DNS and register. Still redirecting. I am still looking around on this but any help is appreciated. Thanks!!

After HOURS of trying to figure this out. It was COOKIES. FFS. Cleared them and it works now. Not sure. Thanks!

1 Like