httpd-bugs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 46492] New: ErrorDocument not working with mod_rewrite proxy settings
Date Thu, 08 Jan 2009 12:38:08 GMT
https://issues.apache.org/bugzilla/show_bug.cgi?id=46492

           Summary: ErrorDocument not working with mod_rewrite proxy
                    settings
           Product: Apache httpd-2
           Version: 2.2.11
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Core
        AssignedTo: bugs@httpd.apache.org
        ReportedBy: wollis@post.cz


ErrorDocument doesn't take effect when mod_rewrite proxy forwarding to other
server is used. Following settings of httpd.conf:

....
<IfModule mod_rewrite.c>
  RewriteLog logs/rewrite_log
  RewriteLogLevel 9
  RewriteEngine on


  RewriteRule /testErr/(.*)$ http://otherServer:7777/testErr/$1 [L,P,NC]

<Location /testErr >
ErrorDocument 400 myErr
ErrorDocument 401 myErr
ErrorDocument 402 myErr
ErrorDocument 403 myErr
ErrorDocument 404 myErr
ErrorDocument 406 myErr
ErrorDocument 407 myErr
ErrorDocument 506 myErr
</Location>

</IfModule>
....

When client requests http://apacheServer/testErr/errorservlet?err=404, apache
forwards this request to otherServer and application deployed on
http://otherServer:7777/testErr/ returns HTTP response with status code error
404, than original error response is returned to the client. Not error page
defined in  "ErrorDocument 404 myErr".

access.log:
127.0.0.1 - - [08/Jan/2009:13:14:35 +0100] "GET /testErr/errorservlet?err=404
HTTP/1.1" 404 327

rewrite_log:
127.0.0.1 - - [08/Jan/2009:13:14:35 +0100]
[localhost/sid#935150][rid#9d3898/initial] (2) init rewrite engine with
requested uri /testErr/errorservlet
127.0.0.1 - - [08/Jan/2009:13:14:35 +0100]
[localhost/sid#935150][rid#9d3898/initial] (3) applying pattern
'/testErr/(.*)$' to uri '/testErr/errorservlet'
127.0.0.1 - - [08/Jan/2009:13:14:35 +0100]
[localhost/sid#935150][rid#9d3898/initial] (2) rewrite '/testErr/errorservlet'
-> 'http://otherServer:7777/testErr/errorservlet'
127.0.0.1 - - [08/Jan/2009:13:14:35 +0100]
[localhost/sid#935150][rid#9d3898/initial] (2) forcing proxy-throughput with
http://sucz0007:7777/testErr/errorservlet
127.0.0.1 - - [08/Jan/2009:13:14:35 +0100]
[localhost/sid#935150][rid#9d3898/initial] (1) go-ahead with proxy request
proxy:http://otherServer:7777/testErr/errorservlet [OK]

Also reproducable on 2.0.63 on WinXP.


-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- 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


Mime
View raw message