6 Replies Latest reply on Jul 6, 2012 8:34 AM by Jean-Frederic Clere

    JBoss AS 7: How to modify the server banner

    Prajesh Bhattacharya Newbie

      I have a web app running in the following two setups: 1) JBoss running on Windows7 and 2) JBoss running with an apache httpd reverse proxy on CentOS.

       

      I downloaded and added jbossWebService.jar to the WEB-INF/lib directory in order to use the org.jboss.web.tomcat.filters.ReplyHeaderFilter class. Following is my filter configuration.

      <filter>

      <filter-name>CommonHeadersFilter</filter-name>

      <filter-class>

      org.jboss.web.tomcat.filters.ReplyHeaderFilter</filter-class>

      <init-param>

      <param-name>X-Powered-By</param-name>

      <param-value>MyWeb</param-value>

      </init-param>

      <init-param>

           <param-name>Connection</param-name>

           <param-value>keep-alive</param-value>

      </init-param>

      <init-param>

           <param-name>Server</param-name>

           <param-value>MyServer</param-value>

      </init-param>

      <init-param>

           <param-name>Cache-Control</param-name>

           <param-value>max-age=3600</param-value>

      </init-param>

      </filter>

       

       

      What I see in the browser:

       

      The JBoss without apache httpd shows the following:

      X-Powered-By: MyWeb, JSP/2.2

      Server: Apache-Coyote/1.1, MyServer

       

      The JBoss with apache as reverse proxy shows the following:

      X-Powered-By: MyWeb, JSP/2.2

      Server: Apache-Coyote/1.1

       

       

       

      What I want:

      The Apache-Coyote/1.1 and the JSP/2.2 to go away. The one behind apache httpd does not even show MyServer as the server banner. I would like that to show up, but that's not a necessity.

       

       

      p.s.

      In apache httpd conf file, I have

      ServerTokens ProductOnly 
      ServerSignature Off

       

      Any help is appreciated.

       

      Thanks.

      Prajesh