You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Velmurugan Dhakshnamoorthy <dv...@gmail.com> on 2017/04/13 01:03:19 UTC

Re: [users@httpd] Reg: Custom error message at Apache 2.4.25

Thanks Luca,  I tried setting proxyerroroverride and error document  in
virtual host, however,  the 500 error produced by content server is
displayed as it is via Apache proxy. Any further help?

Any specific place to set these parameters,  I also hope I don't need to
use .htacess.

Regards,
Vel

On Mar 15, 2017 16:41, "Luca Toscano" <to...@gmail.com> wrote:

Hi!

2017-03-15 4:00 GMT+01:00 Velmurugan Dhakshnamoorthy <dv...@gmail.com>:

> Hi Everyone,
>
> I have installed Apache 2.4.25 HTTP server as a reverse proxy server and
> my back-end content server is Weblogic 12c(12.1.3).
>
> The error message(500,50*.. ) produced from content server  Weblogic 12c
> to be displayed with custom error message through Apache 2.4.25. I tired
> few options based on available tips and docs from Apache website,  but
> unable to display custom message. Please help me with the exact steps/setup
> required to achieve this.
>
> My OS is RHEL 7.2, your help and support on this matter is highly
> appreciated.
>

If I got your request correctly, you'd need to enable
https://httpd.apache.org/docs/2.4/mod/mod_proxy.html#proxyerroroverride and
the related ErrorDocuments.

Hope that helps!

Luca

Re: [users@httpd] Reg: Custom error message at Apache 2.4.25

Posted by Mike Rumph <mi...@oracle.com>.

On 4/20/2017 4:58 AM, Velmurugan Dhakshnamoorthy wrote:
> Thanks Luca for pointing out,  the weblogic module is needed to 
> forward request from Apache to weblogic successfully. Is there any 
> other way to achieve my requirement?
>
> Regards,
> Vel
>
> On Apr 20, 2017 17:20, "Luca Toscano" <toscano.luca@gmail.com 
> <ma...@gmail.com>> wrote:
>
>     Hi!
>
>     I checked your httpd config and you are using mod_weblogic, not
>     mod_proxy, so the ProxyErrorOverride option will not be effective :)
>
>     Luca
>
>     2017-04-20 3:18 GMT+02:00 Velmurugan Dhakshnamoorthy
>     <dvel.hex@gmail.com <ma...@gmail.com>>:
>
>         Hi,
>         Any help  to identify and correct  what is the issue in my
>         setting to re-write  the 500 error by Apache Proxy 2.4.25
>
>         Regards,
>         Vel
>
Hello Vel,

You can try using the ErrorPage directive from mod_weblogic.
- 
http://docs.oracle.com/middleware/12212/webtier/develop-plugin/plugin_params.htm#PLGWL4380 


Mike

Re: Re: [users@httpd] Reg: Custom error message at Apache 2.4.25

Posted by Velmurugan Dhakshnamoorthy <dv...@gmail.com>.
Thanks Luca for pointing out,  the weblogic module is needed to forward
request from Apache to weblogic successfully. Is there any other way to
achieve my requirement?

Regards,
Vel

On Apr 20, 2017 17:20, "Luca Toscano" <to...@gmail.com> wrote:

