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.
5 Answers
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.
- 8,216
- 11
- 39
- 43
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”/>
- 222,467
- 53
- 283
- 367
- 1,196
- 3
- 13
- 24
-
where do i have to put the certs? any special place? – Joergi Mar 20 '12 at 00:11
-
1@Joerg you have to set the system property javax.net.ssl.trustStore in standalone.xml or domain.xml:
https://community.jboss.org/thread/172052 – Ashish Panery Jul 09 '12 at 10:14
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).
- 1
- 1
- 43,948
- 41
- 217
- 277
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")
- 171
- 1
- 2
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:
Add and configure an HTTPS security realm. - under
/server/management/security-realmsadd an HTTPSsecurity-realmelement, 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 undertow subsystem to use the HTTPS security realm. - under
/server/profilefind the Undertow subsystem element (e.g.<subsystem xmlns="urn:jboss:domain:undertow:3.1">). It has aserverchild element to which you add anhttps-listenerelement referencing yourHTTPSRealmcreated 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:
- Security Realms
- Security Realm Detailed Configuration
- https-listener Attributes
- 331
- 2
- 5