Project

General

Profile

Bug #1269

fastcgi.map-extensions doesn't work / odd static behavior

Added by mike503 about 12 years ago. Updated about 11 years ago.

Status:
Invalid
Priority:
Normal
Assignee:
-
Category:
mod_fastcgi
Target version:
Start date:
Due date:
% Done:

0%

Estimated time:
Missing in 1.5.x:

Description

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

History

#1

Updated by mike503 about 12 years ago

that second .php was .htm :)

keeping it simple and only using fastcgi.map-extensions actually sends the request to mod_fastcgi, but the php code is not executed.

#2

Updated by mike503 about 12 years ago

it appears if compress is enabled for some reason it does not process php.

doing this:
compress.filetype = ( )

in the $HOST stanza makes it work... from what i can tell a debug request log doesn't help me determine why though.

#3

Updated by admin about 12 years ago

it appears if compress is enabled for some reason it does not process php.

In what order did you load the compress and fastcgi modules?
Tried the other order?

#4

Updated by stbuehler about 11 years ago

  • Status changed from New to Fixed
  • Resolution set to invalid

if you try to handle the same file with compress and fastcgi, the module which got loaded first will win... and i don't see anything wrong with that. (ok, perhaps it would be nice to have more debug output from mod_compress)

#5

Updated by stbuehler about 11 years ago

  • Status changed from Fixed to Invalid

Also available in: Atom