> Hi!
>
> I checked your httpd config and you are using mod_weblogic, not mod_proxy,
> so the ProxyErrorOverride option will not be effective :)
>
> Luca
>
> 2017-04-20 3:18 GMT+02:00 Velmurugan Dhakshnamoorthy <dv...@gmail.com>:
>
>> Hi,
>> Any help  to identify and correct  what is the issue in my setting to
>> re-write  the 500 error by Apache Proxy 2.4.25
>>
>> Regards,
>> Vel
>> ---------- Forwarded message ----------
>> From: "Velmurugan Dhakshnamoorthy" <dv...@gmail.com>
>> Date: Apr 18, 2017 16:03
>> Subject: Re: [users@httpd] Reg: Custom error message at Apache 2.4.25
>> To: <us...@httpd.apache.org>
>> Cc:
>>
>> Hi Luca,
>>> Is it possible to pinpoint what is the wrong in my setting. I am still
>>> unable to display the custom error message.
>>>
>>> *The actual message from weblogic 12c in browser*
>>>
>>> Error 500--Internal Server Error
>>> From RFC 2068 Hypertext Transfer Protocol -- HTTP/1.1:
>>> 10.5.1 500 Internal Server Error
>>> The server encountered an unexpected condition which prevented it from
>>> fulfilling the request.
>>>
>>> *Apache Proxy 2.4.25 setting in httpd.conf*
>>>
>>> *Configuration to forward request from Apache to Weblogic 12c*
>>> <VirtualHost *:8060>
>>>    <Location />
>>>        SetHandler weblogic-handler
>>>        WebLogicHost hawley760
>>>       WebLogicPort 8062
>>>        Debug ON
>>>        WLLogFile /opt/app/bea/apache2.4/httpd-2.4.25/logs/RPS-8060.log
>>>   </Location>
>>> </VirtualHost>
>>>
>>> *config related to error document in httpd.conf*
>>>
>>> DocumentRoot "/opt/app/bea/apache2.4/httpd-2.4.25/htdocs"
>>> ProxyPreserveHost On
>>> ProxyPass /error !
>>> ProxyErrorOverride On
>>> Alias /error /opt/app/bea/apache2.4/httpd-2.4.25/htdocs
>>> ErrorDocument 500 /error/500.html
>>>
>>> I tried to setup this in virtual host as well, but cannot re-write the
>>> default 500 error message. I am also attaching my httpd.conf file.
>>>
>>> Appreciate if you can tell me what I am doing wrong, it would be much
>>> appreciated.
>>>
>>> Regards,
>>> Vel
>>>
>>>
>>>
>>>
>>>
>>>
>>> Regards,
>>> Velmurugan Dhakshnamoorthy (Vel)
>>> Singapore.
>>>
>>> On Tue, Apr 18, 2017 at 6:56 AM, Velmurugan Dhakshnamoorthy <
>>> dvel.hex@gmail.com> wrote:
>>>
>>>> Thanks again for your valuable inputs,  I am actually restricting
>>>> number of HTTP sessions at weblogic layer,  beyond the specified limit,
>>>>  weblogic throws 500 error message,  which is not very useful to users,  I
>>>> want only the 500 error page to be re-written by Apache proxy with simple
>>>> message (ex: server is busy,  login after sometime), I want only 500
>>>> generic error message to re-write,  I don't want to re-write any other
>>>> content from back-end server.
>>>>
>>>> Regards,
>>>> Vel
>>>>
>>>> On Apr 18, 2017 00:19, "Luca Toscano" <to...@gmail.com> wrote:
>>>>
>>>>> Hi!
>>>>>
>>>>> As Nick mentioned there are a couple of options:
>>>>>
>>>>> 1) https://httpd.apache.org/docs/2.4/mod/mod_substitute.html or
>>>>> https://httpd.apache.org/docs/current/mod/mod_proxy_html.html in case
>>>>> you want to replace some parts of the response coming from the backend with
>>>>> your content.
>>>>>
>>>>> 2) Write your own content output filter to modify the backend response
>>>>> as you wish before flushing it out to the client. I'd suggest to follow
>>>>> https://httpd.apache.org/docs/2.4/mod/mod_lua.html#modifying_buckets
>>>>> if you want to attempt this road since using Lua instead of C is generally
>>>>> easier for people not used to write Apache code.
>>>>>
>>>>> My personal suggestion is to not use any of the above but to re-think
>>>>> about why you want to force the proxy to do this work. A proxy should be as
>>>>> lightweight as possible and ideally should mask backend failures with
>>>>> pre-defined error pages.
>>>>>
>>>>> Hope that helps!
>>>>>
>>>>> Luca
>>>>>
>>>>> 2017-04-17 9:57 GMT+02:00 Velmurugan Dhakshnamoorthy <
>>>>> dvel.hex@gmail.com>:
>>>>>
>>>>>> Hi Nick,
>>>>>> yes exactly,  I want the error message produced by back-end weblogic
>>>>>> server to be re-written by Apache proxy and then display custom message to
>>>>>> user.
>>>>>>
>>>>>> Regards,
>>>>>> Vel
>>>>>>
>>>>>>
>>>>>> On Apr 17, 2017 15:34, "Nick Kew" <ni...@apache.org> wrote:
>>>>>>
>>>>>> On Mon, 2017-04-17 at 09:04 +0800, Velmurugan Dhakshnamoorthy wrote:
>>>>>>
>>>>>> >
>>>>>> >         Thanks Luca,  I tried setting proxyerroroverride and error
>>>>>> >         document  in virtual host, however,  the 500 error produced
>>>>>> by
>>>>>> >         content server is displayed as it is via Apache proxy. Any
>>>>>> >         further help?
>>>>>>
>>>>>> Are you saying you want an error message coming from the backend
>>>>>> but modified by the proxy?  That would imply using a content filter
>>>>>> (such as mod_proxy_html, mod_sed, or mod_substitute) to rewrite
>>>>>> the response from the backend.
>>>>>>
>>>>>> --
>>>>>> Nick Kew
>>>>>>
>>>>>>
>>>>>>
>>>>>> ---------------------------------------------------------------------
>>>>>> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>>>>>> For additional commands, e-mail: users-help@httpd.apache.org
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>> For additional commands, e-mail: users-help@httpd.apache.org
>>
>
>

