jboss服务器缺省情况下会在HTTP response header中显示自身的标识,如下

 

Server: Apache-Coyote/1.1

出于安全考虑,如果不想让人知道服务器类型,可以用以下方法进行修改。

 

方法1、修改standalone.xml

 

  1.  
    <system-properties>
  2.  
    <property name="org.apache.coyote.http11.Http11Protocol.SERVER" value="JbossSecureServer"/>
  3.  
    <property name="org.jboss.as.sendServerHeader" value="false"/>
  4.  
    </system-properties>

方法2、修改standalone.conf(linux)/standalone.conf.bat(windows)

standalone.conf: JAVA_OPTS="$JAVA_OPTS -Dorg.apache.coyote.http11.Http11Protocol.SERVER=JbossSecureServer"

standalone.conf.bat: set "JAVA_OPTS=%JAVA_OPTS% -Dorg.apache.coyote.http11.Http11Protocol.SERVER=JbossSecureServer"

以上两种方法,任何一个都可以,改完之后的效果

相关文章:

  • 2021-10-05
  • 2021-10-12
  • 2022-12-23
  • 2021-10-17
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-01-04
猜你喜欢
  • 2021-06-01
  • 2022-12-23
  • 2021-11-04
  • 2022-12-23
  • 2021-11-14
  • 2021-10-28
  • 2021-06-28
相关资源
相似解决方案