hosts/roundcube: webdir moved to public_html within package
Build topology graph / evals (push) Successful in 2m44s
Eval nix flake / evals (push) Successful in 6m12s

This commit is contained in:
2026-06-01 02:31:54 +09:00
parent 074d240595
commit ac64d94e00
+13 -26
View File
@@ -57,35 +57,22 @@ in
tryFiles = "$uri $uri/ =404";
index = "index.php";
root = pkgs.linkFarm "roundcube-dir" {
roundcube = "${cfg.package}";
roundcube = "${cfg.package}/public_html";
};
priority = 1100;
extraConfig = ''
location ~ ^/roundcube/(${builtins.concatStringsSep "|" [
# https://wiki.archlinux.org/title/Roundcube
"README"
"INSTALL"
"LICENSE"
"CHANGELOG"
"UPGRADING"
"bin"
"SQL"
".+\\.md"
"\\."
"config"
"temp"
"logs"
]})/? {
deny all;
}
add_header Cache-Control 'public, max-age=604800, must-revalidate';
client_max_body_size ${toString cfg.maxAttachmentSize};
'';
};
location ~ ^/roundcube/(.+\.php)(/?.*)$ {
fastcgi_split_path_info ^/roundcube(/.+\.php)(/.+)$;
include ${config.services.nginx.package}/conf/fastcgi_params;
include ${config.services.nginx.package}/conf/fastcgi.conf;
fastcgi_index index.php;
fastcgi_pass unix:${config.services.phpfpm.pools.roundcube.socket};
}
locations."~ ^/roundcube/(.+\\.php)(/?.*)$" = {
extraConfig = ''
fastcgi_split_path_info ^/roundcube(/.+\.php)(/.+)$;
include ${config.services.nginx.package}/conf/fastcgi_params;
include ${config.services.nginx.package}/conf/fastcgi.conf;
fastcgi_index index.php;
fastcgi_pass unix:${config.services.phpfpm.pools.roundcube.socket};
'';
};
};