Generalizing GeoIP to be consumed by more services

This commit is contained in:
2025-12-29 14:46:55 -06:00
parent b6785b861a
commit 0070afde5d
17 changed files with 108 additions and 60 deletions

View File

@@ -1,5 +1,6 @@
server {
listen 443 ssl http2;
listen 443 ssl;
http2 on;
server_name default_server;
include conf/sec.conf;
@@ -7,6 +8,9 @@ server {
include conf/letsencrypt.conf;
# GeoIP block
if ($deny) { return 503; }
location / {
rewrite ^/martialarts(\/)*(\/index.html)*$ /assets/martialarts/index.html;
@@ -65,7 +69,8 @@ server {
}
server {
listen 443 ssl http2;
listen 443 ssl;
http2 on;
server_name foundation.aninix.net;
include conf/sec.conf;
include conf/letsencrypt.conf;

View File

@@ -1,12 +0,0 @@
server {
listen 443 ssl http2;
server_name adhan.aninix.net;
include conf/sec.conf;
include conf/default.csp.conf;
location /
{
root /srv/adhan/;
}
}

View File

@@ -2,6 +2,9 @@ server {
listen 443 ssl;
server_name cyberbrain.aninix.net;
# GeoIP block
if ($deny) { return 503; }
location ^~ /admin {
deny all;
}

View File

@@ -1,18 +0,0 @@
server {
#listen 443 ssl http2;
listen 444 ssl http2;
server_name sharingan.aninix.net;
include conf/sec.conf;
# include conf/default.csp.conf;
location /
{
proxy_set_header Host $http_host;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Server $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Graylog-Server-URL https://$server_name/;
proxy_pass http://10.0.1.5:9000;
}
}

View File

@@ -1,11 +1,15 @@
server {
listen 443 ssl http2;
listen 443 ssl;
http2 on;
server_name irc.aninix.net;
include conf/sec.conf;
include conf/default.csp.conf;
include conf/letsencrypt.conf;
# GeoIP block
if ($deny) { return 503; }
location /
{
root /usr/share/kiwiirc;

View File

@@ -4,6 +4,9 @@ server {
# include conf/local.conf;
# GeoIP block
if ($deny) { return 503; }
root /usr/share/webapps/;
client_max_body_size 5m;

View File

@@ -1,11 +1,15 @@
server {
listen 443 ssl http2;
listen 443 ssl;
http2 on;
server_name maat.aninix.net;
include conf/sec.conf;
include conf/default.csp.conf;
include conf/letsencrypt.conf;
# GeoIP block
if ($deny) { return 503; }
location /
{
proxy_set_header Host $http_host;

View File

@@ -1,11 +1,15 @@
server {
listen 443 ssl http2;
listen 443 ssl;
http2 on;
server_name password.aninix.net;
include conf/sec.conf;
include conf/default.csp.conf;
include conf/letsencrypt.conf;
# GeoIP block
if ($deny) { return 503; }
location / {
root /usr/share/webapps/self-service-password/htdocs/;

View File

@@ -1,6 +1,7 @@
server {
listen 443 ssl http2;
listen 443 ssl;
http2 on;
server_name sharingan.aninix.net;
include conf/sec.conf;
@@ -8,6 +9,10 @@ server {
include conf/local.conf;
include conf/letsencrypt.conf;
# GeoIP block
if ($deny) {
return 503;
}
location /
{

View File

@@ -8,6 +8,9 @@ server {
include conf.d/fastcgi.config;
# GeoIP block
if ($deny) { return 503; }
root /usr/share/webapps/tt-rss/;
index index.php;

View File

@@ -4,7 +4,7 @@ map $http_upgrade $connection_upgrade {
}
server {
#listen 443 ssl http2;
listen 443 ssl;
server_name superintendent.aninix.net;
@@ -14,9 +14,7 @@ server {
include conf/letsencrypt.conf;
# GeoIP block
if ($deny) {
return 503;
}
if ($deny) { return 503; }
# Handle the location
location /

View File

@@ -6,6 +6,9 @@ server {
include conf/letsencrypt.conf;
include conf.d/fastcgi.config;
# GeoIP block
if ($deny) { return 503; }
root /opt/travelpawscvt;
client_max_body_size 5m;

View File

@@ -1,12 +1,15 @@
server {
#listen 443 ssl http2;
listen 443 ssl http2;
listen 443 ssl;
http2 on;
server_name yggdrasil.aninix.net;
include conf/sec.conf;
include conf/letsencrypt.conf;
# include conf/default.csp.conf;
# GeoIP block
if ($deny) { return 503; }
location /
{
proxy_set_header Host $http_host;