Re: Re: [users@httpd] Reg: Custom error message at Apache 2.4.25

Posted by Luca Toscano <to...@gmail.com>.
Hi!

I checked your httpd config and you are using mod_weblogic, not mod_proxy,
so the ProxyErrorOverride option will not be effective :)

Luca

2017-04-20 3:18 GMT+02:00 Velmurugan Dhakshnamoorthy <dv...@gmail.com>:

> Hi,
> Any help  to identify and correct  what is the issue in my setting to
> re-write  the 500 error by Apache Proxy 2.4.25
>
> Regards,
> Vel
> ---------- Forwarded message ----------
> From: "Velmurugan Dhakshnamoorthy" <dv...@gmail.com>
> Date: Apr 18, 2017 16:03
> Subject: Re: [users@httpd] Reg: Custom error message at Apache 2.4.25
> To: <us...@httpd.apache.org>
> Cc:
>
> Hi Luca,
>> Is it possible to pinpoint what is the wrong in my setting. I am still
>> unable to display the custom error message.
>>
>> *The actual message from weblogic 12c in browser*
>>
>> Error 500--Internal Server Error
>> From RFC 2068 Hypertext Transfer Protocol -- HTTP/1.1:
>> 10.5.1 500 Internal Server Error
>> The server encountered an unexpected condition which prevented it from
>> fulfilling the request.
>>
>> *Apache Proxy 2.4.25 setting in httpd.conf*
>>
>> *Configuration to forward request from Apache to Weblogic 12c*
>> <VirtualHost *:8060>
>>    <Location />
>>        SetHandler weblogic-handler
>>        WebLogicHost hawley760
>>       WebLogicPort 8062
>>        Debug ON
>>        WLLogFile /opt/app/bea/apache2.4/httpd-2.4.25/logs/RPS-8060.log
>>   </Location>
>> </VirtualHost>
>>
>> *config related to error document in httpd.conf*
>>
>> DocumentRoot "/opt/app/bea/apache2.4/httpd-2.4.25/htdocs"
>> ProxyPreserveHost On
>> ProxyPass /error !
>> ProxyErrorOverride On
>> Alias /error /opt/app/bea/apache2.4/httpd-2.4.25/htdocs
>> ErrorDocument 500 /error/500.html
>>
>> I tried to setup this in virtual host as well, but cannot re-write the
>> default 500 error message. I am also attaching my httpd.conf file.
>>
>> Appreciate if you can tell me what I am doing wrong, it would be much
>> appreciated.
>>
>> Regards,
>> Vel
>>
>>
>>
>>
>>
>>
>> Regards,
>> Velmurugan Dhakshnamoorthy (Vel)
>> Singapore.
>>
>> On Tue, Apr 18, 2017 at 6:56 AM, Velmurugan Dhakshnamoorthy <
>> dvel.hex@gmail.com> wrote:
>>
>>> Thanks again for your valuable inputs,  I am actually restricting number
>>> of HTTP sessions at weblogic layer,  beyond the specified limit,  weblogic
>>> throws 500 error message,  which is not very useful to users,  I want only
>>> the 500 error page to be re-written by Apache proxy with simple message
>>> (ex: server is busy,  login after sometime), I want only 500 generic error
>>> message to re-write,  I don't want to re-write any other content from
>>> back-end server.
>>>
>>> Regards,
>>> Vel
>>>
>>> On Apr 18, 2017 00:19, "Luca Toscano" <to...@gmail.com> wrote:
>>>
>>>> Hi!
>>>>
>>>> As Nick mentioned there are a couple of options:
>>>>
>>>> 1) https://httpd.apache.org/docs/2.4/mod/mod_substitute.html or
>>>> https://httpd.apache.org/docs/current/mod/mod_proxy_html.html in case
>>>> you want to replace some parts of the response coming from the backend with
>>>> your content.
>>>>
>>>> 2) Write your own content output filter to modify the backend response
>>>> as you wish before flushing it out to the client. I'd suggest to follow
>>>> https://httpd.apache.org/docs/2.4/mod/mod_lua.html#modifying_buckets
>>>> if you want to attempt this road since using Lua instead of C is generally
>>>> easier for people not used to write Apache code.
>>>>
>>>> My personal suggestion is to not use any of the above but to re-think
>>>> about why you want to force the proxy to do this work. A proxy should be as
>>>> lightweight as possible and ideally should mask backend failures with
>>>> pre-defined error pages.
>>>>
>>>> Hope that helps!
>>>>
>>>> Luca
>>>>
>>>> 2017-04-17 9:57 GMT+02:00 Velmurugan Dhakshnamoorthy <
>>>> dvel.hex@gmail.com>:
>>>>
>>>>> Hi Nick,
>>>>> yes exactly,  I want the error message produced by back-end weblogic
>>>>> server to be re-written by Apache proxy and then display custom message to
>>>>> user.
>>>>>
>>>>> Regards,
>>>>> Vel
>>>>>
>>>>>
>>>>> On Apr 17, 2017 15:34, "Nick Kew" <ni...@apache.org> wrote:
>>>>>
>>>>> On Mon, 2017-04-17 at 09:04 +0800, Velmurugan Dhakshnamoorthy wrote:
>>>>>
>>>>> >
>>>>> >         Thanks Luca,  I tried setting proxyerroroverride and error
>>>>> >         document  in virtual host, however,  the 500 error produced
>>>>> by
>>>>> >         content server is displayed as it is via Apache proxy. Any
>>>>> >         further help?
>>>>>
>>>>> Are you saying you want an error message coming from the backend
>>>>> but modified by the proxy?  That would imply using a content filter
>>>>> (such as mod_proxy_html, mod_sed, or mod_substitute) to rewrite
>>>>> the response from the backend.
>>>>>
>>>>> --
>>>>> Nick Kew
>>>>>
>>>>>
>>>>>
>>>>> ---------------------------------------------------------------------
>>>>> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>>>>> For additional commands, e-mail: users-help@httpd.apache.org
>>>>>
>>>>>
>>>>>
>>>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>

