GlassFish Server配置https访问方式



 

GlassFish Server 是支持https访问方式,下述自定配置

 

 cd %glassfish_home%\domains\teras_domain\config

 

 生成keystore文件,命令如下

             keytool -genkeypair -keyalg RSA -keystore custom_store.jks -validity 365 -aliascustom

            会依次提示CN=hostname, OU=custom, O=custom, L=dl, ST=dl,C=cn

            keytool命令是"%JAVA_HOME%"\bin下的,提前量。

            CN尽量使用访问PC名称,其余的随意即可。

             custom 自定一个标识(使用步2的即可)

            custom_store 自定一个store名称。

            365 时间


  keytool -export -alias custom -file%localpath%\custom_name.crt -keystore custom_store.jks –storepass changeit

            custom 自定一个标识(使用步2的即可)

            custom_name  自定一个证书名称。

           changeit 随便定个。

 

4 修改%glassfish_home%\domains\teras_domain\config下的domain.xml文件

           <jvm-options>-Djavax.net.ssl.keyStore=${com.sun.aas.instanceRoot}/config/custom_store.jks</jvm-options>

          然后,Perform a globalreplace of “s1as” with “custom”. “custom” is the alias you usedin the previous steps.

 

5 操作,将信任证书追加到jresecuritykeystore中。

           keytool -import -%JAVA_HOME%\jre\lib\security\cacerts -file custom_name.crt-alias custom

          如果cacerts拒绝访问,则需要用管理员身份启动命令行窗口

 

 

 

小部分参照 http://www.luv2code.com/2012/05/09/configure-ssl-on-glassfish-with-godaddy-certificate/

 



 


  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值