else
ConfigCore.sharedRoot ^ "/backup/apache2/"
+fun fastCgiWrapperOf user =
+ if size user < 2 then
+ "/bad_username"
+ else
+ String.concat [ConfigCore.sharedRoot,
+ "/httpd/fastcgi/",
+ String.substring (user, 0, 1),
+ "/",
+ String.substring (user, 0, 2),
+ "/",
+ user,
+ "/",
+ user,
+ "-wrapper-wrapper"]
+
+(* FIXME: hcoop reference *)
+val phpFastCgiWrapper = "/afs/hcoop.net/common/bin/php5-fcgi-wrapper"
+
val defaultPhpVersion = 5
val waklogUserFile = ConfigCore.localRoot ^ "/waklog.conf"
val logDirOf : bool -> string -> string
val realLogDirOf : string -> string
val backupLogDirOf : bool -> string
+ val fastCgiWrapperOf : string -> string
val defaultPhpVersion : int
+ val phpFastCgiWrapper : string
val waklogUserFile : string
extern type php_version;
extern val php5 : php_version;
+extern val fast_php : php_version;
extern val vhost : host -> Vhost => [Domain]
{WebPlaces : [web_place],
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 ";