Fwd: Re: [users@httpd] Reg: Custom error message at Apache 2.4.25

Posted by Velmurugan Dhakshnamoorthy <dv...@gmail.com>.
Hi,
Any help  to identify and correct  what is the issue in my setting to
re-write  the 500 error by Apache Proxy 2.4.25

Regards,
Vel
---------- Forwarded message ----------
From: "Velmurugan Dhakshnamoorthy" <dv...@gmail.com>
Date: Apr 18, 2017 16:03
Subject: Re: [users@httpd] Reg: Custom error message at Apache 2.4.25
To: <us...@httpd.apache.org>
Cc:

Hi Luca,
> Is it possible to pinpoint what is the wrong in my setting. I am still
> unable to display the custom error message.
>
> *The actual message from weblogic 12c in browser*
>
> Error 500--Internal Server Error
> From RFC 2068 Hypertext Transfer Protocol -- HTTP/1.1:
> 10.5.1 500 Internal Server Error
> The server encountered an unexpected condition which prevented it from
> fulfilling the request.
>
> *Apache Proxy 2.4.25 setting in httpd.conf*
>
> *Configuration to forward request from Apache to Weblogic 12c*
> <VirtualHost *:8060>
>    <Location />
>        SetHandler weblogic-handler
>        WebLogicHost hawley760
>       WebLogicPort 8062
>        Debug ON
>        WLLogFile /opt/app/bea/apache2.4/httpd-2.4.25/logs/RPS-8060.log
>   </Location>
> </VirtualHost>
>
> *config related to error document in httpd.conf*
>
> DocumentRoot "/opt/app/bea/apache2.4/httpd-2.4.25/htdocs"
> ProxyPreserveHost On
> ProxyPass /error !
> ProxyErrorOverride On
> Alias /error /opt/app/bea/apache2.4/httpd-2.4.25/htdocs
> ErrorDocument 500 /error/500.html
>
> I tried to setup this in virtual host as well, but cannot re-write the
> default 500 error message. I am also attaching my httpd.conf file.
>
> Appreciate if you can tell me what I am doing wrong, it would be much
> appreciated.
>
> Regards,
> Vel
>
>
>
>
>
>
> Regards,
> Velmurugan Dhakshnamoorthy (Vel)
> Singapore.
>
> On Tue, Apr 18, 2017 at 6:56 AM, Velmurugan Dhakshnamoorthy <
> dvel.hex@gmail.com> wrote:
>
>> Thanks again for your valuable inputs,  I am actually restricting number
>> of HTTP sessions at weblogic layer,  beyond the specified limit,  weblogic
>> throws 500 error message,  which is not very useful to users,  I want only
>> the 500 error page to be re-written by Apache proxy with simple message
>> (ex: server is busy,  login after sometime), I want only 500 generic error
>> message to re-write,  I don't want to re-write any other content from
>> back-end server.
>>
>> Regards,
>> Vel
>>
>> On Apr 18, 2017 00:19, "Luca Toscano" <to...@gmail.com> wrote:
>>
>>> Hi!
>>>
>>> As Nick mentioned there are a couple of options:
>>>
>>> 1) https://httpd.apache.org/docs/2.4/mod/mod_substitute.html or
>>> https://httpd.apache.org/docs/current/mod/mod_proxy_html.html in case
>>> you want to replace some parts of the response coming from the backend with
>>> your content.
>>>
>>> 2) Write your own content output filter to modify the backend response
>>> as you wish before flushing it out to the client. I'd suggest to follow
>>> https://httpd.apache.org/docs/2.4/mod/mod_lua.html#modifying_buckets if
>>> you want to attempt this road since using Lua instead of C is generally
>>> easier for people not used to write Apache code.
>>>
>>> My personal suggestion is to not use any of the above but to re-think
>>> about why you want to force the proxy to do this work. A proxy should be as
>>> lightweight as possible and ideally should mask backend failures with
>>> pre-defined error pages.
>>>
>>> Hope that helps!
>>>
>>> Luca
>>>
>>> 2017-04-17 9:57 GMT+02:00 Velmurugan Dhakshnamoorthy <dvel.hex@gmail.com
>>> >:
>>>
>>>> Hi Nick,
>>>> yes exactly,  I want the error message produced by back-end weblogic
>>>> server to be re-written by Apache proxy and then display custom message to
>>>> user.
>>>>
>>>> Regards,
>>>> Vel
>>>>
>>>>
>>>> On Apr 17, 2017 15:34, "Nick Kew" <ni...@apache.org> wrote:
>>>>
>>>> On Mon, 2017-04-17 at 09:04 +0800, Velmurugan Dhakshnamoorthy wrote:
>>>>
>>>> >
>>>> >         Thanks Luca,  I tried setting proxyerroroverride and error
>>>> >         document  in virtual host, however,  the 500 error produced by
>>>> >         content server is displayed as it is via Apache proxy. Any
>>>> >         further help?
>>>>
>>>> Are you saying you want an error message coming from the backend
>>>> but modified by the proxy?  That would imply using a content filter
>>>> (such as mod_proxy_html, mod_sed, or mod_substitute) to rewrite
>>>> the response from the backend.
>>>>
>>>> --
>>>> Nick Kew
>>>>
>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>>>> For additional commands, e-mail: users-help@httpd.apache.org
>>>>
>>>>
>>>>
>>>
>

