Skip to content

Instantly share code, notes, and snippets.

@dorianim
Created May 6, 2021 08:04
Show Gist options
  • Save dorianim/4305d5a1873e2a220e7da848b87be937 to your computer and use it in GitHub Desktop.
Save dorianim/4305d5a1873e2a220e7da848b87be937 to your computer and use it in GitHub Desktop.
A config for the Nginx reverse proxy for proxying a UptimeRobot status page
server {
set $monitorId <YOUR_ID>;
server_name status.<YOUR_DOMAIN>;
listen 80;
location / {
proxy_set_header Host "stats.uptimerobot.com";
proxy_set_header Accept-Encoding "";
proxy_pass_request_headers on;
proxy_pass https://stats.uptimerobot.com/;
proxy_ssl_server_name on;
rewrite ^\/([0-9]+) /$monitorId/$1 break;
rewrite ^\/$ /$monitorId break;
sub_filter_once off;
sub_filter_types text/html;
sub_filter "stats.uptimerobot.com" "$host";
sub_filter "https://stats.uptimerobot.com/$monitorId" "https://$host";
}
}
@Razuuu
Copy link

Razuuu commented May 7, 2024

Wow, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment