AS7 - How to configure https connector for SSL
adamhearn Jul 20, 2011 5:26 AMI'm completely new with using JBoss and have started with AS7. My platform is Windows 2003 x64 and I'm running JRE6 (with JDK 1.6.0_25) and the final AS7 download.
I'd like to configure SSL support but am having difficulty finding instructions that relate to AS7 and/or understanding how I go about it!
Running in 'standalone' mode, I've edited ...\standalone\configuration\standalone.xml adding the following [bold]:
<subsystem xmlns="urn:jboss:domain:web:1.0" default-virtual-server="default-host">
<connector name="http" protocol="HTTP/1.1" socket-binding="http" scheme="http"/>
<connector name="https" protocol="HTTP/1.1" socket-binding="https" scheme="https" secure="true" />
<virtual-server name="default-host" enable-welcome-root="true">
<alias name="localhost"/>
<alias name="example.com"/>
</virtual-server>
</subsystem>
The socket binding is already in place (8443).
The server will start with the above change. I can access both http://localhost:8080/my.jsp and http://localhost:8443/my.jsp
However accessing https://localhost:8443/my.jsp doesn't - the browser waits for a very long time then presents a "cannot display web page" error page. It doesn't look like any errors are logged for this.
Obviously in the world of SSL I need a certificate so I've created a keystore using "keytool -genkey -alias tomcat -keyalg RSA" and copied the file to "...\standalone\configuration\standalone\server.keystore".
Using examples I've seen, I specificed this using the following additional attributes for the connector definition:
keystoreFile="${jboss.server.home.dir}/configuration/server.keystore" keystorePass="changeit"
But, the server fails to start with an error in the log "Unexpected attribute 'keystoreFile'".
I understand that AS7 is a complete re-write and some of the information, such as the connector XML element attributes, on the web may be out of date so if anyone can supply configuration instructions for SSL I'd very much appreciate it!
Thanks in advance, Adam