Re: [users@httpd] Reg: Custom error message at Apache 2.4.25

Posted by Velmurugan Dhakshnamoorthy <dv...@gmail.com>.
Hi Luca,
Is it possible to pinpoint what is the wrong in my setting. I am still
unable to display the custom error message.

*The actual message from weblogic 12c in browser*

Error 500--Internal Server Error
From RFC 2068 Hypertext Transfer Protocol -- HTTP/1.1:
10.5.1 500 Internal Server Error
The server encountered an unexpected condition which prevented it from
fulfilling the request.

*Apache Proxy 2.4.25 setting in httpd.conf*

*Configuration to forward request from Apache to Weblogic 12c*
<VirtualHost *:8060>
   <Location />
       SetHandler weblogic-handler
       WebLogicHost hawley760
      WebLogicPort 8062
       Debug ON
       WLLogFile /opt/app/bea/apache2.4/httpd-2.4.25/logs/RPS-8060.log
  </Location>
</VirtualHost>

*config related to error document in httpd.conf*

DocumentRoot "/opt/app/bea/apache2.4/httpd-2.4.25/htdocs"
ProxyPreserveHost On
ProxyPass /error !
ProxyErrorOverride On
Alias /error /opt/app/bea/apache2.4/httpd-2.4.25/htdocs
ErrorDocument 500 /error/500.html

