Merge branch 'reverseproxy2' into 'main'

Udapte Reverseproxy

See merge request nounous/nixos!81
merge-requests/81/merge
Pyjacpp 2026-08-07 11:47:23 +02:00
commit 1afc7c76a3
2 changed files with 13 additions and 7 deletions

View File

@ -1,5 +1,6 @@
{ {
pkgs, pkgs,
lib,
... ...
}: }:
@ -175,8 +176,8 @@ let
src = fetchFromCrans { src = fetchFromCrans {
repo = "site-install-party"; repo = "site-install-party";
rev = "master"; rev = "ac44f6e4387e0182f2c7dbda3eeccba0be87c9b6";
hash = "sha256-KVB4m/ms0WuArrkLn05INVLqhaGxzCg30GMICI6tM5E="; hash = "sha256-xFwDXMmzjeIfhV5Ez1EmNfJcOSMljUZ4aycPppoLtqY=";
}; };
build-system = with pkgs.python3Packages; [ build-system = with pkgs.python3Packages; [
@ -193,8 +194,8 @@ let
src = fetchFromCrans { src = fetchFromCrans {
repo = "homepage"; repo = "homepage";
rev = "master"; rev = "51ae6b9f4d59815d14963209ff30988200eff944";
hash = "sha256-e9tttzKEWcBhogQY2ITDqqTbix/zcnBAylj1eKY791E="; hash = "sha256-un0LIIIFn56Zm1uF32+suc2/QrBDMRVTv/A0bOgbFJQ=";
}; };
nativeBuildInputs = with pkgs; [ nativeBuildInputs = with pkgs; [
@ -292,8 +293,8 @@ in
"re2o-dev".proxyPass = "172.16.10.166"; "re2o-dev".proxyPass = "172.16.10.166";
"services".serveLocalFiles = fetchFromCrans { "services".serveLocalFiles = fetchFromCrans {
repo = "services-page"; repo = "services-page";
rev = "master"; rev = "ef5e998a09d298e75a94daae089f65407d40e331";
hash = "sha256-ov4r6Oeta+vRcEv8bp7lFQg+2n4JTG4buetram5kN08="; hash = "sha256-GzFmU+U9OzZ0m40NKmrtDGKqfWdUO/fBsWBWKYFL8xs=";
}; };
"snl".globalRedirect = "perso.crans.org/sonetlumens"; "snl".globalRedirect = "perso.crans.org/sonetlumens";
"test-melon".proxyPass = "172.16.10.150:8080"; "test-melon".proxyPass = "172.16.10.150:8080";

View File

@ -283,12 +283,17 @@ in
# Entrée dAnubis # Entrée dAnubis
"${vhostName}-anubis" = mkIf (vhostConfig.anubisConfig != null) ( "${vhostName}-anubis" = mkIf (vhostConfig.anubisConfig != null) (
entryExtraConf entryExtraConf
// { // rec {
serverName = mkHostName vhostName mainTld; serverName = mkHostName vhostName mainTld;
locations."/" = { locations."/" = {
proxyPass = "http://unix:/run/anubis/anubis-${vhostName}/socket.sock"; proxyPass = "http://unix:/run/anubis/anubis-${vhostName}/socket.sock";
proxyWebsockets = vhostConfig.proxyWebsockets; proxyWebsockets = vhostConfig.proxyWebsockets;
}; };
locations."/.within.website/x/cmd/anubis/api/honeypot/" = locations."/" // {
extraConfig = ''
add_header 'X-Robots-Tag' 'noindex,nofollow' always;
'';
};
extraConfig = entryExtraConf.extraConfig + '' extraConfig = entryExtraConf.extraConfig + ''
access_log /var/log/nginx/anubis/access.log; access_log /var/log/nginx/anubis/access.log;
error_log /var/log/nginx/anubis/error.log; error_log /var/log/nginx/anubis/error.log;