alpha
Login
or
Join now
lass.pds.lassul.us
/
superconfig
Star
0
Fork
1
Atom
Configure Feed
Issues
Pull Requests
Commits
Tags
Feed URL
Select the types of activity you want to include in your feed.
This repository has no description
Star
0
Fork
1
Atom
Configure Feed
Issues
Pull Requests
Commits
Tags
Feed URL
Select the types of activity you want to include in your feed.
Overview
Issues
Pulls
1
Pipelines
websites util: cleanup
author
lassulus
date
2 years ago
(Mar 17, 2024, 3:03 PM CET)
commit
7cc3baeb
7cc3baebae0ef6a6f6135238302acfa003d52897
parent
71557f65
71557f6564d09c53d7c357e5b1e469ccbd1951f8
+18
-83
1 changed file
Expand all
Collapse all
Unified
Split
2configs
websites
util.nix
+18
-83
2configs/websites/util.nix
View file
Reviewed
···
24
24
};
25
25
};
26
26
27
27
-
servephpBB = domains:
28
28
-
let
29
29
-
domain = head domains;
30
30
-
31
31
-
in {
32
32
-
services.nginx.virtualHosts."${domain}" = {
33
33
-
serverAliases = domains;
34
34
-
extraConfig = ''
35
35
-
index index.php;
36
36
-
root /srv/http/${domain}/;
37
37
-
access_log /tmp/nginx_acc.log;
38
38
-
error_log /tmp/nginx_err.log;
39
39
-
error_page 404 /404.html;
40
40
-
error_page 500 502 503 504 /50x.html;
41
41
-
client_max_body_size 100m;
42
42
-
'';
43
43
-
locations."/".extraConfig = ''
44
44
-
try_files $uri $uri/ /index.php?$args;
45
45
-
'';
46
46
-
locations."~ \.php(?:$|/)".extraConfig = ''
47
47
-
fastcgi_split_path_info ^(.+\.php)(/.+)$;
48
48
-
include ${pkgs.nginx}/conf/fastcgi_params;
49
49
-
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
50
50
-
fastcgi_param PATH_INFO $fastcgi_path_info;
51
51
-
fastcgi_param HTTPS on;
52
52
-
fastcgi_param modHeadersAvailable true; #Avoid sending the security headers twice
53
53
-
fastcgi_pass unix:/srv/http/${domain}/phpfpm.pool;
54
54
-
fastcgi_intercept_errors on;
55
55
-
'';
56
56
-
#Directives to send expires headers and turn off 404 error logging.
57
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
58
-
access_log off;
59
59
-
log_not_found off;
60
60
-
expires max;
61
61
-
'';
62
62
-
};
63
63
-
services.phpfpm.pools."${domain}" = {
64
64
-
user = "nginx";
65
65
-
group = "nginx";
66
66
-
extraConfig = ''
67
67
-
listen = /srv/http/${domain}/phpfpm.pool
68
68
-
pm = dynamic
69
69
-
pm.max_children = 25
70
70
-
pm.start_servers = 5
71
71
-
pm.min_spare_servers = 3
72
72
-
pm.max_spare_servers = 20
73
73
-
listen.owner = nginx
74
74
-
listen.group = nginx
75
75
-
php_admin_value[error_log] = 'stderr'
76
76
-
php_admin_flag[log_errors] = on
77
77
-
catch_workers_output = yes
78
78
-
'';
79
79
-
};
80
80
-
};
81
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
177
-
extraConfig = ''
178
178
-
listen = /srv/http/${domain}/phpfpm.pool
179
179
-
pm = dynamic
180
180
-
pm.max_children = 32
181
181
-
pm.max_requests = 500
182
182
-
pm.start_servers = 2
183
183
-
pm.min_spare_servers = 2
184
184
-
pm.max_spare_servers = 5
185
185
-
listen.owner = nginx
186
186
-
listen.group = nginx
187
187
-
php_admin_value[error_log] = 'stderr'
188
188
-
php_admin_flag[log_errors] = on
189
189
-
catch_workers_output = yes
190
190
-
'';
122
122
+
settings = {
123
123
+
listen = "/srv/http/${domain}/phpfpm.pool";
124
124
+
pm = "dynamic";
125
125
+
"pm.max_children" = 32;
126
126
+
"pm.max_requests" = 500;
127
127
+
"pm.start_servers" = 2;
128
128
+
"pm.min_spare_servers" = 2;
129
129
+
"pm.max_spare_servers" = 5;
130
130
+
};
191
131
};
192
132
};
193
133
···
230
170
services.phpfpm.pools."${domain}" = {
231
171
user = "nginx";
232
172
group = "nginx";
233
233
-
extraConfig = ''
234
234
-
listen = /srv/http/${domain}/phpfpm.pool
235
235
-
pm = dynamic
236
236
-
pm.max_children = 25
237
237
-
pm.start_servers = 5
238
238
-
pm.min_spare_servers = 3
239
239
-
pm.max_spare_servers = 20
240
240
-
listen.owner = nginx
241
241
-
listen.group = nginx
242
242
-
php_admin_value[error_log] = 'stderr'
243
243
-
php_admin_flag[log_errors] = on
244
244
-
catch_workers_output = yes
245
245
-
'';
173
173
+
settings = {
174
174
+
listen = "/srv/http/${domain}/phpfpm.pool";
175
175
+
pm = "dynamic";
176
176
+
"pm.max_children" = 32;
177
177
+
"pm.max_requests" = 500;
178
178
+
"pm.start_servers" = 2;
179
179
+
"pm.min_spare_servers" = 2;
180
180
+
"pm.max_spare_servers" = 5;
181
181
+
};
246
182
};
247
183
};
248
248
-
249
184
}