You are viewing a plain text version of this content. The canonical link for it is here.
Posted to bugs@httpd.apache.org by bu...@apache.org on 2015/02/18 10:20:34 UTC

[Bug 57590] New: loading mod_proxy_http makes rewriteRule's [proxy] assume http:// URI

https://bz.apache.org/bugzilla/show_bug.cgi?id=57590

            Bug ID: 57590
           Summary: loading mod_proxy_http makes rewriteRule's [proxy]
                    assume http:// URI
           Product: Apache httpd-2
           Version: 2.4.10
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P5
         Component: mod_rewrite
          Assignee: bugs@httpd.apache.org
          Reporter: i.galic@brainsware.org

in our setup, we use mod_proxy_fcgi to talk to the php backend (fpm).
for reasons of efficiency, we do not proxy all requests to fpm, only
the ones that are either php, or not satisfiable by anything else.

this is the common scenario in which one would use FallbackResource
however, FallbackResource (as of 2.4.10) cannot be used with a proxy resource.
instead, we use mod_rewrite:

  RewriteEngine On

  RewriteRule ^/.*\.php(/.*)?$
unix:///srv/web/acme.com/logs/socket|fcgi://127.0.0.1%{DOCUMENT_ROOT}$0 [P]

  RewriteCond %{DOCUMENT_ROOT}%{REQUEST_FILENAME} !-f
  RewriteCond %{DOCUMENT_ROOT}%{REQUEST_FILENAME} !-d
  RewriteRule ^
unix:///srv/web/acme.com/logs/socket|fcgi://127.0.0.1%{DOCUMENT_ROOT}/index.php$0
[P]


and it works perfectly fine. so long as we do *not* load mod_proxy_http into
the same httpd daemon. if we do, the above proxy urls will suddenly be assumed
as http://. this seems… bad. and wrong.

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


[Bug 57590] loading mod_proxy_http makes rewriteRule's [proxy] assume http:// URI

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=57590

Rich Bowen <rb...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |WONTFIX

--- Comment #2 from Rich Bowen <rb...@apache.org> ---
Thank you for your report. As part of an effort to clean up our issue tracker,
we are closing tickets that have seen no activity for more than 5 years. If
this issue is still relevant to a current version of Apache httpd (2.4.x or
trunk), please reopen this ticket or open a new one with updated information.
We appreciate your contribution to the project.

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


[Bug 57590] loading mod_proxy_http makes rewriteRule's [proxy] assume http:// URI

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=57590

Jaak Ristioja <ja...@ristioja.ee> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jaak+bz.apache.org@ristioja
                   |                            |.ee
            Version|2.4.10                      |2.4.38

--- Comment #1 from Jaak Ristioja <ja...@ristioja.ee> ---
Still seems to occur with 2.4.38, e.g. for both

  RewriteRule ^/redirect$ unix:/path/to/socket|fcgi://localhost/redirect.php
[proxy]
  RewriteRule ^/redirect2$
proxy:unix:/path/to/socket|fcgi://localhost/redirect.php [proxy]

These fail with 404 Not Found if mod_proxy_http.so is enabled, e.g.:

  The requested URL /unix:path/to/socket|fcgi://localhost/redirect.php was not
found on this server.
  The requested URL /proxy:unix:path/to/socket|fcgi://localhost/redirect.php
was not found on this server.

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org