app (TextIO.closeOut o #2) (!vhostFiles))
val php_version = fn (EVar "php5", _) => SOME 5
- | _ => NONE
+ | (EVar "fast_php", _) => SOME 6
+ | _ => NONE
fun vhostBody (env, makeFullHost) =
let
TextIO.output (file, user);
TextIO.output (file, "/DAVLock");
- if php <> Config.Apache.defaultPhpVersion then
+ if php = Config.Apache.defaultPhpVersion
+ then
+ ()
+ else if php = 6
+ then
+ (* fastcgi php 5.6 since 6 doesn't exist *)
+ (TextIO.output (file, "\n\tAddHandler fcgid-script .php .phtml");
+ TextIO.output (file, "\n\tFcgidWrapper \"");
+ TextIO.output (file, Config.Apache.fastCgiWrapperOf user);
+ TextIO.output (file, " ");
+ TextIO.output (file, Config.Apache.phpFastCgiWrapper);
+ TextIO.output (file, "\""))
+ else
(TextIO.output (file, "\n\tAddHandler x-httpd-php");
TextIO.output (file, Int.toString php);
- TextIO.output (file, " .php .phtml"))
- else
- ();
-
- (ld, file)
+ TextIO.output (file, " .php .phtml"));
+ (ld, file)
end)
places;
write "\n\tDocumentRoot ";