-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Need a failover proxy to localhost/remote server #1
Comments
💎 $25 bounty created by McPizza0 👉 Add a bounty • Share on socials
|
conditions for bounty: you must provide a working config via PR and explain how it works/what needs to be set up put configs in a pr, I will test, if it works, bounty is yours |
/attempt #1 Options |
the caddy server lives in a vps, not on my local machine, can you clarify how @Local would help? have you tried this config with a cloudflare tunnel? the Caddy config was fine, forwarding requests to the cloudflare tunnel https://tunneladdress.mydomain.dev/ will be a cloudflare tunnel into my local system |
Thank you for the clarification. If CaddyServer is running on a VPS, the @Local matcher wouldn't be applicable because it's designed to identify requests originating from localhost, which would be the local machine where CaddyServer isn't running in this case. For your scenario with Cloudflare Tunnel and CaddyServer on a VPS, you can simplify the configuration to directly proxy requests to the Cloudflare Tunnel address and the failover server.
This configuration file instructs CaddyServer to proxy all incoming requests to either https://tunnelAddress.mydomain.dev or https://failover.mydomain.dev based on their availability and health. Please replace proxy.mydomain.dev, https://tunnelAddress.mydomain.dev, and https://failover.mydomain.dev with your actual domain and addresses respectively. Once you've updated the configuration file, save it as Caddyfile in your CaddyServer's configuration directory. Then, restart CaddyServer for the changes to take effect. |
Sounds a bit like a GPT Re-read the issue again, that is how the config file was |
share your cadyserver logs. |
|
I want to be able send webhook messages to |
Thanks for the info. It would be easier to troubleshoot if we could schedule an online meet |
its easy enough to replicate the setup im not looking for "technical support" and diagnosis, i need a solution that works |
Replace caddy.123.com, local.123.com, and service.123.com with your actual domain names. |
@TheVixhal In practice, it dosnt work so it seems that the tunnel always responds with something this may not be viable after all |
Thanks for trying @ezhil56x and @TheVixhal closing this issue and removing the bounty will build out something better in less time: https://github.com/uninbox/webhook-proxy |
The answer is in the docs: https://caddyserver.com/docs/caddyfile/directives/reverse_proxy#https |
@TheVixhal stop using ChatGPT. That config is complete nonsense. Source: I'm a Caddy maintainer. I wrote most of the Caddyfile docs. |
Sorry 😔😔😐 |
TL;DR: Have 1 address
abc.123.com
. when I am running dev server locally, route to me. If not, route to another address.Long version
UnInbox, has some long running servers that live in a vps and send out webhook messages
I need a proxy with failover capabilities to live permanently online (vps is fine)
when the app is running locally on my machine, it will route to me
when im not, it will route to another web server
I tried with Cloudflare Tunnels and CaddyServer
i can access the tunnel directly using
https://tunnelAddress.mydomain.dev
CaddyServer installed on a vps and given it the following config
the path
https://tunnelAddress.mydomain.dev
works fine when accessed directly - validating that the tunnel is upwhen accessing via
proxy.mydomain.dev
i get an errorERR_TOO_MANY_REDIRECTS
Offering a bounty for a solution that works
The text was updated successfully, but these errors were encountered: