Apache server as a proxy server for Jboss task

My web application is currently running on jboss, but I have an Apache server which is used as a proxy server for my application. I have the ability to upload XML files on my jboss server. When it loads, it returns an HTTP 200 and XML response Content-Type: text/xml .

Some users use this function in an apache instance that redirects to jboss. These users sometimes use Content-Type: application / xml when loading the file and Accept: / header. Jboss works fine with this header, but apache always returns a bad reaction:

 HTTP/1.1 502 Bad Gateway < Date: Mon, 31 Jan 2011 23:33:47 GMT < Server: Apache/2.0.63 (Unix) mod_jk/1.2.27 < Content-Length: 232 < Content-Type: text/html; charset=iso-8859-1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"> <html><head> <title>502 Bad Gateway</title> </head><body> <h1>Bad Gateway</h1> <p>The proxy server received an invalid response from an upstream server.<br /> </p> 

Why does this happen when users use the / xml application instead of the text / xml header value? Does Apache somehow compare these headers? When users use text / xml, everything is fine and apache prints jboss 200 OK response.

+7
source share
2 answers

I assume you are using apache2. edit this file / etc / apache 2 / modsenabled / mime.conf add one line AddType application / xml.xml

- kiran.kumar

+1
source

You may need to examine the mime.types file in the httpd / conf directory (usually somewhere like the / usr / httpd / conf or / etc / httpd / conf directory) and install the file extensions for the application / xml in the same way as for the text / xml.

0
source

All Articles