GlassFish Server 配置https访问方式(一)
2016-12-16 18:16
387 查看
GlassFish Server 默认是支持https访问方式,下述自定义配置
步骤1 , cd
C:\Program Files\Java\jdk1.7.0_45\bin
步骤2 , 生成keystore文件,命令如下
keytool -genkeypair -keyalg RSA -keystore custom_store.jks -validity 365 -alias custom
会依次提示设定CN=hostname,
OU=custom, O=custom, L=dl, ST=dl,C=cn
keytool命令是"%JAVA_HOME%"\bin下的,提前设置环境变量。
CN尽量使用访问的PC名称,其余的随意即可。
custom 自定义一个标识符(使用步骤2定义的即可)。
custom_store 自定义一个store名称。
365 过期时间。
步骤3 , keytool
-export -alias custom -file custom_name.crt -keystore custom_store.jks
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, 可选操作,将信任证书追加到jre的security的keystore中。
keytool -import -%JAVA_HOME%\jre\lib\security\cacerts -file custom_name.crt-alias custom
如果cacerts拒绝访问,则需要用管理员身份启动命令行窗口
http://blog.csdn.net/haohaodigua/article/details/21236373
步骤1 , cd
C:\Program Files\Java\jdk1.7.0_45\bin
步骤2 , 生成keystore文件,命令如下
keytool -genkeypair -keyalg RSA -keystore custom_store.jks -validity 365 -alias custom
会依次提示设定CN=hostname,
OU=custom, O=custom, L=dl, ST=dl,C=cn
keytool命令是"%JAVA_HOME%"\bin下的,提前设置环境变量。
CN尽量使用访问的PC名称,其余的随意即可。
custom 自定义一个标识符(使用步骤2定义的即可)。
custom_store 自定义一个store名称。
365 过期时间。
步骤3 , keytool
-export -alias custom -file custom_name.crt -keystore custom_store.jks
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, 可选操作,将信任证书追加到jre的security的keystore中。
keytool -import -%JAVA_HOME%\jre\lib\security\cacerts -file custom_name.crt-alias custom
如果cacerts拒绝访问,则需要用管理员身份启动命令行窗口
http://blog.csdn.net/haohaodigua/article/details/21236373
相关文章推荐
- GlassFish Server 配置https访问方式(二)
- GlassFish Server配置https访问方式
- Windows Server 2008 R2 下配置证书服务器和HTTPS方式访问网站
- Windows Server 2008 R2 下配置证书服务器和HTTPS方式访问网站
- IIS7.0 Windows Server 2008 R2 下配置证书服务器和HTTPS方式访问网站的教程图文详解
- Tomcat如何配置Https访问方式
- 在Tomcat下配置HTTPS访问方式
- 无法启动GlassFish Server 4.1.1:服务器未运行时,HTTP或HTTPS监听程序端口已被占
- Centos6.5服务器环境搭建之安装Nginx以及Https访问方式的配置
- Nginx配置同一个域名http与https两种方式都可访问
- 配置Nginx以https方式访问
- Eclipse GlassFish Server 配置
- 在Apache配置https方式访问网站
- Nginx配置同一个域名同时支持http与https两种方式访问
- RDA 方式中用到的配置是VS2008与sql2008,还装有sql server ce 2.0,为什么安装后无法访问URL
- 在linux安装配置svn并实现支持ssl认证https安全访问方式
- 在Apache配置https方式访问网站
- web-xml与server-xml配置不同形成应用不同的访问方式
- nginx配置使用https方式访问
- laravel 配置全局采用https方式访问