CU-1hwjcnt Added home.bdebyl.net.conf for nginx (redirect external traffic)

This commit is contained in:
Bastian de Byl
2021-10-01 21:17:18 -04:00
parent 1c16582c28
commit 680a6757b3
4 changed files with 23 additions and 1 deletions

View File

@@ -0,0 +1,17 @@
geo $whitelisted {
default 0;
192.168.1.1/24 1;
}
server {
listen 80;
listen 443 ssl;
server_name {{ home_server_name }};
if ($whitelisted = 1) {
return 302 http://pi.hole;
}
if ($whitelisted = 0) {
return 302 $scheme://bdebyl.net$request_uri;
}
}