https://bz.apache.org/bugzilla/show_bug.cgi?id=59618

            Bug ID: 59618
           Summary: SCRIPT_FILENAME is prefixed with bogus "proxy:fcgi"
           Product: Apache httpd-2
           Version: 2.4.20
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: mod_proxy_fcgi
          Assignee: bugs@httpd.apache.org
          Reporter: champio...@gmail.com

Partial duplicate of 50851, but that bug is an omnibus with quite a bit of
history behind it and this issue is more easily patched.

When using mod_proxy_fcgi with the recommended SetHandler/Proxy architecture:

  Alias /cgi-bin/ "/usr/local/apache2/cgi-bin/"
  <Location /cgi-bin/>
    SetHandler "proxy:fcgi://localhost:4000"
  </Location>

  <Proxy "fcgi://localhost:4000">
  </Proxy>

...the SCRIPT_FILENAME passed to the backend is prefixed with proxy:fcgi:

  [Fri May 20 12:08:40.299263 2016] [proxy_fcgi:trace8] [pid 21189:tid
139785465222912] mod_proxy_fcgi.c(294): [client 127.0.0.1:51060] AH01062:
sending env var 'SCRIPT_FILENAME' value
'proxy:fcgi://localhost:4000/usr/local/apache2/cgi-bin/test-cgi'

This makes it difficult to use with general-purpose FCGI backends, since they
cannot understand the file path. PHP-FPM appears to have been hard-coded to
ignore the prefix as a workaround; see https://bugs.php.net/bug.php?id=54152 .

mod_proxy_fcgi already strips the proxy:balancer prefix; I propose that we add
the proxy:fcgi prefix to that logic as well (or refactor the logic so that the
internal prefixes aren't considered by the environment variable generation, but
that would be significantly more work).

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscr...@httpd.apache.org
For additional commands, e-mail: bugs-h...@httpd.apache.org

Reply via email to