I tried to setup this in virtual host as well, but cannot re-write the
default 500 error message. I am also attaching my httpd.conf file.

Appreciate if you can tell me what I am doing wrong, it would be much
appreciated.

Regards,
Vel






Regards,
Velmurugan Dhakshnamoorthy (Vel)
Singapore.

On Tue, Apr 18, 2017 at 6:56 AM, Velmurugan Dhakshnamoorthy <
dvel.hex@gmail.com> wrote:

> Thanks again for your valuable inputs,  I am actually restricting number
> of HTTP sessions at weblogic layer,  beyond the specified limit,  weblogic
> throws 500 error message,  which is not very useful to users,  I want only
> the 500 error page to be re-written by Apache proxy with simple message
> (ex: server is busy,  login after sometime), I want only 500 generic error
> message to re-write,  I don't want to re-write any other content from
> back-end server.
>
> Regards,
> Vel
>
> On Apr 18, 2017 00:19, "Luca Toscano" <to...@gmail.com> wrote:
>
>> Hi!
>>
>> As Nick mentioned there are a couple of options:
>>
>> 1) https://httpd.apache.org/docs/2.4/mod/mod_substitute.html or
>> https://httpd.apache.org/docs/current/mod/mod_proxy_html.html in case
>> you want to replace some parts of the response coming from the backend with
>> your content.
>>
>> 2) Write your own content output filter to modify the backend response as
>> you wish before flushing it out to the client. I'd suggest to follow
>> https://httpd.apache.org/docs/2.4/mod/mod_lua.html#modifying_buckets if
>> you want to attempt this road since using Lua instead of C is generally
>> easier for people not used to write Apache code.
>>
>> My personal suggestion is to not use any of the above but to re-think
>> about why you want to force the proxy to do this work. A proxy should be as
>> lightweight as possible and ideally should mask backend failures with
>> pre-defined error pages.
>>
>> Hope that helps!
>>
>> Luca
>>
>> 2017-04-17 9:57 GMT+02:00 Velmurugan Dhakshnamoorthy <dv...@gmail.com>
>> :
>>
>>> Hi Nick,
>>> yes exactly,  I want the error message produced by back-end weblogic
>>> server to be re-written by Apache proxy and then display custom message to
>>> user.
>>>
>>> Regards,
>>> Vel
>>>
>>>
>>> On Apr 17, 2017 15:34, "Nick Kew" <ni...@apache.org> wrote:
>>>
>>> On Mon, 2017-04-17 at 09:04 +0800, Velmurugan Dhakshnamoorthy wrote:
>>>
>>> >
>>> >         Thanks Luca,  I tried setting proxyerroroverride and error
>>> >         document  in virtual host, however,  the 500 error produced by
>>> >         content server is displayed as it is via Apache proxy. Any
>>> >         further help?
>>>
>>> Are you saying you want an error message coming from the backend
>>> but modified by the proxy?  That would imply using a content filter
>>> (such as mod_proxy_html, mod_sed, or mod_substitute) to rewrite
>>> the response from the backend.
>>>
>>> --
>>> Nick Kew
>>>
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>>> For additional commands, e-mail: users-help@httpd.apache.org
>>>
>>>
>>>
>>

