Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- services.phpfpm.pools.rainloop = {
- user = "nginx";
- group = "nginx";
- settings = {
- "pm" = "dynamic";
- "pm.max_children" = 10;
- "pm.start_servers" = 10;
- "pm.min_spare_servers" = 5;
- "pm.max_spare_servers" = 10;
- "pm.max_requests" = 500;
- };
- # socket = "/run/phpfpm/rainloop.sock";
- };
- networking.hosts = { "127.0.0.1" = [ "localhost" "nixos" "mail.nixos" ]; }; # FIXME
- services.nginx.virtualHosts."mail.nixos" = {
- root = pkgs.rainloop-community.outPath;
- locations."/" = {
- index = "index.php";
- tryFiles = "$uri $uri/ /index.php?$query_string";
- };
- locations."~ \\.php$" = {
- extraConfig = ''
- fastcgi_index index.php;
- fastcgi_split_path_info ^(.+\.php)(.*)$;
- fastcgi_keep_conn on;
- # include /etc/nginx/fastcgi_params;
- fastcgi_pass unix:${config.services.phpfpm.pools.rainloop.socket};
- fastcgi_param SCRIPT_FILENAME $document_root/$fastcgi_script_name;
- fastcgi_param QUERY_STRING $query_string;
- '';
- };
- locations."^~ /data" = { extraConfig = "deny all;"; };
- };
Add Comment
Please, Sign In to add comment