日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問(wèn) 生活随笔!

生活随笔

當(dāng)前位置: 首頁(yè) > 编程资源 > 编程问答 >内容正文

编程问答

二级域名,https协议的申请配置

發(fā)布時(shí)間:2023/12/14 编程问答 21 豆豆
生活随笔 收集整理的這篇文章主要介紹了 二级域名,https协议的申请配置 小編覺(jué)得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.

1.?申請(qǐng)二級(jí)域名:

?????????????登錄阿里賬號(hào),點(diǎn)擊域名,解析域名,添加解析,加入前綴,ip

即可

?

2.?申請(qǐng)ca認(rèn)證書(shū)(實(shí)現(xiàn)安全協(xié)議https訪問(wèn)):

??????????????登錄阿里云賬號(hào) ?,點(diǎn)擊ca認(rèn)證申請(qǐng) ,購(gòu)買,選擇免費(fèi),提交申請(qǐng)(選系統(tǒng)生成),申請(qǐng)完成后進(jìn)行下載。然后進(jìn)行配置即可

在tomcat的目錄下創(chuàng)建一個(gè)cert文件夾,將下載的證書(shū)放置在下面

?

Tomcat未添加https的證書(shū)配置報(bào)錯(cuò):

Error parsing HTTP request header

?Note: further occurrences of HTTP header parsing errors will be logged at DEBUG level.

java.lang.IllegalArgumentException: Invalid character found in method name. HTTP method names must be tokens

?

?解除該配置

<Connector port="8443" protocol="org.apache.coyote.http11.Http11Protocol"

???????????????maxThreads="150" SSLEnabled="true" scheme="https" secure="true"

???????????????clientAuth="false" sslProtocol="TLS"

???????????????keystoreFile="cert/214683529790027.pfx"

???keystoreType="PKCS12"

???keystorePass="214683529790027"

???/>

?

?

配置即可? ? ?tomcat需要配置原鏈接www.baidu.com跳轉(zhuǎn)到https://www.baidu.com的方法

在conf/web.xml中最后一行添加:

②在web.xml末尾加上如下配置:

<security-constraint>

? ? <web-resource-collection >

? ? ? ? ? ? ? <web-resource-name >SSL</web-resource-name>

? ? ? ? ? ? ? <url-pattern>/*</url-pattern>

? ? ? ?</web-resource-collection>

? ? ? ?<user-data-constraint>

? ? ? ?<transport-guarantee>CONFIDENTIAL</transport-guarantee>

? ? ? ?</user-data-constraint>

</security-constraint>

?

nginx的配置為:

server {

listen 80;

server_name ?www.opennet.com.cn;

location ?/{

?rewrite ^(.*) https://$server_name$1 permanent;

}

?

?

}

?

server {

????listen 443;

????server_name www.opennet.com.cn;

????ssl on;

????root D:/opennet_website2;

????index index.html index.htm;

????ssl_certificate ??cert/1529411679067.pem;

????ssl_certificate_key ?cert/1529411679067.key;

????ssl_session_timeout 5m;

????ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:ECDHE:ECDH:AES:HIGH:!NULL:!aNULL:!MD5:!ADH:!RC4;

????ssl_protocols TLSv1 TLSv1.1 TLSv1.2;

????ssl_prefer_server_ciphers on;

????location / {

????????root D:/opennet_website2;

????????index index.html index.htm;

????}

}

?

?

?

總結(jié)

以上是生活随笔為你收集整理的二级域名,https协议的申请配置的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。

如果覺(jué)得生活随笔網(wǎng)站內(nèi)容還不錯(cuò),歡迎將生活随笔推薦給好友。