R – How to force IIS7 to return Tomcat error response


I have a following setup:

  • App – Magnolia site running under Tomcat 6.0.16
  • ISAPI – Tomcat connector isapi_redirect-1.2.28
  • web server – IIS 7
  • host OS – Windows 2008

Everything works fine until i try to access Magnolia admin part which is protected. Tomcat returns HTTP 401 status code with the authentication form as response body and that works fine when accessed from the local machine where the actual setup is.

But, as soon as i place an request to the admin part from another host, i receive native 401 response page served by the IIS 7. Magnolia login page response is suppressed from IIS and its static 401 file is served instead.

Same happens with an 404 response. Locally i receive tomcat 404 response page, but remote client receives IIS 7 404 page.

Any ideas why IIS 7 is behaving differently in both cases?

I checked the isapi redirector and it returns identical responses regardless on the request host address. Therefore i assume that the problem lies in IIS 7 but have no idea where should i look at.


Best Solution

Maybe you need custom_errors=false in your web.config.

Related Question