国产 无码 综合区,色欲AV无码国产永久播放,无码天堂亚洲国产AV,国产日韩欧美女同一区二区

解決The plain HTTP request was sent to HTTPS port

這篇具有很好參考價(jià)值的文章主要介紹了解決The plain HTTP request was sent to HTTPS port。希望對(duì)大家有所幫助。如果存在錯(cuò)誤或未考慮完全的地方,請(qǐng)大家不吝賜教,您也可以點(diǎn)擊"舉報(bào)違法"按鈕提交疑問(wèn)。

問(wèn)題

現(xiàn)在越來(lái)越多的網(wǎng)站要求http訪問(wèn)轉(zhuǎn)為更為安全的https訪問(wèn),很多使用nginx部署的前端應(yīng)用可以很方便的使用反向代理來(lái)實(shí)現(xiàn),切換后,用http訪問(wèn)就會(huì)出現(xiàn) "The plain HTTP request was sent to HTTPS port"的錯(cuò)誤頁(yè)面。

解決思路

將此錯(cuò)誤頁(yè)面重定向到指定的https地址即可

解決方法

假設(shè)端口號(hào)是8443:

server {
    listen 8443 ssl;
    ssl_certificate ssl_cert.pem;
    ssl_certificate_key ssl_server.key;
    server_name your_domain.com;
    error_page 497 https://$host$uri?$args;
    location / {
        ....
    }
}

另外,如果是自有域名,http和https端口都使用默認(rèn)端口的話,只要將http的請(qǐng)求重定向到https即可文章來(lái)源地址http://www.zghlxwxcb.cn/news/detail-515316.html

server {
    listen 80;
    listen 443 ssl;
    ssl_certificate ssl_cert.pem;
    ssl_certificate_key ssl_server.key;
    server_name your_domain.com;
    if ($scheme = http) {
        return 301 https://$host$uri?$args;
    }
    location / {
        ....
    }
}

到了這里,關(guān)于解決The plain HTTP request was sent to HTTPS port的文章就介紹完了。如果您還想了解更多內(nèi)容,請(qǐng)?jiān)谟疑辖撬阉鱐OY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!

本文來(lái)自互聯(lián)網(wǎng)用戶投稿,該文觀點(diǎn)僅代表作者本人,不代表本站立場(chǎng)。本站僅提供信息存儲(chǔ)空間服務(wù),不擁有所有權(quán),不承擔(dān)相關(guān)法律責(zé)任。如若轉(zhuǎn)載,請(qǐng)注明出處: 如若內(nèi)容造成侵權(quán)/違法違規(guī)/事實(shí)不符,請(qǐng)點(diǎn)擊違法舉報(bào)進(jìn)行投訴反饋,一經(jīng)查實(shí),立即刪除!

領(lǐng)支付寶紅包贊助服務(wù)器費(fèi)用