Re: [users@httpd] Reg: Custom error message at Apache 2.4.25

Posted by Velmurugan Dhakshnamoorthy <dv...@gmail.com>.
Thanks again for your valuable inputs,  I am actually restricting number of
HTTP sessions at weblogic layer,  beyond the specified limit,  weblogic
throws 500 error message,  which is not very useful to users,  I want only
the 500 error page to be re-written by Apache proxy with simple message
(ex: server is busy,  login after sometime), I want only 500 generic error
message to re-write,  I don't want to re-write any other content from
back-end server.

Regards,
Vel

On Apr 18, 2017 00:19, "Luca Toscano" <to...@gmail.com> wrote:

> Hi!
>
> As Nick mentioned there are a couple of options:
>
> 1) https://httpd.apache.org/docs/2.4/mod/mod_substitute.html or
> https://httpd.apache.org/docs/current/mod/mod_proxy_html.html in case you
> want to replace some parts of the response coming from the backend with
> your content.
>
> 2) Write your own content output filter to modify the backend response as
> you wish before flushing it out to the client. I'd suggest to follow
> https://httpd.apache.org/docs/2.4/mod/mod_lua.html#modifying_buckets if
> you want to attempt this road since using Lua instead of C is generally
> easier for people not used to write Apache code.
>
> My personal suggestion is to not use any of the above but to re-think
> about why you want to force the proxy to do this work. A proxy should be as
> lightweight as possible and ideally should mask backend failures with
> pre-defined error pages.
>
> Hope that helps!
>
> Luca
>
> 2017-04-17 9:57 GMT+02:00 Velmurugan Dhakshnamoorthy <dv...@gmail.com>:
>
>> Hi Nick,
>> yes exactly,  I want the error message produced by back-end weblogic
>> server to be re-written by Apache proxy and then display custom message to
>> user.
>>
>> Regards,
>> Vel
>>
>>
>> On Apr 17, 2017 15:34, "Nick Kew" <ni...@apache.org> wrote:
>>
>> On Mon, 2017-04-17 at 09:04 +0800, Velmurugan Dhakshnamoorthy wrote:
>>
>> >
>> >         Thanks Luca,  I tried setting proxyerroroverride and error
>> >         document  in virtual host, however,  the 500 error produced by
>> >         content server is displayed as it is via Apache proxy. Any
>> >         further help?
>>
>> Are you saying you want an error message coming from the backend
>> but modified by the proxy?  That would imply using a content filter
>> (such as mod_proxy_html, mod_sed, or mod_substitute) to rewrite
>> the response from the backend.
>>
>> --
>> Nick Kew
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>> For additional commands, e-mail: users-help@httpd.apache.org
>>
>>
>>
>

Re: [users@httpd] Reg: Custom error message at Apache 2.4.25

Posted by Luca Toscano <to...@gmail.com>.
Hi!

As Nick mentioned there are a couple of options:

1) https://httpd.apache.org/docs/2.4/mod/mod_substitute.html or
https://httpd.apache.org/docs/current/mod/mod_proxy_html.html in case you
want to replace some parts of the response coming from the backend with
your content.

2) Write your own content output filter to modify the backend response as
you wish before flushing it out to the client. I'd suggest to follow
https://httpd.apache.org/docs/2.4/mod/mod_lua.html#modifying_buckets if you
want to attempt this road since using Lua instead of C is generally easier
for people not used to write Apache code.

My personal suggestion is to not use any of the above but to re-think about
why you want to force the proxy to do this work. A proxy should be as
lightweight as possible and ideally should mask backend failures with
pre-defined error pages.

Hope that helps!

Luca

2017-04-17 9:57 GMT+02:00 Velmurugan Dhakshnamoorthy <dv...@gmail.com>:

