You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Toomas Aas <to...@raad.tartu.ee> on 2014/03/19 06:06:48 UTC

[users@httpd] ProxyPassMatch vs FilesMatch

Hello!

I'm setting up a site with Apache 2.4.6 and PHP 5.5.9, using PHP-FPM  
via mod_proxy_fcgi.

In my configuration I have this:

ProxyPassMatch ^/(.*\.php)$ fcgi://127.0.0.1:9000/storage/www/sites/mysite/$1

This seems to work just fine.

The purpose of this site is to authenticate users with client  
certificates using some PHP processing, so in another point of my  
configuration I have this:

SSLOptions +StdEnvVars

This also works as expected - various _SERVER[SSL_*] variables are  
made available and can be used in PHP.

However...

when I enclose the SSLOptions directive in FilesMatch block like this:
<FilesMatch "\.php$">
     SSLOptions +StdEnvVars
</FilesMatch>

... then the SSLOptions directive is not in effect - variables are not  
available in PHP.

This worked in older server with Apache 2.2, where mod_php was used  
instead of PHP-FPM.

It seems that when both ProxyPassMatch and FilesMatch are present then  
ProxyPassMatch somehow "wins" and FilesMatch is not regarded. Is this  
expected behaviour and is there any way to achieve what I'm trying to  
do - change SSLOptions only for requests for .php files, not all files?

Disclaimer: I did see that 2.4.9 was just released, but looks like  
FreeBSD port is not available yet.

Regards,
-- 
Toomas Aas



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org