溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊(cè)×
其他方式登錄
點(diǎn)擊 登錄注冊(cè) 即表示同意《億速云用戶服務(wù)條款》

關(guān)于錯(cuò)誤代碼107(err_ssl_protocol_error)SSL協(xié)議出錯(cuò)的解決方案是什么

發(fā)布時(shí)間:2021-12-08 09:38:07 來(lái)源:億速云 閱讀:2175 作者:柒染 欄目:網(wǎng)絡(luò)安全

關(guān)于錯(cuò)誤代碼107(err_ssl_protocol_error)SSL協(xié)議出錯(cuò)的解決方案是什么,相信很多沒(méi)有經(jīng)驗(yàn)的人對(duì)此束手無(wú)策,為此本文總結(jié)了問(wèn)題出現(xiàn)的原因和解決方法,通過(guò)這篇文章希望你能解決這個(gè)問(wèn)題。

關(guān)于錯(cuò)誤代碼107(err_ssl_protocol_error)SSL 協(xié)議出錯(cuò)的解決方案

火狐瀏覽器訪問(wèn) https://www.abc.com 出現(xiàn)一個(gè)很怪異的問(wèn)題,報(bào)錯(cuò):

ssl 107 (net::ERR_SSL_PROTOCOL_ERROR)

剛開(kāi)始以為是ssl失效了,重新安裝了一遍

安裝過(guò)程:

第一步# openssl genrsa -des3 -out server1.key 1024
Generating RSA private key, 1024 bit long modulus
……++++++
……..++++++
e is 65537 (0x10001)
Enter pass phrase for server1.key:此處設(shè)置個(gè)密碼
Verifying – Enter pass phrase for server1.key:重新輸入設(shè)置個(gè)密碼

第二步# openssl req -new -key server1.key -out server1.csr
Enter pass phrase for server1.key:
You are about to be asked to enter information that will be incorporated
into your certificate request.
What you are about to enter is what is called a Distinguished Name or a DN.
There are quite a few fields but you can leave some blank
For some fields there will be a default value,
If you enter ‘.’, the field will be left blank.
—–
Country Name (2 letter code) [GB]:CN
State or Province Name (full name) [Berkshire]:Beijing
Locality Name (eg, city) [Newbury]:Beijing
Organization Name (eg, company) [My Company Ltd]:xo
Organizational Unit Name (eg, section) []:xo
Common Name (eg, your name or your server’s hostname) []:xo
Email Address []:

Please enter the following ‘extra’ attributes
to be sent with your certificate request
A challenge password []:此處回車
An optional company name []:此處回車

第三步:#cp server1.key server1.key.org

第四步:# openssl rsa -in server1.key.org -out server1.key
Enter pass phrase for server1.key.org:此處輸入剛才設(shè)置的密碼
writing RSA key

第五步:]# openssl x509 -req -days 365 -in server1.csr -signkey server1.key -out server1.crt
Signature ok
subject=/C=CN/ST=Beijing/L=Beijing/O=xo/OU=xo/CN=xo
Getting Private key

安裝完ssl,配置nginx虛擬主機(jī)

server
{
listen 80;
server_name  www.abc.com;
root /data0/htdocs/zhaolilei;
index index.html index.PHP;
rewrite ^/  https://www.abc.com permanent;

location ~ .*\.(php|php5)?$
{
#fastcgi_pass  unix:/tmp/php-cgi.sock;
fastcgi_pass  127.0.0.1:9000;
fastcgi_index index.php;
include fcgi.conf;
}
access_log /data1/logs/test1.log;
}

server
{
listen 443;
server_name  www.abc.com;
root /data0/htdocs/zhaolilei;
index index.html index.php;

ssl on;
ssl_certificate server.crt;
ssl_certificate_key server.key;

location ~ .*\.(php|php5)?$
{
#fastcgi_pass  unix:/tmp/php-cgi.sock;
fastcgi_pass  127.0.0.1:9000;
fastcgi_index index.php;
include fcgi.conf;
}
access_log /data1/logs/test.log;
}

配置完后訪問(wèn)測(cè)試,依然是報(bào)錯(cuò),后來(lái)在網(wǎng)上查了N多資料也沒(méi)有個(gè)說(shuō)法

靜下來(lái)想想,這個(gè)之前是好用的,最近貌似只升級(jí)過(guò)nginx版本為1.2.1,難道與版本有關(guān),新版本的nginx有一些規(guī)則改了,比如:日志格式要放在虛擬主機(jī)上邊定義,后可官網(wǎng)也沒(méi)有查出相關(guān)問(wèn)題。猜想會(huì)不會(huì)與虛擬主機(jī)的順序有關(guān),我這里先配置的80,后配置的443

經(jīng)過(guò)測(cè)試,果然如此,把443的虛擬主機(jī)放置到80的上邊,重啟nginx,訪問(wèn)OK了

看完上述內(nèi)容,你們掌握關(guān)于錯(cuò)誤代碼107(err_ssl_protocol_error)SSL協(xié)議出錯(cuò)的解決方案是什么的方法了嗎?如果還想學(xué)到更多技能或想了解更多相關(guān)內(nèi)容,歡迎關(guān)注億速云行業(yè)資訊頻道,感謝各位的閱讀!

向AI問(wèn)一下細(xì)節(jié)

免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如果涉及侵權(quán)請(qǐng)聯(lián)系站長(zhǎng)郵箱:is@yisu.com進(jìn)行舉報(bào),并提供相關(guān)證據(jù),一經(jīng)查實(shí),將立刻刪除涉嫌侵權(quán)內(nèi)容。

ssl
AI