https://bz.apache.org/bugzilla/show_bug.cgi?id=69160
--- Comment #10 from Yann Ylavic <[email protected]> --- I don't know because the two configurations seem to differ in the environment variables finally sent too. For instance if I request "/sympa/index.cgi" with: # no "unix:" thing here, not relevant since it resolves to the same finally <Location /sympa> SetHandler "proxy:fcgi://localhost" </Location> The env is this: REQUEST_URI="/sympa/index.cgi" DOCUMENT_ROOT="/var/www/htdocs" SCRIPT_FILENAME="proxy:fcgi://localhost/var/www/htdocs/sympa" SCRIPT_NAME="/sympa" PATH_INFO="/index.cgi" PATH_TRANSLATED="/var/www/htdocs/index.cgi" Same request with: <Location /sympa> ProxyPass "fcgi://localhost" </Location> The env is now: REQUEST_URI="/sympa/index.cgi" DOCUMENT_ROOT="/var/www/htdocs" SCRIPT_FILENAME="proxy:fcgi://localhost/index.cgi" SCRIPT_NAME="/sympa/index.cgi" (note no PATH_INFO nor PATH_TRANSLATED) To get the same env as with SetHandler, I thought something like "SetEnvIf Request_URI ^ proxy-fcgi-pathinfo=full" would do but I also need this patch then: Index: modules/proxy/mod_proxy_fcgi.c =================================================================== --- modules/proxy/mod_proxy_fcgi.c (revision 1919533) +++ modules/proxy/mod_proxy_fcgi.c (working copy) @@ -348,10 +348,11 @@ static apr_status_t send_environment(proxy_conn_re fcgi_req_config_t *rconf = ap_get_module_config(r->request_config, &proxy_fcgi_module); fcgi_dirconf_t *dconf = ap_get_module_config(r->per_dir_config, &proxy_fcgi_module); - if (rconf) { - if (rconf->need_dirwalk) { - ap_directory_walk(r); - } + if (rconf && rconf->need_dirwalk) { + char *saved_filename = r->filename; + r->filename = r->uri; + ap_directory_walk(r); + r->filename = saved_filename; } /* Strip proxy: prefixes */ -- Otherwise I get nonsensical things like: PATH_INFO="/localhost/index.cgi" PATH_TRANSLATED="/var/www/htdocs/localhost/index.cgi" So I think that mod_proxy_fcgi is mostly used with SetHandler at this point, or that each backend/app has its own workarounds to keep the pieces? It's then quite hard to change anything without breaking someone somewhere. I'm not a CGI expert, it would be nice at least to know what is actually expected for those env vars, and what (and how it) is actually worked around eventually. -- You are receiving this mail because: You are the assignee for the bug. --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
