From 2cc39661d9e9b6c04dc71c79b210c475aed4bd03 Mon Sep 17 00:00:00 2001 From: hallgren Date: Wed, 14 Nov 2012 13:52:45 +0000 Subject: Add flag --document-root for user with gf --server This can make it easier to test cloud service updates before installing them. --- src/compiler/GFServer.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/compiler/GFServer.hs') diff --git a/src/compiler/GFServer.hs b/src/compiler/GFServer.hs index ac14804c0..a6e4c5a52 100644 --- a/src/compiler/GFServer.hs +++ b/src/compiler/GFServer.hs @@ -47,12 +47,12 @@ import RunHTTP(cgiHandler) debug s = logPutStrLn s -- | Combined FastCGI and HTTP server -server port execute1 state0 = +server port optroot execute1 state0 = do --stderrToFile logFile state <- newMVar M.empty cache <- PS.newPGFCache datadir <- getDataDir - let root = datadir"www" + let root = maybe (datadir"www") id optroot -- debug $ "document root="++root setCurrentDirectory root -- FCGI.acceptLoop forkIO (handle_fcgi execute1 state0 state cache) -- cgit v1.2.3