Skip to content

Commit

Permalink
icinga: use monitoring.wikitide.net (#3764)
Browse files Browse the repository at this point in the history
Internal services can match hostnames on wikitide.net, which is the
purpose of that domain to not have internal stuff on miraheze.org much.
  • Loading branch information
Universal-Omega authored Mar 13, 2024
1 parent e81603e commit 3552f5b
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
12 changes: 6 additions & 6 deletions modules/icingaweb2/files/icinga2.conf
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ server {
listen 80;
listen [::]:80;

server_name icinga.miraheze.org;
server_name monitoring.wikitide.net;
root /usr/share/icingaweb2/public;

location /php_status {
Expand All @@ -14,24 +14,24 @@ server {
}

location / {
return 301 https://icinga.miraheze.org/;
return 301 https://monitoring.wikitide.net/;
}
}

server {
listen 443 ssl http2;
listen [::]:443 ssl http2;

server_name icinga.miraheze.org;
server_name monitoring.wikitide.net;
root /usr/share/icingaweb2/public;

ssl_certificate /etc/ssl/localcerts/wildcard.miraheze.org-2020-2.crt;
ssl_certificate_key /etc/ssl/private/wildcard.miraheze.org-2020-2.key;
ssl_certificate /etc/ssl/localcerts/wikitide.net.crt;
ssl_certificate_key /etc/ssl/private/wikitide.net.key;

add_header Strict-Transport-Security "max-age=15768000; includeSubDomains; preload";

location / {
rewrite ^(.*)$ https://icinga.miraheze.org/$1;
rewrite ^(.*)$ https://monitoring.wikitide.net/$1;
}

location ~ ^/index\.php(.*)$ {
Expand Down
4 changes: 2 additions & 2 deletions modules/icingaweb2/manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -260,12 +260,12 @@
$address = $facts['networking']['ip6']
}

monitoring::services { 'icinga.miraheze.org HTTPS':
monitoring::services { 'monitoring.wikitide.net HTTPS':
check_command => 'check_http',
vars => {
address6 => $address,
http_ssl => true,
http_vhost => 'icinga.miraheze.org',
http_vhost => 'monitoring.wikitide.net',
},
}
}
2 changes: 1 addition & 1 deletion modules/varnish/templates/default.vcl
Original file line number Diff line number Diff line change
Expand Up @@ -409,7 +409,7 @@ sub vcl_recv {
}

# Do not cache requests from this domain
if (req.http.Host == "icinga.miraheze.org" || req.http.Host == "grafana.wikitide.net") {
if (req.http.Host == "monitoring.wikitide.net" || req.http.Host == "grafana.wikitide.net") {
set req.backend_hint = mon181;

if (req.http.upgrade ~ "(?i)websocket") {
Expand Down

0 comments on commit 3552f5b

Please sign in to comment.