This tutorial makes the following assumptions:
- That you are running JBoss under a 'jboss' user whose home directory is /home/jboss/
For the following examples the string "<server-name/ip>" should be replaced with the domain name, or ip address from which the site will be accessed via https. Also the path to your installed JDK is likely different.
- Create a new keystore using the jdk provided binary:
# /usr/lib/jvm/java-1.6.0-openjdk/bin/keytool -genkey -alias your_alias -keyalg RSA -keystore keystore.jks
Enter keystore password:
Re-enter new password:
What is your first and last name?
[Unknown]: <server-name/ip>
What is the name of your organizational unit?
[Unknown]: Your Unit
What is the name of your organization?
[Unknown]: Your Organization
What is the name of your City or Locality?
[Unknown]: Your City
What is the name of your State or Province?
[Unknown]: MD
What is the two-letter country code for this unit?
[Unknown]: US
Is CN=<server-name/ip>, OU=Your Unit, O=Your Organization, L=Your City,
ST=MD, C=US correct?
[no]: yes
Enter key password for <your_alias>
(RETURN if same as keystore password):
Re-enter new password:
. When propmted for the key password, you must enter the same password as you first entered, when going through the keystore prompts.
. Put the keystore file in the /home/jboss directory
- Export the generated server certificate in .keystore to server.cer
# /usr/lib/jvm/java-1.6.0-openjdk/bin/keytool -export -alias your_alias -storepass password -file server.cer -keystore keystore.jks
- Create a trust-store file and add the server cert to it
# /usr/lib/jvm/java-1.6.0-openjdk/bin/keytool -import -v -trustcacerts -alias your_alias -file server.cer -keystore cacerts.jks -keypass password -storepass password
It will display the following:
Owner: CN=<server-name/ip>, OU=Your Unit, O=Your Organization,
L=Your City, ST=MD, C=US
Issuer: CN=<server-name/ip>, OU=Your Unit, O=Your Organization,
L=Your City, ST=MD, C=US
Serial number: 4e20527c
Valid from: Fri Jul 15 10:45:16 EDT 2011 until: Thu Oct 13 10:45:16 EDT 2011
Certificate fingerprints:
MD5: B9:25:A0:89:B9:A3:62:44:38:DD:B7:13:2C:05:C5:8C
SHA1: 3C:F9:54:2D:96:0C:D7:F9:C5:DA:24:54:A3:29:41:98:5E:01:2C:97
Signature algorithm name: SHA1withRSA
Version: 3
. Enter 'yes'
Trust this certificate? [no]: yes
Certificate was added to keystore
- Edit the JBOSS config file $JBOSS_HOME/server/server_profile/deploy/jbossweb.sar/server.xml
. Make a copy of the following block of XML
<!-- SSL/TLS Connector configuration using the admin devl guide keystore
<Connector protocol="HTTP/1.1" SSLEnabled="true"
port="${jboss.web.https.port}" address="${jboss.bind.address}"
scheme="https" secure="true" clientAuth="false"
keystoreFile="${jboss.server.home.dir}/conf/chap8.keystore"
keystorePass="rmi+ssl" sslProtocol = "TLS" />
-->
. Make the following changes:
<Connector protocol="HTTP/1.1" SSLEnabled="true"
port="${jboss.web.https.port}" address="${jboss.bind.address}"
scheme="https" secure="true" clientAuth="false"
keystoreFile="${user.home}/jboss_as_keys/keystore.jks"
keystorePass="password"
truststoreFile="${user.home}/jboss_as_keys/cacerts.jks"
truststorePass="password"
sslProtocol = "TLS" />
. Disable unencrypted http/8080 access to the server by commenting out the following:
<!--
<Connector protocol="HTTP/1.1" port="${jboss.web.http.port}"
address="${jboss.bind.address}"
redirectPort="${jboss.web.https.port}" />
-->
- Set up port forwarding for port 443 to 8443 via iptables Use the following iptables commands, replacing $IPADDR with the IP of your web server
# iptables -t nat -A OUTPUT --destination localhost -p tcp --dport 443 -j REDIRECT --to-ports 8443
# iptables -t nat -A OUTPUT --destination $IPADDR -p tcp --dport 443 -j REDIRECT --to-ports 8443
# iptables -t nat -A PREROUTING --destination $IPADDR -p tcp --dport 443 -j REDIRECT --to-ports 8443
# /etc/init.d/iptables save
# /etc/init.d/iptables restart
相关推荐
1. 设置开发环境,包括JBoss 6.0、JDK和IDE。 2. 创建EJB项目,编写MDB类,用@MessageDriven注解配置。 3. 实现MessageListener接口,编写onMessage()方法。 4. 配置点对点或广播模式,使用队列或主题。 5. 编写消息...
在Linux环境下配置JBoss6.0与JDK7.0是一项关键的任务,因为这两个组件是许多企业级Java应用的基础。JBoss是一个流行的开源应用服务器,它支持Java EE规范,而JDK则是运行Java应用程序和应用服务器所必需的开发工具包...
"JBOSS 6.0 Final 日志无法写入补丁"的问题表明用户在使用JBOSS 6.0 最终版本时遇到了日志无法正常写入自定义日志文件的状况。这个问题通常涉及到日志框架Log4j的配置或者JBOSS服务器的权限设置。 Log4j是Apache的...
jboss-6.0.0.20100911-M5-part1
<!DOCTYPE struts PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 2.0//EN" ... <!-- 定义包管理配置的action 继承struts-default.xml中的配置 --> <!-- 定义Action(login.action) --> ...
jboss-6.0.0.20100911-M5.part010
jboss-6.0.0.20100911-M5-part2
jboss-6.0.0.20100911-M5.part09
**JBoss 6.0.0 M4 发布SSH项目详解** JBoss 6.0.0 M4 是 JBoss Application Server 的一个里程碑版本,它标志着该开源中间件平台在功能和性能上的一个重要进步。SSH(Spring、Struts、Hibernate)是一种经典的Java ...
jboss-6.0.0.20100911-M5.part04
jboss-6.0.0.20100911-M5.part06
jboss-6.0.0.20100911-M5.part05
jboss-6.0.0.20100911-M5.part07
jboss-6.0.0.20100911-M5.part08
本文将详细介绍如何在MyEclipse 8.6中安装和配置JBoss Drools 6.0规则引擎插件...这样,您就完成了基于MyEclipse 8.6的JBoss Drools 6.0规则引擎的集成和设置,现在可以充分利用Drools的强大功能来管理您的业务规则了。
jboss-6.0.0.20100911-M5.part03.rar-real
这是因为JBoss 6.0是设计在JDK 6环境下运行的,尽管后续的JDK版本可能具有更多的优化和功能,但为了确保与JBoss 6.0的兼容性,开发者需要遵循此要求。安装并设置好JDK6后,确保`JAVA_HOME`环境变量指向了正确的JDK6...
6. **安全性**:Tomcat6.0支持HTTPS协议,可以通过修改`server.xml`文件配置SSL证书,以提供加密的数据传输。 7. **热部署**:Tomcat6.0支持热部署,即在不重启服务器的情况下更新应用程序。 8. **社区支持**:...
在IT行业中,尤其是在Java企业级应用开发中,JBoss是一个广泛应用的开源应用服务器,它支持各种服务和框架,包括Servlet、JSP等Web技术。Eclipse是一款强大的集成开发环境(IDE),广泛用于Java项目的开发。当我们在...