Bug 54887

Summary: htaccess directives not working with mod_proxy_fcgi
Product: Apache httpd-2 Reporter: admin
Component: mod_proxy_fcgiAssignee: Apache HTTPD Bugs Mailing List <bugs>
Status: RESOLVED INVALID    
Severity: normal    
Priority: P2    
Version: 2.5-HEAD   
Target Milestone: ---   
Hardware: PC   
OS: FreeBSD   

Description admin 2013-04-24 14:54:16 UTC
While using mod_proxy_fcgi like:

RewriteRule ^/(.*\.(php|php3|php4|php5|phps|phtml|inc)(/.*)?)$ fcgi://172.16.0.11:1007/DOCROOT/$1 [P]

directives in .htaccess like
-deny from xxx
<Files file.php>
deny fromxxx
</Files>

etc. would not work - file will be processed by backend and returned to browser without further .htaccess check.

We should be able to run "auth phase 'check access (with Satisfy All)'" with mod_proxy_fcgi like with mod_fcgid.
Comment 1 Eric Covener 2013-04-24 15:04:07 UTC
What Directories would be searched for htaccess in this case if the URL isn't mapped to the filesystem?
Comment 2 admin 2013-04-24 15:05:48 UTC
I belive /DOCROOT/ ?
Is it at all possible to proceed with other (htaccess) rules after backend returned result?
Comment 3 admin 2013-04-24 20:24:15 UTC
Maybe it's possible to run VH Rewrite to proxy after all the .htaccess rewrites are done?
Comment 4 phpfpm1 2014-01-10 15:22:53 UTC
Have you tried putting RewriteRule to <Directory> context?
Comment 5 Eric Covener 2014-01-10 15:39:29 UTC
Proxied content doesn't match filesystem containers <files> or <Directory>, this is working as designed.

Workaround in comment #4 might help, as it causes files to be mapped to the filesystem first then proxied in a later phase on a new internal redirect.
Comment 6 admin 2014-01-29 22:11:03 UTC
Unfortunatelly workaround from comment #4 is not working. There is no internal redirect back to proxy (wrapped in <Directory>) from .htaccess.
Comment 7 Eric Covener 2014-01-29 22:15:59 UTC
This is invalid as a bug, the configuration does not map anythin to disk. For configuration advice or support, try users@httpd.apache.org or serverfault.  We can only entertain bugs against httpd here.