https://issues.apache.org/bugzilla/show_bug.cgi?id=54616

--- Comment #7 from [email protected] ---
Password protected directories, index pages (if it should load .html firstly,
not the .php file) and some other things do not work correctly when
ProxyPassMatch is outside the Directory block. 

For example, the following works:
ProxyPassMatch ^/(.*\.php(/.*)?)$ 
fcgi://127.0.0.1:9000/var/www/html/mysite.com/public_htm/$1 
<Directory /var/www/html/mysite.com/public_html>
Options +Indexes +FollowSymLinks +Includes +MultiViews 
</Directory>

And the following does not work:
<Directory /var/www/html/mysite.com/public_html>
Options +Indexes +FollowSymLinks +Includes +MultiViews 
ProxyPassMatch ^/(.*\.php(/.*)?)$ 
fcgi://127.0.0.1:9000/var/www/html/mysite.com/public_htm/$1 
</Directory>

However, according to documentation
(http://httpd.apache.org/docs/2.4/mod/mod_proxy.html#proxypassmatch), it should
work there, however, it throws errors:
ProxyPassMatch cannot occur within <Directory> section

Another way (workaround) is to use rewrite rules, however, we use
https://issues.apache.org/bugzilla/show_bug.cgi?id=54101 and for some reason
RewriteRule acts differently in Directory block than outside it. If we provide:
RewriteRule ^/(.*\.php(/.*)?)$
fcgi://socket=\%2fusr\%2flocal\%2fsockets\%2fmysite.sock|DOCROOT|/$1
[P,E=HTTP_AUTHORIZATION:%{HTTP:Authorization},L]

Placed outside "Directory" it works correctly, path to the socket is
/usr/local/sockets/mysite.sock

If placed in "Directory" block it does not work, because it thinks that the
socket is placed here (that's the full path it converts to and it's incorrect,
of course):
fusrflocalfsocketsfmysite.sock

So, it's another bug of wrong RewriteRule behaviour.

-- 
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]

Reply via email to