This repository has no description
0

Configure Feed

Select the types of activity you want to include in your feed.

websites util: cleanup

+18 -83
+18 -83
2configs/websites/util.nix
··· 24 24 }; 25 25 }; 26 26 27 - servephpBB = domains: 28 - let 29 - domain = head domains; 30 - 31 - in { 32 - services.nginx.virtualHosts."${domain}" = { 33 - serverAliases = domains; 34 - extraConfig = '' 35 - index index.php; 36 - root /srv/http/${domain}/; 37 - access_log /tmp/nginx_acc.log; 38 - error_log /tmp/nginx_err.log; 39 - error_page 404 /404.html; 40 - error_page 500 502 503 504 /50x.html; 41 - client_max_body_size 100m; 42 - ''; 43 - locations."/".extraConfig = '' 44 - try_files $uri $uri/ /index.php?$args; 45 - ''; 46 - locations."~ \.php(?:$|/)".extraConfig = '' 47 - fastcgi_split_path_info ^(.+\.php)(/.+)$; 48 - include ${pkgs.nginx}/conf/fastcgi_params; 49 - fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; 50 - fastcgi_param PATH_INFO $fastcgi_path_info; 51 - fastcgi_param HTTPS on; 52 - fastcgi_param modHeadersAvailable true; #Avoid sending the security headers twice 53 - fastcgi_pass unix:/srv/http/${domain}/phpfpm.pool; 54 - fastcgi_intercept_errors on; 55 - ''; 56 - #Directives to send expires headers and turn off 404 error logging. 57 - locations."~* ^.+\.(xml|ogg|ogv|svg|svgz|eot|otf|woff|mp4|ttf|css|rss|atom|js|jpg|jpeg|gif|png|ico|zip|tgz|gz|rar|bz2|doc|xls|exe|ppt|tar|mid|midi|wav|bmp|rtf)$".extraConfig = '' 58 - access_log off; 59 - log_not_found off; 60 - expires max; 61 - ''; 62 - }; 63 - services.phpfpm.pools."${domain}" = { 64 - user = "nginx"; 65 - group = "nginx"; 66 - extraConfig = '' 67 - listen = /srv/http/${domain}/phpfpm.pool 68 - pm = dynamic 69 - pm.max_children = 25 70 - pm.start_servers = 5 71 - pm.min_spare_servers = 3 72 - pm.max_spare_servers = 20 73 - listen.owner = nginx 74 - listen.group = nginx 75 - php_admin_value[error_log] = 'stderr' 76 - php_admin_flag[log_errors] = on 77 - catch_workers_output = yes 78 - ''; 79 - }; 80 - }; 81 - 82 27 serveOwncloud = domains: 83 28 let 84 29 domain = head domains; ··· 174 119 services.phpfpm.pools."${domain}" = { 175 120 user = "nginx"; 176 121 group = "nginx"; 177 - extraConfig = '' 178 - listen = /srv/http/${domain}/phpfpm.pool 179 - pm = dynamic 180 - pm.max_children = 32 181 - pm.max_requests = 500 182 - pm.start_servers = 2 183 - pm.min_spare_servers = 2 184 - pm.max_spare_servers = 5 185 - listen.owner = nginx 186 - listen.group = nginx 187 - php_admin_value[error_log] = 'stderr' 188 - php_admin_flag[log_errors] = on 189 - catch_workers_output = yes 190 - ''; 122 + settings = { 123 + listen = "/srv/http/${domain}/phpfpm.pool"; 124 + pm = "dynamic"; 125 + "pm.max_children" = 32; 126 + "pm.max_requests" = 500; 127 + "pm.start_servers" = 2; 128 + "pm.min_spare_servers" = 2; 129 + "pm.max_spare_servers" = 5; 130 + }; 191 131 }; 192 132 }; 193 133 ··· 230 170 services.phpfpm.pools."${domain}" = { 231 171 user = "nginx"; 232 172 group = "nginx"; 233 - extraConfig = '' 234 - listen = /srv/http/${domain}/phpfpm.pool 235 - pm = dynamic 236 - pm.max_children = 25 237 - pm.start_servers = 5 238 - pm.min_spare_servers = 3 239 - pm.max_spare_servers = 20 240 - listen.owner = nginx 241 - listen.group = nginx 242 - php_admin_value[error_log] = 'stderr' 243 - php_admin_flag[log_errors] = on 244 - catch_workers_output = yes 245 - ''; 173 + settings = { 174 + listen = "/srv/http/${domain}/phpfpm.pool"; 175 + pm = "dynamic"; 176 + "pm.max_children" = 32; 177 + "pm.max_requests" = 500; 178 + "pm.start_servers" = 2; 179 + "pm.min_spare_servers" = 2; 180 + "pm.max_spare_servers" = 5; 181 + }; 246 182 }; 247 183 }; 248 - 249 184 }