Server.xml equivalent in JBoss AS 7

I am trying to run my application in jboss 7 from jboss 4. In jboss 4 we changed server.xml to configure keystoreFile and keystorePass, etc. Can someone help me where to make these changes in jboss7.

+7
source share
5 answers

The server.xml identifier in Jboss 7 is a standalone /configuration/standalone.xml for a standalone installation and domain.xml for one of the domains.

I'm not sure where these options are or how you should configure it in Jboss 7, but first start with the standalone.xml file.

+4
source

Edit the standalone/configuration/standalone.xml file:

 <subsystem xmlns="urn:jboss:domain:web:1.0" default-virtual-server="default-host"> <connector name="http" scheme="http" protocol="HTTP/1.1" socket-binding="http"/> <virtual-server name="default-host" enable-welcome-root="true"> <alias name="localhost" /> <alias name="example.com" /> </virtual-server> </subsystem> 

Replace the connector tag with the following:

 <connector name="https" scheme="https" protocol="HTTP/1.1" secure ="true" socket- binding="https" ssl="your certificate name"/> 
+4
source

You should avoid touching the XML configuration files directly.
Rather, let it be up to the domain controller and host controller ,
and configure your server using the tools listed here: JBoss AS 7 JMX Console

Update:

  • For manual configuration, try the Web interface - http://localhost:9990/ .

  • For automatic tuning, try CLI scripts .

  • To develop and debug CLI commands, try jboss-cli.sh --gui .

But if you really have to do this in standalone/configuration/standalone.xml :

 <subsystem xmlns="urn:jboss:domain:web:1.0" ...> 

Scheme here: http://www.jboss.org/schema/jbossas/jboss-as-web_1_2.xsd
( or later ).

+2
source

In any case, the recommended way to change the AS 7 model is through the command line interface. For example, you can set the socket binding port for the HTTP port to 8090 with:

/ socket-binding-group = standard-sockets / socket-binding = http: write-attribute (name = "port", value = "8090")

+1
source

JBoss EAP 7 uses the Undertow web server and configures it through the undertow subsystem (which replaces the web subsystem used in previous versions). Configuring SSL / TLS using the CLI is described in Configuring SSL / TLS for Applications . If you want to directly modify the standalone.xml file, the instructions can be translated into:

  • Add and configure HTTPS security scope. - add an HTTPS security-realm element to /server/management/security-realms , for example

     <security-realm name="HTTPSRealm"> <server-identities> <ssl> <keystore path="/path/to/your/keystore/myKeystore.jks" keystore-password="myKeystorePassword" alias="mySSLKeyPairAlias" key-password="mySSLKeyPairPassword" /> </ssl> </server-identities> </security-realm> 
  • Update the subsystem to use the HTTPS security scope. - under /server/profile find the element of the Undertow subsystem (for example, <subsystem xmlns="urn:jboss:domain:undertow:3.1"> ). It has a server child element to which you add an https-listener element that references your HTTPSRealm created in step 1 above, for example

     <https-listener name="default-ssl" socket-binding="https" security-realm="HTTPSRealm" /> 

More information can be found at the following links:

0
source

All Articles