1. Caddy version (
2. How I run Caddy:
a. System environment:
Windows Server 2019, standalone
c. Service/unit/compose file:
d. My complete Caddyfile or JSON config:
3. The problem I’m having:
Before I start please know I am a beginner. I have given Caddy a try, with the intention of setting up a reverse proxy. It redirected http > https, which I didn’t necessarily want. I decided to stop using Caddy, but my http requests are still being redirected to https, even when Caddy is not running. This has broken what I had before, and I don’t know how to turn it off. Now, the only way I can access what I have on
http://localhost is by using the ip address -
I would like to just go back to before I tried caddy, but I don’t know what’s changed or how to fix it. I have literally just put the .exe in a folder with the basic caddyfile shown above, and started it, found it wasn’t for me, and tried to remove it.
4. Error messages and/or full log output:
5. What I already tried:
I have run
caddy stop, followed by
caddy untrust to remove the certificate, then removed the files from
C:\Users\<user>\AppData\Caddy\, but the https redirect persists.
6. Links to relevant resources:
Your browser will have cached the redirect. You’ll need to clear your browser cache to make it forget the permanent redirect Caddy served to it.
FWIW, that config doesn’t really make sense to me:
There’s a couple issues here.
You’re specifying an exact path
/test, but Caddy v2 matches paths exactly. That means that it will match
/test but not
/test/foo. To match more than that, then you need to append a
Also, I don’t really recommend using path matchers in “site addresses” which is how this was parsed (and that’s the first time I’ve seen someone use only a path matcher as a site address I didn’t even know that would parse)
Something like this would be more reasonable, if you don’t want to test with HTTPS:
If you want HTTPS, then you can do this (and Caddy will set up trust automatically:
Well like I said, I am a complete beginner, so I’m not surprised I’ve done something that doesn’t conform to best practice! I did get
/test to work as shown, but I was just pointing it to a static site, and it correctly rendered the page. I’ve since implemented it as you suggested and it does indeed work correctly now. Thanks for your help
This topic was automatically closed after 30 days. New replies are no longer allowed.