logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
Post new topic   Forum Index -> Apache View previous topic :: View next topic
Reply to topic   Topic: Is there a way to override an apache error?
Author
cvillemure



Joined: 19 Dec 2012
Posts: 5
Location: Canada, Magog

PostPosted: Fri 13 Sep '13 3:28    Post subject: Is there a way to override an apache error? Reply with quote

Hi,

I'm using authnz_sspi package to enable SSO with my Apache setup as a reverse proxy. However if the configuration of the server is invalid, the sspi module might generate errors such as this one :

[authnz_sspi:error] [pid 2068:tid 2860] (OS 1311)There are currently no logon servers available to service the logon request. : [client ...] access to /cas-server/login failed, reason: cannot generate server context

The client is then issued a 500 error page.

I would like to be able to conditionnaly override authnz error to return a custom error page only for this module. So I want a custom 500 error page for Apache in general (which I already have working) and a custom 500 error page for the sspi module errors. Is it possible?

Also IE has a bad habit of also overriding the 500 error page, would it be a good idea to return a 400 error page instead to be sure the client sees my error message? Can I override the error code?
Back to top
glsmith
Moderator


Joined: 16 Oct 2007
Posts: 2268
Location: Sun Diego, USA

PostPosted: Sat 14 Sep '13 8:02    Post subject: Reply with quote

Hmmm ... couldn't you just set an ErrorDocument 500 for the location /cas-server/login that's different than the server wide 500 error document?

To get the module to spit out a 400, which isn't really correct since there was nothing wrong with the request itself, you would have to modify the module.
Back to top
cvillemure



Joined: 19 Dec 2012
Posts: 5
Location: Canada, Magog

PostPosted: Mon 16 Sep '13 16:58    Post subject: Reply with quote

Since the error code cannot be overriden easily and the users using that module feature will use InternetExplorer, I just won't override the error page since they will not see it anyway.

But thanks for the idea of different error handler based on location, i haven't thought of that!
Back to top


Reply to topic   Topic: Is there a way to override an apache error? View previous topic :: View next topic
Post new topic   Forum Index -> Apache