diff options
-rw-r--r-- | custom/ymir.nginx | 62 | ||||
-rw-r--r-- | ymir.nix | 63 |
2 files changed, 63 insertions, 62 deletions
diff --git a/custom/ymir.nginx b/custom/ymir.nginx new file mode 100644 index 00000000..1fb0afcb --- /dev/null +++ b/custom/ymir.nginx | |||
@@ -0,0 +1,62 @@ | |||
1 | default_type application/octet-stream; | ||
2 | |||
3 | log_format main | ||
4 | '$remote_addr - $remote_user [$time_local] ' | ||
5 | '"$request" $status $bytes_sent ' | ||
6 | '"$http_referer" "$http_user_agent" ' | ||
7 | '"$gzip_ratio"'; | ||
8 | |||
9 | client_header_timeout 10m; | ||
10 | client_body_timeout 10m; | ||
11 | send_timeout 10m; | ||
12 | |||
13 | connection_pool_size 256; | ||
14 | client_header_buffer_size 1k; | ||
15 | large_client_header_buffers 4 2k; | ||
16 | request_pool_size 4k; | ||
17 | |||
18 | gzip on; | ||
19 | gzip_min_length 1100; | ||
20 | gzip_buffers 4 8k; | ||
21 | gzip_types text/plain; | ||
22 | |||
23 | output_buffers 1 32k; | ||
24 | postpone_output 1460; | ||
25 | |||
26 | sendfile on; | ||
27 | tcp_nopush on; | ||
28 | tcp_nodelay on; | ||
29 | |||
30 | keepalive_timeout 75 20; | ||
31 | |||
32 | ignore_invalid_headers on; | ||
33 | |||
34 | server { | ||
35 | listen *:80; | ||
36 | listen [::]:80; | ||
37 | server_name dirty-haskell.org www.dirty-haskell.org; | ||
38 | |||
39 | root /srv/www/dirty-haskell.org; | ||
40 | } | ||
41 | |||
42 | server { | ||
43 | listen *:443 ssl; | ||
44 | listen [::]:443 ssl; | ||
45 | server_name dirty-haskell.org; | ||
46 | |||
47 | ssl_certificate /etc/nginx/ssl/dirty-haskell.org/fullchain.pem; | ||
48 | ssl_certificate_key /etc/nginx/ssl/dirty-haskell.org/privkey.pem; | ||
49 | |||
50 | root /srv/www/dirty-haskell.org; | ||
51 | } | ||
52 | |||
53 | server { | ||
54 | listen *:443 ssl; | ||
55 | listen [::]:443 ssl; | ||
56 | server_name www.dirty-haskell.org; | ||
57 | |||
58 | ssl_certificate /etc/nginx/ssl/www.dirty-haskell.org/fullchain.pem; | ||
59 | ssl_certificate_key /etc/nginx/ssl/www.dirty-haskell.org/privkey.pem; | ||
60 | |||
61 | root /srv/www/dirty-haskell.org; | ||
62 | } | ||
@@ -167,67 +167,6 @@ in { | |||
167 | 167 | ||
168 | services.nginx = { | 168 | services.nginx = { |
169 | enable = true; | 169 | enable = true; |
170 | httpConfig = '' | 170 | httpConfig = builtins.readFile ./custom/ymir.nginx; |
171 | default_type application/octet-stream; | ||
172 | |||
173 | log_format main | ||
174 | '$remote_addr - $remote_user [$time_local] ' | ||
175 | '"$request" $status $bytes_sent ' | ||
176 | '"$http_referer" "$http_user_agent" ' | ||
177 | '"$gzip_ratio"'; | ||
178 | |||
179 | client_header_timeout 10m; | ||
180 | client_body_timeout 10m; | ||
181 | send_timeout 10m; | ||
182 | |||
183 | connection_pool_size 256; | ||
184 | client_header_buffer_size 1k; | ||
185 | large_client_header_buffers 4 2k; | ||
186 | request_pool_size 4k; | ||
187 | |||
188 | gzip on; | ||
189 | gzip_min_length 1100; | ||
190 | gzip_buffers 4 8k; | ||
191 | gzip_types text/plain; | ||
192 | |||
193 | output_buffers 1 32k; | ||
194 | postpone_output 1460; | ||
195 | |||
196 | sendfile on; | ||
197 | tcp_nopush on; | ||
198 | tcp_nodelay on; | ||
199 | |||
200 | keepalive_timeout 75 20; | ||
201 | |||
202 | ignore_invalid_headers on; | ||
203 | |||
204 | server { | ||
205 | listen *:80; | ||
206 | listen [::]:80; | ||
207 | server_name dirty-haskell.org www.dirty-haskell.org; | ||
208 | |||
209 | root /srv/www/dirty-haskell.org; | ||
210 | } | ||
211 | server { | ||
212 | listen *:443 ssl; | ||
213 | listen [::]:443 ssl; | ||
214 | server_name dirty-haskell.org; | ||
215 | |||
216 | ssl_certificate /etc/nginx/ssl/dirty-haskell.org/fullchain.pem; | ||
217 | ssl_certificate_key /etc/nginx/ssl/dirty-haskell.org/privkey.pem; | ||
218 | |||
219 | root /srv/www/dirty-haskell.org; | ||
220 | } | ||
221 | server { | ||
222 | listen *:443 ssl; | ||
223 | listen [::]:443 ssl; | ||
224 | server_name www.dirty-haskell.org; | ||
225 | |||
226 | ssl_certificate /etc/nginx/ssl/www.dirty-haskell.org/fullchain.pem; | ||
227 | ssl_certificate_key /etc/nginx/ssl/www.dirty-haskell.org/privkey.pem; | ||
228 | |||
229 | root /srv/www/dirty-haskell.org; | ||
230 | } | ||
231 | ''; | ||
232 | }; | 171 | }; |
233 | } | 172 | } |