Reverse Proxy Infinite Redirect

1. Caddy version (2.5.1):

2. How I run Caddy:

a. System environment:

Ubuntu 20.04

b. Command:

caddy run

c. Service/unit/compose file:

NodeJS 16.15.1 http application

d. My complete Caddyfile or JSON config:

radon.games {
    reverse_proxy 127.0.0.1:3000
}

3. The problem I’m having:

Whenever I go to the website it reloads the page using META tags.

4. Error messages and/or full log output:

2022/06/29 17:22:44.861 INFO    using adjacent Caddyfile
2022/06/29 17:22:44.863 INFO    admin   admin endpoint started  {"address": "tcp/localhost:2019", "enforce_origin": false, "origins": ["//localhost:2019", "//[::1]:2019", "//127.0.0.1:2019"]}
2022/06/29 17:22:44.863 INFO    http    server is listening only on the HTTPS port but has no TLS connection policies; adding one to enable TLS        {"server_name": "srv0", "https_port": 443}
2022/06/29 17:22:44.863 INFO    http    enabling automatic HTTP->HTTPS redirects        {"server_name": "srv0"}
2022/06/29 17:22:44.863 INFO    http    enabling automatic TLS certificate management   {"domains": ["radon.games"]}
2022/06/29 17:22:44.864 INFO    autosaved config (load with --resume flag)      {"file": "/root/.config/caddy/autosave.json"}
2022/06/29 17:22:44.864 INFO    serving initial configuration
2022/06/29 17:22:44.864 INFO    tls     cleaning storage unit   {"description": "FileStorage:/root/.local/share/caddy"}
2022/06/29 17:22:44.864 INFO    tls     finished cleaning storage units
2022/06/29 17:22:44.864 INFO    tls.cache.maintenance   started background certificate maintenance      {"cache": "0xc000180770"}

5. What I already tried:

Using localhost

radon.games {
    reverse_proxy localhost:3000
}

Changing the port

radon.games {
    reverse_proxy localhost:8080
}

Where/how? What’s the evidence of that? The screenshot you posted shows an HTTP 308 redirect.

Speaking of which, we have a forum rule to please post text as text. We can’t work with screenshots as easily, increasing the burden of our helpers. Please don’t use screenshots.

Everything looks to be working properly. There’s also no evidence of an infinite redirect here.

What is the output of curl -v 'https://radon.games'?

1 Like

This topic was automatically closed after 30 days. New replies are no longer allowed.