Keep Server Online
If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.
or
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.
| |
|
Topic: Is there a way to override an apache error? |
|
Author |
|
cvillemure
Joined: 19 Dec 2012 Posts: 5 Location: Canada, Magog
|
Posted: Fri 13 Sep '13 3:28 Post subject: Is there a way to override an apache error? |
|
|
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
|
Posted: Sat 14 Sep '13 8:02 Post subject: |
|
|
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
|
Posted: Mon 16 Sep '13 16:58 Post subject: |
|
|
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 |
|
|
|
|
|
|