mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-24 16:03:23 +00:00
nixos/roundcube: update nginx configuration
This commit is contained in:
parent
ee024ac138
commit
3b74d8781f
@ -148,20 +148,33 @@ in
|
||||
${cfg.hostName} = {
|
||||
forceSSL = mkDefault true;
|
||||
enableACME = mkDefault true;
|
||||
root = cfg.package;
|
||||
locations."/" = {
|
||||
root = cfg.package;
|
||||
index = "index.php";
|
||||
priority = 1100;
|
||||
extraConfig = ''
|
||||
location ~* \.php(/|$) {
|
||||
fastcgi_split_path_info ^(.+\.php)(/.+)$;
|
||||
fastcgi_pass unix:${fpm.socket};
|
||||
|
||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||
fastcgi_param PATH_INFO $fastcgi_path_info;
|
||||
|
||||
include ${config.services.nginx.package}/conf/fastcgi_params;
|
||||
include ${pkgs.nginx}/conf/fastcgi.conf;
|
||||
}
|
||||
add_header Cache-Control 'public, max-age=604800, must-revalidate';
|
||||
'';
|
||||
};
|
||||
locations."~ ^/(SQL|bin|config|logs|temp|vendor)/" = {
|
||||
priority = 3110;
|
||||
extraConfig = ''
|
||||
return 404;
|
||||
'';
|
||||
};
|
||||
locations."~ ^/(CHANGELOG.md|INSTALL|LICENSE|README.md|SECURITY.md|UPGRADING|composer.json|composer.lock)" = {
|
||||
priority = 3120;
|
||||
extraConfig = ''
|
||||
return 404;
|
||||
'';
|
||||
};
|
||||
locations."~* \\.php(/|$)" = {
|
||||
priority = 3130;
|
||||
extraConfig = ''
|
||||
fastcgi_pass unix:${fpm.socket};
|
||||
fastcgi_param PATH_INFO $fastcgi_path_info;
|
||||
fastcgi_split_path_info ^(.+\.php)(/.+)$;
|
||||
include ${config.services.nginx.package}/conf/fastcgi.conf;
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user