相關(guān)文章

  • 解決Mixed Content:the page at‘https://‘ was loaded over HTTPS,but requested an insecure resource ‘http

    解決Mixed Content:the page at‘https://‘ was loaded over HTTPS,but requested an insecure resource ‘http

    解決Mixed Content:the page at‘https://’ was loaded over HTTPS,but requested an insecure resource ‘http://’ 問(wèn)題:在Vue項(xiàng)目中使用axios訪問(wèn)了一個(gè)http協(xié)議的接口,報(bào)錯(cuò)如下 查資料后發(fā)現(xiàn)原因是在https中請(qǐng)求http接口或引入http資源都會(huì)被直接blocked(阻止),瀏覽器默認(rèn)此行為不安全,會(huì)攔截。

    2024年02月17日
    瀏覽(23)
  • The last packet sent successfully to the server was 0 milliseconds ago.問(wèn)題分析

    英文描述 The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server. 中文描述: 上次成功發(fā)送到服務(wù)器的數(shù)據(jù)包是0毫秒前。驅(qū)動(dòng)程序尚未從服務(wù)器收到任何數(shù)據(jù)包。 檢查db鏈接地址,如果db無(wú)法連接,那么會(huì)出現(xiàn)這個(gè)錯(cuò)誤,問(wèn)題描述為

    2024年02月11日
    瀏覽(19)
  • 解決MySQL報(bào)錯(cuò):“The last packet sent successfully to the server was 0 milliseconds ago.”

    com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure?The?last?packet sent successfully?to?the server was?0?milliseconds ago. The driver has?not?received?any?packets?from?the server. 問(wèn)題原因: 之所以出現(xiàn)異常,是由于數(shù)據(jù)庫(kù)回收了連接,而系統(tǒng)的緩沖池不知道,繼續(xù)使用被回收的連

    2024年02月08日
    瀏覽(27)
  • 已解決The last packet sent successfully to the server was 0 milliseconds ago. The driver has not receiv

    已解決The last packet sent successfully to the server was 0 milliseconds ago. The driver has not receiv

    注:此文章是在mysql8版本的前提下編寫的。 在我們使用springcloud在連接mysql數(shù)據(jù)庫(kù)時(shí),有時(shí)會(huì)碰到如下這種異常: 為此我上網(wǎng)查了不少資料,在這里小總結(jié)一下: 1. 連接url是否正確(自己看看useSSL是否為false): 2.數(shù)據(jù)庫(kù)服務(wù)是否打開: 找到MySql服務(wù): 3.網(wǎng)上最多解決的等待

    2024年01月16日
    瀏覽(20)
  • http請(qǐng)求https報(bào)錯(cuò):Mixed Content: The page at ‘xxx‘ was loaded over HTTPS, but requested an insecure...

    報(bào)錯(cuò)的提示: 翻譯成中文的話,意思大概就是,混用了 http 和 https 導(dǎo)致不安全,導(dǎo)致請(qǐng)求被阻止了...........。 報(bào)錯(cuò)的原因: 由于項(xiàng)目中后端提供的數(shù)據(jù)接口的地址是采用的 http 協(xié)議的,但是他們將項(xiàng)目部署到線上的時(shí)候,是放在 php服務(wù)器里面的,開啟了 https 訪問(wèn)協(xié)議。在

    2024年02月11日
    瀏覽(21)
  • 已解決—The connection to the server localhost:8080 was refused - did you specify the right host or port

    已解決—The connection to the server localhost:8080 was refused - did you specify the right host or port

    運(yùn)行?kubectl get namespace時(shí)報(bào)錯(cuò): [root@ip-10-0-0-8 ~]# kubectl get namespace E0320 07:39:20.866425 32422 memcache.go:265] couldn\\\'t get current server API group list: Get \\\"http://localhost:8080/api?timeout=32s\\\": dial tcp 127.0.0.1:8080: connect: connection refused .... The connection to the server localhost:8080 was refused - did you specify the righ

    2024年02月12日
    瀏覽(56)
  • 解決Mixed Content: The page at https://* was loaded over HTTPS, but requested an insecure XMLHttpReque

    目錄 項(xiàng)目場(chǎng)景 問(wèn)題描述 原因分析 解決方案 一些問(wèn)題 https協(xié)議的網(wǎng)站下請(qǐng)求http的資源 https協(xié)議的網(wǎng)站請(qǐng)求http協(xié)議的資源被瀏覽器任務(wù)不安全,請(qǐng)求被攔截并且報(bào)了以下錯(cuò)誤: 原文:? Mixed Content: The page at https://* was loaded over HTTPS, but requested an insecure XMLHttpRequest endpoint http:

    2024年02月02日
    瀏覽(20)
  • MySQL:The last packet sent successfully to the server was 0 milliseconds ago.

    出現(xiàn)異?!盩he last packet sent successfully to the server was 0 milliseconds ago.“的大部分原因是由于數(shù)據(jù)庫(kù)回收了連接,而系統(tǒng)的緩沖池不知道,繼續(xù)使用被回收的連接所致的 (1)使用JDBC URL中使用autoReconnect屬性 (2) 修改MySQL的參數(shù). /etc/my.cnf 添加? 將mysql回收空閑連接的時(shí)間變長(zhǎng),

    2024年02月03日
    瀏覽(21)
  • It looks like you are making an HTTP request to a Hadoop IPC port. This is not the correct port for

    It looks like you are making an HTTP request to a Hadoop IPC port. This is not the correct port for

    虛擬機(jī):Ubuntu18.04 hadoop:hadoop3.1.3 jdk:openjdk8 在虛擬機(jī)瀏覽器輸入localhost:9000報(bào)錯(cuò)如圖:? 具體:It looks like you are making an HTTP request to a Hadoop IPC port. This is not the correct port for the web interface on this daemon. ?一開始我的hadoop兩個(gè)配置文件重要代碼修改如下: 修改core-site.xml文件為:

    2024年02月03日
    瀏覽(28)

覺得文章有用就打賞一下文章作者

支付寶掃一掃打賞

博客贊助

微信掃一掃打賞

請(qǐng)作者喝杯咖啡吧~博客贊助

支付寶掃一掃領(lǐng)取紅包,優(yōu)惠每天領(lǐng)

二維碼1

領(lǐng)取紅包

二維碼2

領(lǐng)紅包