From: Clinton Ebadi Date: Wed, 24 Feb 2021 02:53:45 +0000 (-0500) Subject: apache: fix phpVersion action X-Git-Tag: release_20210223-1~2 X-Git-Url: https://git.hcoop.net/hcoop/domtool2.git/commitdiff_plain/c6ef8d4e8d18c1af2cae226381a2e759133e1656?ds=inline apache: fix phpVersion action Was not updated with PhpVersion environment variable to output once wrapper directive per extension instead of forcing all extensions. --- 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)