You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Jonathan Rosenberg <sh...@gmail.com> on 2011/12/05 21:42:16 UTC

Apache HTTPD <-> Tomcat, Passing Errors

I am using Tomcat 7.0.22, Java 1.6 on a Linux box.  Front-end is
Apache/2.2.17 connected using proxypass with ajp.

I'd like page-request errors on the Tomcat side to be to be passed
back to httpd for handling.  right now, Tomcat formats the error page
& passes that back.

I've spent some time digging through docs, etc & can;t find an answer.

Any help appreciated.

--
Jonathan Rosenberg
Founder & Executive Director
Tabby's Place, a Cat Sanctuary
http://www.tabbysplace.org/

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


RE: Apache HTTPD <-> Tomcat, Passing Errors

Posted by Thom Hehl <Th...@pointsix.com>.
How about a re-direct to a page that Apache will handle. You could
re-direct to http://blah.com/invalid.page or some such or even a valid
page.

-----Original Message-----
From: Jonathan Rosenberg [mailto:shmoldie@gmail.com] 
Sent: Monday, December 05, 2011 3:42 PM
To: Tomcat Users List
Subject: Apache HTTPD <-> Tomcat, Passing Errors

I am using Tomcat 7.0.22, Java 1.6 on a Linux box.  Front-end is
Apache/2.2.17 connected using proxypass with ajp.

I'd like page-request errors on the Tomcat side to be to be passed
back to httpd for handling.  right now, Tomcat formats the error page
& passes that back.

I've spent some time digging through docs, etc & can;t find an answer.

Any help appreciated.

--
Jonathan Rosenberg
Founder & Executive Director
Tabby's Place, a Cat Sanctuary
http://www.tabbysplace.org/

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


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


Re: Apache HTTPD <-> Tomcat, Passing Errors

Posted by André Warnier <aw...@ice-sa.com>.
Jonathan Rosenberg wrote:
> Thanks for the additional info.
> 
> I fell asleep at the wheel re: top posting & hit reply (instead of
> reply to all) by accident.
> 
Well, maybe don't do that either (reply to all).
Just reply to the list.
The people on the list are.. on the list. So any message posted to the list already 
reaches them.  If in addition you send y copy to the original poster, they get a second 
copy of the same message, which is somewhat annoying.

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


Re: Apache HTTPD <-> Tomcat, Passing Errors

Posted by Jonathan Rosenberg <sh...@gmail.com>.
Thanks for the additional info.

I fell asleep at the wheel re: top posting & hit reply (instead of
reply to all) by accident.

Repetently yours,

--
Jonathan Rosenberg
Founder & Executive Director
Tabby's Place, a Cat Sanctuary
http://www.tabbysplace.org/


On Mon, Dec 5, 2011 at 4:18 PM, Mark Montague <ma...@catseye.org> wrote:
> On December 5, 2011 16:04 , Jonathan Rosenberg <sh...@gmail.com> wrote:
>
>> On Mon, Dec 5, 2011 at 3:51 PM, Mark Montague<ma...@catseye.org>  wrote:
>>>
>>> On December 5, 2011 15:42 , Jonathan Rosenberg<sh...@gmail.com>
>>>  wrote:
>>>>
>>>> I'd like page-request errors on the Tomcat side to be to be passed
>>>> back to httpd for handling.  right now, Tomcat formats the error page
>>>> &    passes that back.
>>>
>>> Unfortunately, while ProxyErrorOverride has been available for HTTP
>>> reverse-proxies, it was just added for AJP reverse-proxies in Apache HTTP
>>> Server 2.3.12.  The feature will hopefully be backported into the next
>>> release of the 2.2 branch, though, so check again when 2.2.22 is
>>> released.
>>>  For more information, see
>>> https://issues.apache.org/bugzilla/show_bug.cgi?id=50945
>
>
>> Thanks for the info.  Is there any kind of simple, if ugly, workaround
>> available?
>
>
> Please don't top-post; it destroys the natural flow of reading.  Also, don't
> reply to people privately off-list, since it deprives other people who may
> be interested of subsequent information, and also prevents other people who
> might have additional information or better suggestions from offering them
> to you.
>
> Workarounds include:
>
> - Use HTTP instead of AJP between Apache HTTP Server and Tomcat.  You can
> then use the ProxyErrorOverride directive.  Or,
>
> - Apply the last patch at the Bugzilla link above to Apache HTTP Server
> 2.2.x source code and compile it.  This will add support for
> ProxyErrorOverride for the AJP protocol.  Or,
>
> - Upgrade to Apache HTTP Server 2.3.12 or later.  Or,
>
> - Live with the Tomcat-generated error pages for now, and wait to see if
> ProxyErrorOverride support for AJP is in Apache HTTP Server 2.2.22 when it
> gets released.  You can subscribe to the CC list for the bug to follow it,
> and possibly even vote on the bug.
>
> --
>  Mark Montague
>  mark@catseye.org
>

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


