I'm working on setting up a live demo on https://index.torrust-demo.com/.
See torrust/torrust-compose#2.
I'm using Nginx as a reverse proxy. The HTTP tracker has these direct URLs:
But you can load them via the reverse proxy with https:
The API healthcheck endpoint is not accessible from the proxy because I'm using the URL segment api to redirect requests for the Tracker API.
HTTP Nginx config for the tracker:
server
{
listen 80;
listen [::]:80;
root /var/www/html;
index index.html index.htm index.nginx-debian.html;
server_name tracker.torrust-demo.com;
location /api/
{
proxy_pass http://tracker:1212/api/;
}
location /
{
proxy_pass http://tracker:7070;
}
location ~ /.well-known/acme-challenge
{
allow all;
root /var/www/html;
}
}
The reason I used the endpoint /health_check instead of /api/v1/health_check is because:
- I wanted a generic API healthcheck regardless of the API version.
- I wanted that endpoint to be public, not requiring a token.
I could add a new redirection in the Nginx configuration, something like:
location /health_check
{
proxy_pass http://tracker:1212/health_check;
}
However, the HTTP Tracker health check endpoint would not be accessible.
Maybe I can use /api/health_check and apply the auth middleware only to /api/v1/*.
What do you think @da2ce7 @WarmBeer?
I'm working on setting up a live demo on https://index.torrust-demo.com/.
See torrust/torrust-compose#2.
I'm using Nginx as a reverse proxy. The HTTP tracker has these direct URLs:
But you can load them via the reverse proxy with https:
The API healthcheck endpoint is not accessible from the proxy because I'm using the URL segment
apito redirect requests for the Tracker API.HTTP Nginx config for the tracker:
The reason I used the endpoint
/health_checkinstead of/api/v1/health_checkis because:I could add a new redirection in the Nginx configuration, something like:
However, the HTTP Tracker health check endpoint would not be accessible.
Maybe I can use
/api/health_checkand apply the auth middleware only to/api/v1/*.What do you think @da2ce7 @WarmBeer?