server.xml equivalent in JBoss AS 7
Asked Answered
K

5

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 any one help me where to make these changes in jboss7.

Kunz answered 19/7, 2011 at 15:56 Comment(0)
H
4

The server.xml equivalent in Jboss 7 is a standalone/configuration/standalone.xml for a standalone installation and domain.xml for a domain aware one.

I'm not sure where those options are or how you're supposed to configure it in Jboss 7, but start with standalone.xml file first.

Hydrokinetics answered 20/7, 2011 at 10:25 Comment(0)
P
4

Edit the file standalone/configuration/standalone.xml:

<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 thew connector tag with following one:

<connector name="https" scheme="https" protocol="HTTP/1.1" secure =”true” socket-   binding="https" ssl=”your certificate name”/>
Pella answered 25/10, 2011 at 15:15 Comment(2)
where do i have to put the certs? any special place?Rame
@Joerg you have to set the system property javax.net.ssl.trustStore in standalone.xml or domain.xml: <system-properties> <property name="javax.net.ssl.trustStore" value="/path/to/truststore.jks"/> </system-properties> community.jboss.org/thread/172052Pella
F
2

You should avoid touching the config XMLs yourself.
Rather let it up to domain controller and host controller,
and configure your server through the means mentioned here: JBoss AS 7 JMX Console

Update:

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

  • For automated configuration, try CLI scripts.

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

But if you really must, it's in standalone/configuration/standalone.xml:

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

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

Filippo answered 22/7, 2011 at 12:16 Comment(0)
W
1

Recommended way to change the AS 7 model is anyway by means of the Command Line Interface. For example, you can set the socket binding port of the HTTP port to 8090 with :

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

Weka answered 15/2, 2012 at 12:2 Comment(0)
P
0

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

  1. Add and configure an HTTPS security realm. - under /server/management/security-realms add an HTTPS security-realm element, 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>
    
  2. Update the undertow subsystem to use the HTTPS security realm. - under /server/profile find the Undertow subsystem element (e.g. <subsystem xmlns="urn:jboss:domain:undertow:3.1">). It has a server child element to which you add an https-listener element referencing your HTTPSRealm created in step 1 above, for example

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

More details can be found at these related links:

Polite answered 28/12, 2017 at 14:17 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.