i am trying to parse .htm files as .php for a client.
CONFIG 1:
$HTTP["host"] =~ "^foo\.com$" {
server.document-root = "/home/mark/web/foo.com"
static-file.exclude-extensions = ( ".php", ".pl", ".cgi", ".htm" )
fastcgi.debug = 1
debug.log-request-handling = "enable"
fastcgi.map-extensions = ( ".htm" => ".php" )
fastcgi.server = (
".php" =>
(
(
"host" => "127.0.0.1",
"port" => 10511,
"broken-scriptfilename" => "enable"
))
)
}
CONFIG 2:
$HTTP["host"] =~ "^foo\.com$" {
server.document-root = "/home/mark/web/foo.com"
static-file.exclude-extensions = ( ".php", ".pl", ".cgi", ".htm" )
fastcgi.debug = 1
debug.log-request-handling = "enable"
fastcgi.server = (
".php" =>
(
(
"host" => "127.0.0.1",
"port" => 10511,
"broken-scriptfilename" => "enable"
)),
".php" =>
(
(
"host" => "127.0.0.1",
"port" => 10511,
"broken-scriptfilename" => "enable"
))
)
}
the output from config 1 is below. config 2 actually says it is dispatching to fastcgi, but it does not process PHP still. if i am missing something here please let me know, but it appears to be a bug. it keeps wanting to treat .htm as static, but when i tell it to use fastcgi explicitly, it looks like it tries to, but it doesn't seem to parse it properly. should be easy enough to reproduce/fix.
2007-07-26 01:03:50: (response.c.202) -- splitting Request-URI
2007-07-26 01:03:50: (response.c.203) Request-URI : /test.htm
2007-07-26 01:03:50: (response.c.204) URI-scheme : http
2007-07-26 01:03:50: (response.c.205) URI-authority: www.foo.com
2007-07-26 01:03:50: (response.c.206) URI-path : /test.htm
2007-07-26 01:03:50: (response.c.207) URI-query :
2007-07-26 01:03:50: (response.c.257) -- sanatising URI
2007-07-26 01:03:50: (response.c.258) URI-path : /test.htm
2007-07-26 01:03:50: (response.c.372) -- before doc_root
2007-07-26 01:03:50: (response.c.373) Doc-Root : /home/mark/web/foo.com
2007-07-26 01:03:50: (response.c.374) Rel-Path : /test.htm
2007-07-26 01:03:50: (response.c.375) Path :
2007-07-26 01:03:50: (response.c.423) -- after doc_root
2007-07-26 01:03:50: (response.c.424) Doc-Root : /home/mark/web/foo.com
2007-07-26 01:03:50: (response.c.425) Rel-Path : /test.htm
2007-07-26 01:03:50: (response.c.426) Path : /home/mark/web/foo.com/test.htm
2007-07-26 01:03:50: (response.c.443) -- logical -> physical
2007-07-26 01:03:50: (response.c.444) Doc-Root : /home/mark/web/foo.com
2007-07-26 01:03:50: (response.c.445) Rel-Path : /test.htm
2007-07-26 01:03:50: (response.c.446) Path : /home/mark/web/foo.com/test.htm
2007-07-26 01:03:50: (response.c.463) -- handling physical path
2007-07-26 01:03:50: (response.c.464) Path : /home/mark/web/foo.com/test.htm
2007-07-26 01:03:50: (response.c.471) -- file found
2007-07-26 01:03:50: (response.c.472) Path : /home/mark/web/foo.com/test.htm
2007-07-26 01:03:50: (response.c.610) -- handling subrequest
2007-07-26 01:03:50: (response.c.611) Path : /home/mark/web/foo.com/test.htm
2007-07-26 01:03:50: (mod_staticfile.c.386) -- handling file as static file
2007-07-26 01:03:50: (response.c.622) -- subrequest finished