溫馨提示×

溫馨提示×

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

密碼登錄×
登錄注冊×
其他方式登錄
點擊 登錄注冊 即表示同意《億速云用戶服務條款》
  • 首頁 > 
  • 教程 > 
  • 網絡安全 > 
  • 關于錯誤代碼107(err_ssl_protocol_error)SSL協議出錯的解決方案是什么

關于錯誤代碼107(err_ssl_protocol_error)SSL協議出錯的解決方案是什么

發布時間:2021-12-08 09:38:07 來源:億速云 閱讀:2306 作者:柒染 欄目:網絡安全

關于錯誤代碼107(err_ssl_protocol_error)SSL協議出錯的解決方案是什么,相信很多沒有經驗的人對此束手無策,為此本文總結了問題出現的原因和解決方法,通過這篇文章希望你能解決這個問題。

關于錯誤代碼107(err_ssl_protocol_error)SSL 協議出錯的解決方案

火狐瀏覽器訪問 https://www.abc.com 出現一個很怪異的問題,報錯:

ssl 107 (net::ERR_SSL_PROTOCOL_ERROR)

剛開始以為是ssl失效了,重新安裝了一遍

安裝過程:

第一步# 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:此處設置個密碼
Verifying – Enter pass phrase for server1.key:重新輸入設置個密碼

第二步# 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:此處輸入剛才設置的密碼
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虛擬主機

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;
}

配置完后訪問測試,依然是報錯,后來在網上查了N多資料也沒有個說法

靜下來想想,這個之前是好用的,最近貌似只升級過nginx版本為1.2.1,難道與版本有關,新版本的nginx有一些規則改了,比如:日志格式要放在虛擬主機上邊定義,后可官網也沒有查出相關問題。猜想會不會與虛擬主機的順序有關,我這里先配置的80,后配置的443

經過測試,果然如此,把443的虛擬主機放置到80的上邊,重啟nginx,訪問OK了

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

向AI問一下細節

免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。

ssl
AI

亚洲午夜精品一区二区_中文无码日韩欧免_久久香蕉精品视频_欧美主播一区二区三区美女