diff options
author | Ismaël Bouya <ismael.bouya@normalesup.org> | 2020-01-08 21:36:05 +0100 |
---|---|---|
committer | Ismaël Bouya <ismael.bouya@normalesup.org> | 2020-01-08 21:36:05 +0100 |
commit | fd2af8fa50dc1a60d40a1aa3c4252d8eb3abf5b0 (patch) | |
tree | 67f39532c8c6b5f209115759804ed96d7b63e54c /modules/private/websites/isabelle | |
parent | 7baabd01cc2b6ba7b2e99f95ec6df6cacafca048 (diff) | |
download | Nix-fd2af8fa50dc1a60d40a1aa3c4252d8eb3abf5b0.tar.gz Nix-fd2af8fa50dc1a60d40a1aa3c4252d8eb3abf5b0.tar.zst Nix-fd2af8fa50dc1a60d40a1aa3c4252d8eb3abf5b0.zip |
Add php to iridologie website
Diffstat (limited to 'modules/private/websites/isabelle')
-rw-r--r-- | modules/private/websites/isabelle/iridologie.nix | 31 |
1 files changed, 29 insertions, 2 deletions
diff --git a/modules/private/websites/isabelle/iridologie.nix b/modules/private/websites/isabelle/iridologie.nix index 652f86d..cb4e300 100644 --- a/modules/private/websites/isabelle/iridologie.nix +++ b/modules/private/websites/isabelle/iridologie.nix | |||
@@ -7,6 +7,29 @@ in { | |||
7 | 7 | ||
8 | config = lib.mkIf cfg.enable { | 8 | config = lib.mkIf cfg.enable { |
9 | services.webstats.sites = [ { name = "iridologie.icommandeur.org"; } ]; | 9 | services.webstats.sites = [ { name = "iridologie.icommandeur.org"; } ]; |
10 | system.activationScripts.iridologie = { | ||
11 | deps = [ "httpd" ]; | ||
12 | text = '' | ||
13 | install -m 0755 -o wwwrun -g wwwrun -d /var/lib/php/sessions/iridologie | ||
14 | ''; | ||
15 | }; | ||
16 | services.phpfpm.pools.iridologie = { | ||
17 | listen = "/run/phpfpm/iridologie.sock"; | ||
18 | extraConfig = '' | ||
19 | user = wwwrun | ||
20 | group = wwwrun | ||
21 | listen.owner = wwwrun | ||
22 | listen.group = wwwrun | ||
23 | |||
24 | pm = ondemand | ||
25 | pm.max_children = 5 | ||
26 | pm.process_idle_timeout = 60 | ||
27 | |||
28 | php_admin_value[open_basedir] = "/var/lib/php/sessions/iridologie:${varDir}:/tmp" | ||
29 | php_admin_value[session.save_path] = "/var/lib/php/sessions/iridologie" | ||
30 | ''; | ||
31 | }; | ||
32 | services.websites.env.production.modules = [ "proxy_fcgi" ]; | ||
10 | services.websites.env.production.vhostConfs.iridologie = { | 33 | services.websites.env.production.vhostConfs.iridologie = { |
11 | certName = "aten"; | 34 | certName = "aten"; |
12 | addToCerts = true; | 35 | addToCerts = true; |
@@ -19,9 +42,13 @@ in { | |||
19 | RewriteCond "%{HTTP_HOST}" "!^iridologie\.icommandeur\.org$" [NC] | 42 | RewriteCond "%{HTTP_HOST}" "!^iridologie\.icommandeur\.org$" [NC] |
20 | RewriteRule ^(.+)$ https://iridologie.icommandeur.org$1 [R=302,L] | 43 | RewriteRule ^(.+)$ https://iridologie.icommandeur.org$1 [R=302,L] |
21 | 44 | ||
45 | <FilesMatch "\.php$"> | ||
46 | SetHandler "proxy:unix:/run/phpfpm/iridologie.sock|fcgi://localhost" | ||
47 | </FilesMatch> | ||
48 | |||
22 | <Directory ${varDir}> | 49 | <Directory ${varDir}> |
23 | DirectoryIndex index.html | 50 | DirectoryIndex index.php index.htm index.html |
24 | AllowOverride None | 51 | AllowOverride All |
25 | Require all granted | 52 | Require all granted |
26 | </Directory> | 53 | </Directory> |
27 | '' | 54 | '' |