httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Montague <>
Subject Re: [users@httpd] Apache 2.4.2/PHP-FPM via ProxyPass/htaccess-Problem
Date Thu, 23 Aug 2012 19:57:00 GMT
On August 23, 2012 12:18 , Konrad Neuwirth <> wrote:
> It appears, to me, that the proxy directive takes precedence over the access restrictions
placed into the directory, and I do not know how to reverse that ordering.
> The appropriate snipped of our httpd configuration is:
>   <Directory [USER PATH]/redaxo/include>
>       Require all denied
>    </Directory>
>   <LocationMatch ^(.*\.php)$>
>     ProxyPass fcgi://[USER PATH]
>   </LocationMatch>

No, <Location> and <LocationMatch> take precedence over <Directory>.  

One solution is to put the proxy configuration into the <Directory> 
section instead of the <LocationMatch> section.  However, says 
"This directive is not supported in <Directory> or <Files> sections".  
So you may want to try using mod_rewrite's RewriteRule directive with 
the [P] flag:

A better solution, in my opinion, is to not use .htaccess files at all:  
they have performance, security, and management downsides.  Put the 
access restrictions into the above <LocationMatch> block instead.
   Mark Montague

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message