Created
May 6, 2021 08:04
-
-
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
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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"; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Wow, thanks!