From c6ef8d4e8d18c1af2cae226381a2e759133e1656 Mon Sep 17 00:00:00 2001 From: Clinton Ebadi Date: Tue, 23 Feb 2021 21:53:45 -0500 Subject: [PATCH] apache: fix phpVersion action Was not updated with PhpVersion environment variable to output once wrapper directive per extension instead of forcing all extensions. --- lib/apache.dtl | 2 -- src/plugins/apache.sml | 18 +++++++++++------- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/lib/apache.dtl b/lib/apache.dtl index 9269ee1..b663f0e 100644 --- a/lib/apache.dtl +++ b/lib/apache.dtl @@ -44,8 +44,6 @@ extern val php73 : php_version; extern val php74 : php_version; {{FastCGI based php 7.4.}} -val fast_php : php_version = php56; - extern val vhost : host -> Vhost => [Domain] {WebPlaces : [web_place], SSL : ssl, diff --git a/src/plugins/apache.sml b/src/plugins/apache.sml index 9d751e8..59e96b3 100644 --- a/src/plugins/apache.sml +++ b/src/plugins/apache.sml @@ -475,6 +475,7 @@ val php_version = fn (EVar "php56", _) => SOME 56 | (EVar "php72", _) => SOME 72 | (EVar "php73", _) => SOME 73 | (EVar "php74", _) => SOME 74 + | (EVar "php80", _) => SOME 80 | _ => NONE fun vhostBody (env, makeFullHost) = @@ -1207,13 +1208,16 @@ val () = Env.action_one "diskCache" val () = Env.action_one "phpVersion" ("version", php_version) (fn version => (write "\tAddHandler fcgid-script .php .phtml\n"; - (* FIXME: only set kerberos wrapper of waklog is on *) - (* won't be trivial, since we don't have access to node here *) - write "\n\tFcgidWrapper \""; - write (Config.Apache.fastCgiWrapperOf (Domain.getUser ())); - write " "; - write (Config.Apache.phpFastCgiWrapper version); - write "\" .php .phtml\n")) + (* FIXME: only set kerberos wrapper of waklog is on *) + (* won't be trivial, since we don't have access to node here *) + app (fn ext => (write "\n\tFcgidWrapper \""; + write (Config.Apache.fastCgiWrapperOf (Domain.getUser ())); + write " "; + write (Config.Apache.phpFastCgiWrapper version); + write "\" "; + write ext; + write "\n")) + [".php", ".phtml"])) val () = Env.action_two "addType" ("mime type", Env.string, "extension", Env.string) -- 2.20.1