[GH-ISSUE #1065] [Docs] Reverese Proxy #740

Open
opened 2026-02-25 23:43:25 +03:00 by kerem · 10 comments
Owner

Originally created by @NiklasVousten on GitHub (Sep 22, 2024).
Original GitHub issue: https://github.com/healthchecks/healthchecks/issues/1065

Originally assigned to: @NiklasVousten on GitHub.

I think it would be best to add a section about reverse proxy to the self hosted docs.

Especially if this is a problem for multiple People and a reoccurring issue

Originally created by @NiklasVousten on GitHub (Sep 22, 2024). Original GitHub issue: https://github.com/healthchecks/healthchecks/issues/1065 Originally assigned to: @NiklasVousten on GitHub. I think it would be best to add a section about reverse proxy to the self hosted docs. Especially if this is a problem for multiple People and a reoccurring issue - #851 - #825 - #640 - #634 - #597
Author
Owner

@cuu508 commented on GitHub (Sep 23, 2024):

Hello @NiklasVousten,

The Running with Docker page and also /docker/README.md has section "TLS Termination", is it along the lines of what you are looking for?

<!-- gh-comment-id:2367390261 --> @cuu508 commented on GitHub (Sep 23, 2024): Hello @NiklasVousten, The [Running with Docker](https://healthchecks.io/docs/self_hosted_docker/) page and also [/docker/README.md](https://github.com/healthchecks/healthchecks/tree/master/docker#tls-termination) has section "TLS Termination", is it along the lines of what you are looking for?
Author
Owner

@lmaddox commented on GitHub (Sep 24, 2024):

healthchecks is giving me 404s. nginx is configured to forward /healthchecks to 192...:8000. It looks like healthchecks doesn't properly honor the SITE_ROOT (https://external.com/healthchecks). Not seeing a base url option.

<!-- gh-comment-id:2370339856 --> @lmaddox commented on GitHub (Sep 24, 2024): healthchecks is giving me 404s. nginx is configured to forward /healthchecks to 192...:8000. It looks like healthchecks doesn't properly honor the SITE_ROOT (https://external.com/healthchecks). Not seeing a base url option.
Author
Owner

@cuu508 commented on GitHub (Sep 24, 2024):

@lmaddox that sounds like separate issue from the HTTP/HTTPS confusion here. Please start a new discussion and share your full configuration.

<!-- gh-comment-id:2370617055 --> @cuu508 commented on GitHub (Sep 24, 2024): @lmaddox that sounds like separate issue from the HTTP/HTTPS confusion here. Please start a new discussion and share your full configuration.
Author
Owner

@NiklasVousten commented on GitHub (Sep 24, 2024):

I think it would be helpful to have a new page with a list of short basic reverse proxy configs. This can help to reduce errors and issues with wrong configured proxys

<!-- gh-comment-id:2370931546 --> @NiklasVousten commented on GitHub (Sep 24, 2024): I think it would be helpful to have a new page with a list of short basic reverse proxy configs. This can help to reduce errors and issues with wrong configured proxys
Author
Owner

@cuu508 commented on GitHub (Sep 24, 2024):

Perhaps. Would you be willing to contribute a new page with, let's say, nginx, haproxy and caddy examples?

<!-- gh-comment-id:2371199458 --> @cuu508 commented on GitHub (Sep 24, 2024): Perhaps. Would you be willing to contribute a new page with, let's say, nginx, haproxy and caddy examples?
Author
Owner

@NiklasVousten commented on GitHub (Sep 29, 2024):

Started working on this. The only issue for me is, that I have no experience with caddy and haproxy

<!-- gh-comment-id:2381378351 --> @NiklasVousten commented on GitHub (Sep 29, 2024): Started working on this. The only issue for me is, that I have no experience with caddy and haproxy
Author
Owner

@denis-ev commented on GitHub (Oct 16, 2024):

@NiklasVousten

this is all Caddy v2 needs in the Caddyfile, if it has a public ip it'll even do letsencrypt.

healthchecks.io www.healthchecks.io {
        reverse_proxy <IP ADDRESS>:<PORT>
}
<!-- gh-comment-id:2416848842 --> @denis-ev commented on GitHub (Oct 16, 2024): @NiklasVousten this is all Caddy v2 needs in the Caddyfile, if it has a public ip it'll even do letsencrypt. ``` healthchecks.io www.healthchecks.io { reverse_proxy <IP ADDRESS>:<PORT> } ```
Author
Owner

@loqster commented on GitHub (Dec 3, 2024):

With the current Docker images.

reverse_proxy : in the Caddyfile was not enough.
Regardless of any X-Forwarded headers set.
Which Caddy v2 does automatically anyway.

To make the Caddy reverse proxy work with healthchecks I had to force the 'origin' header

Like so:

        reverse_proxy http://healthchecks:8000 {
                header_up Origin "https://healthchecks.example.com"
        }

Without the above there were constant CSRF issues.

<!-- gh-comment-id:2514770974 --> @loqster commented on GitHub (Dec 3, 2024): With the current Docker images. reverse_proxy <IP ADDRESS>:<PORT> in the Caddyfile was not enough. Regardless of any X-Forwarded headers set. Which Caddy v2 does automatically anyway. To make the Caddy reverse proxy work with healthchecks I had to force the 'origin' header Like so: ``` reverse_proxy http://healthchecks:8000 { header_up Origin "https://healthchecks.example.com" } ``` Without the above there were constant CSRF issues.
Author
Owner

@jl-678 commented on GitHub (Apr 6, 2025):

Hi, I just wanted to come here a few months later to say that I was seeing the same CSRF issues and this origin header fix works perfectly. Thank you!

<!-- gh-comment-id:2781641405 --> @jl-678 commented on GitHub (Apr 6, 2025): Hi, I just wanted to come here a few months later to say that I was seeing the same CSRF issues and this origin header fix works perfectly. Thank you!
Author
Owner

@hartwork commented on GitHub (Apr 17, 2025):

I made https://github.com/hartwork/docker-ssl-reverse-proxy to ease use of Caddy as a reverse proxy with cocker-compose projects for myself a bit, use it in front of multiple domains, and consider it fairly easy to use. If you have trouble getting it to run after reading the readme, please create issues at https://github.com/hartwork/docker-ssl-reverse-proxy/issues (so we do not spam everyone here). Thanks!

<!-- gh-comment-id:2814169118 --> @hartwork commented on GitHub (Apr 17, 2025): I made https://github.com/hartwork/docker-ssl-reverse-proxy to ease use of Caddy as a reverse proxy with cocker-compose projects for myself a bit, use it in front of multiple domains, and consider it fairly easy to use. If you have trouble getting it to run after reading the readme, please create issues at https://github.com/hartwork/docker-ssl-reverse-proxy/issues (so we do not spam everyone here). Thanks!
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/healthchecks#740
No description provided.