Cloudflare connection timed out

I turned off cloudflare proxy.

Should I remove the staging code from my Caddyfile?

BTW dude – since you’re a pro at all of this, I can imagine you do well as a DevOp or sys admin.

Any advice for a homelabber looking to go PRO?

Yes, you can set it back to the way it was before you incorporated my extra config.

Believe it or not, all of this is stuff you can pick up at the enthusiast level. We’ve just done some network troubleshooting, essentially, with the advantage of some in-depth knowledge of ACME and Caddy. I appreciate the compliment though!

If you want to sysadmin for a business, practice with things that businesses use.

Whether that’s bread and butter Windows Server VMs on ESXI or Hyper-V serving AD/Storage/RDS (maybe with hybrid cloud?), or whether that’s picking one of the big clouds (AWS/Azure/GCP) and mastering deployment of their technological stacks and securing and scaling them, or maybe going hard into container orchestration with K8s or something.

Whatever you do, practice business-class service levels, with business-class technologies.

thanks again for all of your help.

Cheers

1 Like

I didn’t want to create an entire new thread on this sub so I figured I would just reply to this thread since you’re the person helping me anyways.

I cannot get www.naff.casa to redirect to naff.casa

It gives me the error, too many redirects.

Here’s my caddy file:

www.naff.casa {
    redir https://www.naff.casa
}

I’ve tried it with the (uri) option too and it didn’t make a difference

any thoughts?

I also cleared my cookies and browser history on all devices, and tried it on a new device, no luck

Your vhost reads like the following:

“Serve www.naff.casa and redirect everything to https://www.naff.casa”, which is an infinite loop.

If you want to redirect www.naff.casa to naff.casa, you will have to use

www.naff.casa {
    redir https://naff.casa
}

The uri option you mentioned, which would look like

www.naff.casa {
    redir https://naff.casa{uri}
}

keeps the uri when redirecting:
For example, https://www.naff.casa/example would then redirect to https://naff.casa/example - keeping the /example part.

redir https://naff.casa on the other hand, would drop it.
So, https://www.naff.casa/example would always redirect to https://naff.casa/.

docs/caddyfile/patterns#redirect-www-subdomain shows an example including its counterpart (non-www to www redirect).
Maybe redir (Caddyfile directive) — Caddy Documentation should cross-link that somewhere :thinking:

2 Likes

A post was split to a new topic: Certificate issuing problems with Caddy, Proxmox VE while ISP is blocking port :80

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