diff options
Diffstat (limited to 'modules/private/websites/teliotortay')
-rw-r--r-- | modules/private/websites/teliotortay/production.nix | 75 |
1 files changed, 0 insertions, 75 deletions
diff --git a/modules/private/websites/teliotortay/production.nix b/modules/private/websites/teliotortay/production.nix deleted file mode 100644 index 62762ec..0000000 --- a/modules/private/websites/teliotortay/production.nix +++ /dev/null | |||
@@ -1,75 +0,0 @@ | |||
1 | { lib, pkgs, config, ... }: | ||
2 | let | ||
3 | adminer = pkgs.callPackage ../commons/adminer.nix { inherit config; }; | ||
4 | cfg = config.myServices.websites.telioTortay.production; | ||
5 | varDir = "/var/lib/ftp/telio_tortay"; | ||
6 | env = config.myEnv.websites.telioTortay; | ||
7 | in { | ||
8 | options.myServices.websites.telioTortay.production.enable = lib.mkEnableOption "enable Telio Tortay's website"; | ||
9 | |||
10 | config = lib.mkIf cfg.enable { | ||
11 | services.webstats.sites = [ { name = "telio-tortay.immae.eu"; } ]; | ||
12 | |||
13 | security.acme.certs."ftp".extraDomains."telio-tortay.immae.eu" = null; | ||
14 | |||
15 | system.activationScripts.telio-tortay = { | ||
16 | deps = [ "httpd" ]; | ||
17 | text = '' | ||
18 | install -m 0755 -o wwwrun -g wwwrun -d /var/lib/ftp/telio_tortay/logs | ||
19 | install -m 0755 -o wwwrun -g wwwrun -d /var/lib/php/sessions/telio-tortay | ||
20 | ''; | ||
21 | }; | ||
22 | systemd.services.phpfpm-telio-tortay.after = lib.mkAfter [ "mysql.service" ]; | ||
23 | systemd.services.phpfpm-telio-tortay.wants = [ "mysql.service" ]; | ||
24 | services.phpfpm.pools.telio-tortay = { | ||
25 | user = "wwwrun"; | ||
26 | group = "wwwrun"; | ||
27 | settings = { | ||
28 | "listen.owner" = "wwwrun"; | ||
29 | "listen.group" = "wwwrun"; | ||
30 | |||
31 | "pm" = "ondemand"; | ||
32 | "pm.max_children" = "5"; | ||
33 | "pm.process_idle_timeout" = "60"; | ||
34 | |||
35 | "php_admin_value[open_basedir]" = "/var/lib/php/sessions/telio-tortay:${varDir}:/tmp"; | ||
36 | "php_admin_value[session.save_path]" = "/var/lib/php/sessions/telio-tortay"; | ||
37 | }; | ||
38 | phpOptions = config.services.phpfpm.phpOptions + '' | ||
39 | disable_functions = "mail" | ||
40 | extension=${pkgs.php}/lib/php/extensions/mysqli.so | ||
41 | ''; | ||
42 | }; | ||
43 | services.websites.env.production.modules = adminer.apache.modules ++ [ "proxy_fcgi" ]; | ||
44 | services.websites.env.production.vhostConfs.telio-tortay = { | ||
45 | certName = "telio-tortay"; | ||
46 | certMainHost = "telio-tortay.immae.eu"; | ||
47 | hosts = ["telio-tortay.immae.eu" "realistesmedia.fr" "www.realistesmedia.fr" ]; | ||
48 | root = varDir; | ||
49 | extraConfig = [ | ||
50 | (adminer.apache.vhostConf null) | ||
51 | '' | ||
52 | Use Stats telio-tortay.immae.eu | ||
53 | ServerAdmin ${env.server_admin} | ||
54 | ErrorLog "${varDir}/logs/error_log" | ||
55 | CustomLog "${varDir}/logs/access_log" combined | ||
56 | |||
57 | <FilesMatch "\.php$"> | ||
58 | SetHandler "proxy:unix:${config.services.phpfpm.pools.telio-tortay.socket}|fcgi://localhost" | ||
59 | </FilesMatch> | ||
60 | |||
61 | <Directory ${varDir}/logs> | ||
62 | AllowOverride None | ||
63 | Require all denied | ||
64 | </Directory> | ||
65 | <Directory ${varDir}> | ||
66 | DirectoryIndex index.php index.htm index.html | ||
67 | Options Indexes FollowSymLinks MultiViews Includes | ||
68 | AllowOverride all | ||
69 | Require all granted | ||
70 | </Directory> | ||
71 | '' | ||
72 | ]; | ||
73 | }; | ||
74 | }; | ||
75 | } | ||