You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by k5...@postpro.net on 2012/06/12 21:54:23 UTC
[users@httpd] Re: enabling httpd v2.4's mod_proxy_fcgi + "ProxyPassMatch" breaks
'Index' display ?
Per chat in #irc, trying to narrow down on regex/wildcard problems, I'm
seeing confusing behavior -- note the cases (3) & (4), below, _switch_
what works & what doesn't.
THere are more iterations to try, but it seems to be an issue with
wildcard usage in the Match -- of some sort.
(1)
ProxyPassMatch ^/test/info\.php
fcgi://127.0.0.1:9000/srv/www/testhost/$1
OK exec http://myhost.com/test/info.php
OK index http://myhost.com/test/
(2)
ProxyPassMatch ^/test/.nfo\.php
fcgi://127.0.0.1:9000/srv/www/testhost/$1
OK exec http://myhost.com/test/info.php
OK index http://myhost.com/test/
(3)
ProxyPassMatch ^/test/.*fo\.php
fcgi://127.0.0.1:9000/srv/www/testhost/$1
FAIL exec http://myhost.com/test/info.php
--------------------------------------------------------------
<!--#set var="TITLE" value="Object not found!"
--><!--#include virtual="include/top.html" -->
The requested URL was not found on this server.
<!--#if expr="-n v('HTTP_REFERER')" -->
The link on the
<a href="<!--#echo encoding="url" var="HTTP_REFERER"
-->">referring
page</a> seems to be wrong or outdated. Please
inform the author of
<a href="<!--#echo encoding="url" var="HTTP_REFERER"
-->">that page</a>
about the error.
<!--#else -->
If you entered the URL manually please check your
spelling and try again.
<!--#endif -->
<!--#include virtual="include/bottom.html" -->
--------------------------------------------------------------
OK index http://myhost.com/test/
(4)
ProxyPassMatch ^/test/(.*\.php(/.*)?)$
fcgi://127.0.0.1:9000/srv/www/testhost/$1
OK exec http://myhost.com/test/info.php
FAIL index http://myhost.com/test/
---------------------------------------------------------------
... same "Object not found!" as in Case (3), above
---------------------------------------------------------------
Kat
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
[users@httpd] Re: enabling httpd v2.4's mod_proxy_fcgi + "ProxyPassMatch" breaks
'Index' display ?
Posted by k5...@postpro.net.
With this,
RewriteCond %{REQUEST_URI} !index\.php$
RewriteCond %{REQUEST_URI} \.php
RewriteRule ^/test(/.*)$ fcgi://127.0.0.1:9000/srv/www/text/$1 [P]
I see both the directory index @ http://myhost.com/, and all
http://myhost.com/...php... exec correctly. Everything !php bypasses
the proxy.
It's not pretty, but it works. Never managed to get ProxyPassMatch to
behave.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
[users@httpd] Re: enabling httpd v2.4's mod_proxy_fcgi + "ProxyPassMatch" breaks
'Index' display ?
Posted by k5...@postpro.net.
can't convince myself of anything with ProxyPassMatch, and can't figure
out how to adequately log.
switching to rewrite.
my vhost config now contains,
DirectoryIndex index.html
#ProxyErrorOverride on
RewriteEngine On
LogLevel info rewrite:trace5
#ProxyPassMatch ^/test/(.*\.php(/.*)?)$
fcgi://127.0.0.1:9000/srv/www/test/$1
RewriteRule ^/test(/.+\.(php)$)
fcgi://127.0.0.1:9000/srv/www/test/$1 [P]
@
http://myhost.com/test/
instead of a dir listing of the dir in browser, I get
The requested URL was not found on this server. The link on the
">referring page seems to be wrong or outdated.
Please inform the author of ">that page about the error. If you
entered the URL manually please check your spelling
and try again.
and (trimmed) error log contains,
==> /var/log/apache2/testhost.error_log <==
... [rewrite:trace2] .../initial] init rewrite engine with
requested uri /test/
... [rewrite:trace3] .../initial] applying pattern
'^/test(/.+\\.(php)$)' to uri '/test/'
... [rewrite:trace1] .../initial] pass through /test/
... [rewrite:trace2] .../subreq] init rewrite engine with
requested uri /test/index.php
... [rewrite:trace3] .../subreq] applying pattern
'^/test(/.+\\.(php)$)' to uri '/test/index.php'
... [rewrite:trace2] .../subreq] rewrite '/test/index.php' ->
'fcgi://127.0.0.1:9000/srv/www/test//index.php'
... [rewrite:trace2] .../subreq] forcing proxy-throughput with
fcgi://127.0.0.1:9000/srv/www/test//index.php
... [rewrite:trace1] .../subreq] go-ahead with proxy request
proxy:fcgi://127.0.0.1:9000/srv/www/test//index.php [OK]
... [proxy_fcgi:error] ... AH01071: Got error 'Primary script
unknown\n'
... [rewrite:trace2] .../initial/redir#1] init rewrite engine
with requested uri /error/HTTP_NOT_FOUND.html.var
... [rewrite:trace3] .../initial/redir#1] applying pattern
'^/test(/.+\\.(php)$)' to uri '/error/HTTP_NOT_FOUND.html.var'
... [rewrite:trace1] .../initial/redir#1] pass through
/error/HTTP_NOT_FOUND.html.var
it appears that the rewrite, if not the ProxyPassMatch as well, adds the
'index.php' even if it's not requested/matched. and, as it doesn't
exist, fails.
otoh, with same config and,
cat test.php
xxxxx
@
http://myhost.com/test/test.php
in browser,
xxxxx
is displayed correctly, and (trimmed) error log contains,
==> /var/log/apache2/testhost.error_log <==
... [rewrite:trace2] .../initial] init rewrite engine with requested uri
/test/test.php
... [rewrite:trace3] .../initial] applying pattern
'^/test(/.+\\.(php)$)' to uri '/test/test.php'
... [rewrite:trace2] .../initial] rewrite '/test/test.php' ->
'fcgi://127.0.0.1:9000/srv/www/test//test.php'
... [rewrite:trace2] .../initial] forcing proxy-throughput with
fcgi://127.0.0.1:9000/srv/www/test//test.php
... [rewrite:trace1] .../initial] go-ahead with proxy request
proxy:fcgi://127.0.0.1:9000/srv/www/test//test.php [OK]
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org