新域名访问方式从http改为https(为了支持微信小程序https用)
来源:互联网 发布:大数据主要来源于哪些 编辑:程序博客网 时间:2024/05/16 12:43
1.先申请一个ssl 证书,
可以在 startCom 网站上申请,具体网址如下:
https://www.startcomca.com/auth
参考链接:
https://www.freehao123.com/startssl-ssl-apache-ngnix/
后来发现在 startCom 上申请的证书,苹果ios10.0以上版本无法访问,所以后来又在腾讯上申请了ssl证书,免费有效期一年,一年后要付费。
付费价格如下:
https://cloud.tencent.com/document/product/400/7994?fromSource=symantecssl
2.jboss 部署 ssl证书
参考链接:
https://jingyan.baidu.com/article/fea4511a0fbf5df7bb9125b7.html
主要步骤如下:
a.生成keystore文件--keystore.jks;
b.导入服务器证书(包括导入根证书,导入CA证书,导入服务器证书[这个证书我没找到,没导入]);
导入命令:keytool -import -alias ca2 -keystore D:\gdca.jks -trustcacerts -file D:\ca2.cer -noprompt
c.证书导入完成,运行keytool -list -keystore D:\gdca.jks,查看keystore文件内容;
d. JBoss4/5/6版本:
复制已正确导入认证回复的gdca.jks文件到JBoss的server\default\conf目录,使用文本编辑器打开server.xml,找到并修改以下内容:
<!--
<Connector port="8443"……/>
-->
ps: 上面说的ssl证书方式是通过ca认证的。
还有一种简单的方式是,用java生成证书(在开发环境可以使用), Java提供相对简单的被称为keytool的命令行工具,可以简单地产生“自己签名”的证书。自己签名的证书只是用户产生的证书,没有正式在大家所熟知的认证权威那里注册过,因此不能确保它的真实性。但却能保证数据传输的安全性。
参考链接:
http://blog.csdn.net/sail_zhang/article/details/5669469
3.Apache上部署SSL服务器证书
参考链接:
https://jingyan.baidu.com/article/b907e627af19a946e7891cb3.html
还需修改 G:\Program Files\WebEvn\Apache\conf\extra的这个文件 httpd-ssl.conf。
<VirtualHost *:443>
SSLEngine on
SSLCertificateKeyFile "conf/ssl.key/www.domain.com.cn.key"
SSLCertificateFile "conf/ssl.crt/www.domain.com.cn.crt"
#---------------------------------------------------------------
DocumentRoot "D:/apache/htdocs"
ServerName www.domain.com.cn
ServerAdmin examplesoft@example-soft.com
ErrorLog "D:/apache/logs/wwwerror_ssl.log"
TransferLog "D:/apache/logs/wwwaccess_ssl.log
ProxyPass / http://192.168.2.77:8080/
ProxyPassReverse / http://192.168.2.77:8080/
<proxy *>
AllowOverride None
Order Deny,Allow
Allow from all
</proxy>
</VirtualHost>
<VirtualHost *:443>
SSLEngine on
SSLCertificateKeyFile "conf/ssl.key/www.domain.com.cn.key"
SSLCertificateFile "conf/ssl.crt/www.domain.com.cn.crt"
#---------------------------------------------------------------
DocumentRoot "D:/apache/htdocs"
ServerName app.domain.com.cn
ServerAdmin examplesoft@example-soft.com
ErrorLog "D:/apache/logs/apperror_ssl.log"
TransferLog "D:/apache/logs/appaccess_ssl.log
ProxyPass /bdp http://192.168.1.111:7119/bdp
ProxyPassReverse /bdp http://192.168.1.111:7119/bdp
<proxy *>
AllowOverride None
Order Deny,Allow
Allow from all
</proxy>
</VirtualHost>
- 新域名访问方式从http改为https(为了支持微信小程序https用)
- Nginx配置域名同时支持 https 和 http 访问
- tomcat同时支持http和https访问
- 将CAS https认证的方式改为http
- 将CAS的HTTPS认证方式改为HTTP
- 【SSO-CAS】将CAS https认证的方式改为http
- android httpClient 支持HTTPS的访问方式
- android httpClient 支持HTTPS的访问方式
- apache支持https访问
- Tomcat配置Https域名访问
- http转https访问
- HTTPS 方式访问网站
- 从HTTP到HTTPS
- 从 HTTP 到 HTTPS
- 从 HTTP 到 HTTPS
- http域名跳转到https域名
- NSURLConnection怎么把http改为https
- 在Tomcat中同时支持http和https访问
- MySQL 中 delete 语句的子查询限制
- Java实现简单插入排序
- python emoji 表情过滤
- C++11中的std::function,Lambda表达式
- Eclipse上red5插件安装
- 新域名访问方式从http改为https(为了支持微信小程序https用)
- lintcode刷题——搜索旋转排序数组
- 消息摘要、数字签名、数字证书
- Gym 101190F Foreign Postcards
- javaScript实现小球碰撞
- git学习3
- 合法IP地址的判断、关于给定字符串,求最大不重复子串 -- JAVA 算法题
- 【快搭】springboot+jsp
- (二)UI Automator测试项目的建立