apache: fix phpVersion action
[hcoop/domtool2.git] / src / plugins / apache.sml
index 9d751e8..59e96b3 100644 (file)
@@ -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)