Apache Dispatcher overwrites responses with 500 status code | Community
Skip to main content
New Participant
February 22, 2016
Solved

Apache Dispatcher overwrites responses with 500 status code

  • February 22, 2016
  • 2 replies
  • 1994 views

I have a AEM author instance that sits behind an apache server with the dispatcher module.  This has been setup and working for a long time.  I have reviewed various forum threads on the subject.

The problem I just discovered is that wcm commands that send an error back to the client using HtmlStatusResponseHelper are being over written by apache.

When I access AEM instance directly and the wcm command sends an error message, with a response error code of 500, I can see the text as a pop up message in the siteadmin.

In the same scenario, When I access AEM instance through apache, the content is overwritten by apache's internal server html content.

I have tried finding a way to disable apache's error code handling and prevent the overwrite of the html content generated by AEM.

How can the AEM generated 500 error content be returned through apache ?

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by joerghoh

Hi,

do you have an errordocument configured for the complete apache host/virtual host [1]? In that case AEM returns an error, and the webserver rewrites the response, so you can see the behaviour you described.

In that case it would make sense to limit the scope of the ErrorDocument statement to <Location>s which do not cover /bin/wcmcommand.

Jörg

 

[1] https://httpd.apache.org/docs/2.4/custom-error.html

2 replies

joerghoh
Employee
February 22, 2016

NCSA httpd 1.3?

joerghoh
joerghohAccepted solution
Employee
February 22, 2016

Hi,

do you have an errordocument configured for the complete apache host/virtual host [1]? In that case AEM returns an error, and the webserver rewrites the response, so you can see the behaviour you described.

In that case it would make sense to limit the scope of the ErrorDocument statement to <Location>s which do not cover /bin/wcmcommand.

Jörg

 

[1] https://httpd.apache.org/docs/2.4/custom-error.html