Re: Apache HTTPD <-> Tomcat, Passing Errors

Posted by Mark Montague <ma...@catseye.org>.
On December 5, 2011 16:04 , Jonathan Rosenberg <sh...@gmail.com> wrote:

> On Mon, Dec 5, 2011 at 3:51 PM, Mark Montague<ma...@catseye.org>  wrote:
>> On December 5, 2011 15:42 , Jonathan Rosenberg<sh...@gmail.com>  wrote:
>>> I'd like page-request errors on the Tomcat side to be to be passed
>>> back to httpd for handling.  right now, Tomcat formats the error page
>>> &    passes that back.
>> Unfortunately, while ProxyErrorOverride has been available for HTTP
>> reverse-proxies, it was just added for AJP reverse-proxies in Apache HTTP
>> Server 2.3.12.  The feature will hopefully be backported into the next
>> release of the 2.2 branch, though, so check again when 2.2.22 is released.
>>   For more information, see
>> https://issues.apache.org/bugzilla/show_bug.cgi?id=50945

> Thanks for the info.  Is there any kind of simple, if ugly, workaround
> available?

Please don't top-post; it destroys the natural flow of reading.  Also, 
don't reply to people privately off-list, since it deprives other people 
who may be interested of subsequent information, and also prevents other 
people who might have additional information or better suggestions from 
offering them to you.

Workarounds include:

- Use HTTP instead of AJP between Apache HTTP Server and Tomcat.  You 
can then use the ProxyErrorOverride directive.  Or,

- Apply the last patch at the Bugzilla link above to Apache HTTP Server 
2.2.x source code and compile it.  This will add support for 
ProxyErrorOverride for the AJP protocol.  Or,

- Upgrade to Apache HTTP Server 2.3.12 or later.  Or,

- Live with the Tomcat-generated error pages for now, and wait to see if 
ProxyErrorOverride support for AJP is in Apache HTTP Server 2.2.22 when 
it gets released.  You can subscribe to the CC list for the bug to 
follow it, and possibly even vote on the bug.

--
   Mark Montague
   mark@catseye.org


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


Re: Apache HTTPD <-> Tomcat, Passing Errors

Posted by Mark Montague <ma...@catseye.org>.
On December 5, 2011 15:42 , Jonathan Rosenberg <sh...@gmail.com> wrote:
> I am using Tomcat 7.0.22, Java 1.6 on a Linux box.  Front-end is
> Apache/2.2.17 connected using proxypass with ajp.
>
> I'd like page-request errors on the Tomcat side to be to be passed
> back to httpd for handling.  right now, Tomcat formats the error page
> &  passes that back.

This is controlled via the ProxyErrorOverride directive for Apache HTTP 
Server.  See 
https://httpd.apache.org/docs/2.2/mod/mod_proxy.html#proxyerroroverride

Unfortunately, while ProxyErrorOverride has been available for HTTP 
reverse-proxies, it was just added for AJP reverse-proxies in Apache 
HTTP Server 2.3.12.  The feature will hopefully be backported into the 
next release of the 2.2 branch, though, so check again when 2.2.22 is 
released.  For more information, see 
https://issues.apache.org/bugzilla/show_bug.cgi?id=50945

--
   Mark Montague
   mark@catseye.org


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