try to fix google index

reverseproxy-google
no-reply@crans.org 2025-09-14 18:16:18 +02:00
parent 6ba4c15870
commit 00db350a36
2 changed files with 26 additions and 3 deletions

View File

@ -69,13 +69,26 @@ let
antiBot = formatYAML.generate "antibot.yaml" [ antiBot = formatYAML.generate "antibot.yaml" [
{ {
import = "${anubisBotsMirror}"; name = "whitelist-crans";
action = "ALLOW";
remote_addresses = [
"185.230.79.0/22"
"2a0c:700::/32"
"46.105.102.188/32"
"2001:41d0:2:d5bc::/128"
];
} }
{ {
# On refuse les bots qui font souvent de la merde. # On refuse les bots qui font souvent de la merde.
# https://github.com/TecharoHQ/anubis/blob/main/data/bots/deny-pathological.yaml # https://github.com/TecharoHQ/anubis/blob/main/data/bots/deny-pathological.yaml
import = "(data)/bots/_deny-pathological.yaml"; import = "(data)/bots/_deny-pathological.yaml";
} }
{
# allow google-inspection pour indexer les pages
name = "google-inspection-tool";
action = "ALLOW";
user_agent_regex = ".*Google-InspectionTool.*";
}
{ {
# On autorise les indexers des moteurs de recherche. # On autorise les indexers des moteurs de recherche.
# https://github.com/TecharoHQ/anubis/blob/main/data/crawlers/_allow-good.yaml # https://github.com/TecharoHQ/anubis/blob/main/data/crawlers/_allow-good.yaml
@ -190,8 +203,8 @@ in
]; ];
}; };
"wiki" = { "wiki" = {
anubisConfig = "${anubisChallenge}"; ## anubisConfig = "${anubisChallenge}";
target = "[fd00::10:0:ff:fe01:6110]"; # l'ipv4 marche pas target = "172.16.10.161";
serverAliases = [ serverAliases = [
"wikipedia" "wikipedia"
]; ];

View File

@ -147,6 +147,11 @@ in
proxyWebsockets = vhostConfig.proxyWebsockets; proxyWebsockets = vhostConfig.proxyWebsockets;
}; };
serverName = "${vhostName}.crans.${mainTld}"; serverName = "${vhostName}.crans.${mainTld}";
extraConfig = "
set_real_ip_from 172.16.0.0/16;
set_real_ip_from fd00::/56;
real_ip_header X-Real-Ip;
";
} }
) cfg.virtualHosts; ) cfg.virtualHosts;
@ -165,6 +170,11 @@ in
listen = [ listen = [
{ addr = "unix:/run/nginx/nginx-${vhostName}.sock"; } { addr = "unix:/run/nginx/nginx-${vhostName}.sock"; }
]; ];
serverName = "${vhostName}.crans.${mainTld}";
extraConfig = "
set_real_ip_from unix:;
real_ip_header X-Real-IP;
";
}) cfg.virtualHosts; }) cfg.virtualHosts;
# Configuration des alias .fr et .eu # Configuration des alias .fr et .eu