Guest User

rainloop-configuration

a guest
May 6th, 2020
123
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.12 KB | None | 0 0
  1. services.phpfpm.pools.rainloop = {
  2. user = "nginx";
  3. group = "nginx";
  4. settings = {
  5. "pm" = "dynamic";
  6. "pm.max_children" = 10;
  7. "pm.start_servers" = 10;
  8. "pm.min_spare_servers" = 5;
  9. "pm.max_spare_servers" = 10;
  10. "pm.max_requests" = 500;
  11. };
  12. # socket = "/run/phpfpm/rainloop.sock";
  13. };
  14. networking.hosts = { "127.0.0.1" = [ "localhost" "nixos" "mail.nixos" ]; }; # FIXME
  15. services.nginx.virtualHosts."mail.nixos" = {
  16. root = pkgs.rainloop-community.outPath;
  17. locations."/" = {
  18. index = "index.php";
  19. tryFiles = "$uri $uri/ /index.php?$query_string";
  20. };
  21. locations."~ \\.php$" = {
  22. extraConfig = ''
  23. fastcgi_index index.php;
  24. fastcgi_split_path_info ^(.+\.php)(.*)$;
  25. fastcgi_keep_conn on;
  26. # include /etc/nginx/fastcgi_params;
  27. fastcgi_pass unix:${config.services.phpfpm.pools.rainloop.socket};
  28. fastcgi_param SCRIPT_FILENAME $document_root/$fastcgi_script_name;
  29. fastcgi_param QUERY_STRING $query_string;
  30. '';
  31. };
  32. locations."^~ /data" = { extraConfig = "deny all;"; };
  33. };
Add Comment
Please, Sign In to add comment