> Hi Nick,
> yes exactly,  I want the error message produced by back-end weblogic
> server to be re-written by Apache proxy and then display custom message to
> user.
>
> Regards,
> Vel
>
>
> On Apr 17, 2017 15:34, "Nick Kew" <ni...@apache.org> wrote:
>
> On Mon, 2017-04-17 at 09:04 +0800, Velmurugan Dhakshnamoorthy wrote:
>
> >
> >         Thanks Luca,  I tried setting proxyerroroverride and error
> >         document  in virtual host, however,  the 500 error produced by
> >         content server is displayed as it is via Apache proxy. Any
> >         further help?
>
> Are you saying you want an error message coming from the backend
> but modified by the proxy?  That would imply using a content filter
> (such as mod_proxy_html, mod_sed, or mod_substitute) to rewrite
> the response from the backend.
>
> --
> Nick Kew
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
>
>

Re: [users@httpd] Reg: Custom error message at Apache 2.4.25

Posted by Velmurugan Dhakshnamoorthy <dv...@gmail.com>.
Hi Nick,
yes exactly,  I want the error message produced by back-end weblogic server
to be re-written by Apache proxy and then display custom message to user.

Regards,
Vel


On Apr 17, 2017 15:34, "Nick Kew" <ni...@apache.org> wrote:

On Mon, 2017-04-17 at 09:04 +0800, Velmurugan Dhakshnamoorthy wrote:

>
>         Thanks Luca,  I tried setting proxyerroroverride and error
>         document  in virtual host, however,  the 500 error produced by
>         content server is displayed as it is via Apache proxy. Any
>         further help?

Are you saying you want an error message coming from the backend
but modified by the proxy?  That would imply using a content filter
(such as mod_proxy_html, mod_sed, or mod_substitute) to rewrite
the response from the backend.

--
Nick Kew



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

Re: [users@httpd] Reg: Custom error message at Apache 2.4.25

Posted by Nick Kew <ni...@apache.org>.
On Mon, 2017-04-17 at 09:04 +0800, Velmurugan Dhakshnamoorthy wrote:

> 
>         Thanks Luca,  I tried setting proxyerroroverride and error
>         document  in virtual host, however,  the 500 error produced by
>         content server is displayed as it is via Apache proxy. Any
>         further help? 

Are you saying you want an error message coming from the backend
but modified by the proxy?  That would imply using a content filter
(such as mod_proxy_html, mod_sed, or mod_substitute) to rewrite
the response from the backend.

-- 
Nick Kew



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


Re: [users@httpd] Reg: Custom error message at Apache 2.4.25

Posted by Velmurugan Dhakshnamoorthy <dv...@gmail.com>.
Dear,
Any help in my query?

Regards,
Vel

On Apr 13, 2017 09:03, "Velmurugan Dhakshnamoorthy" <dv...@gmail.com>
wrote:

> Thanks Luca,  I tried setting proxyerroroverride and error document  in
> virtual host, however,  the 500 error produced by content server is
> displayed as it is via Apache proxy. Any further help?
>
> Any specific place to set these parameters,  I also hope I don't need to
> use .htacess.
>
> Regards,
> Vel
>
> On Mar 15, 2017 16:41, "Luca Toscano" <to...@gmail.com> wrote:
>
> Hi!
>
> 2017-03-15 4:00 GMT+01:00 Velmurugan Dhakshnamoorthy <dv...@gmail.com>:
>
>> Hi Everyone,
>>
>> I have installed Apache 2.4.25 HTTP server as a reverse proxy server and
>> my back-end content server is Weblogic 12c(12.1.3).
>>
>> The error message(500,50*.. ) produced from content server  Weblogic 12c
>> to be displayed with custom error message through Apache 2.4.25. I tired
>> few options based on available tips and docs from Apache website,  but
>> unable to display custom message. Please help me with the exact steps/setup
>> required to achieve this.
>>
>> My OS is RHEL 7.2, your help and support on this matter is highly
>> appreciated.
>>
>
> If I got your request correctly, you'd need to enable
> https://httpd.apache.org/docs/2.4/mod/mod_proxy.html#proxyerroroverride
> and the related ErrorDocuments.
>
> Hope that helps!
>
> Luca
>
>
>