<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                ThinkChat2.0新版上線,更智能更精彩,支持會話、畫圖、視頻、閱讀、搜索等,送10W Token,即刻開啟你的AI之旅 廣告
                將域名www.opqnext.com的證書文件1*www.opqnext.com*bundle.crt 、私鑰文件2\_www.opqnext.com.key保存到同一個目錄,例如/usr/local/nginx/conf目錄下。 更新Nginx根目錄下 conf/nginx.conf 文件如下: ~~~ server { listen 443; server_name www.opqnext.com; #填寫綁定證書的域名 ssl on; ssl_certificate 1_www.opqnext.com_bundle.crt; ssl_certificate_key 2_www.opqnext.com.key; ssl_session_timeout 5m; ssl_protocols TLSv1 TLSv1.1 TLSv1.2; #按照這個協議配置 ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:HIGH:!aNULL:!MD5:!RC4:!DHE;#按照這個套件配置 ssl_prefer_server_ciphers on; location / { root html; #站點目錄 index index.html index.htm; } } ~~~ | 配置文件參數 | 說明 | | --- | --- | | listen 443 | SSL訪問端口號為443 | | ssl on | 啟用ssl功能 | | ssl\_certificate | 證書文件 | | ssl\_certificate\_key | 私鑰文件 | | ssl\_protocols | 使用的協議 | | ssl\_ciphers | 配置加密套件,寫法遵循openssl標準 | 然后 nginx -t 檢測配置文件 nginx -s reload 重啟nginx就OK了 我是這么想的,但是還是出現了問題... * 問題1:unknown directive "ssl" 報錯如下: ~~~ nginx: [emerg] unknown directive "ssl" in /usr/local/nginx/conf/vhost/blog.com.conf:5 nginx: configuration file /usr/local/nginx/conf/nginx.conf test failed ~~~ 出現這個錯誤說明沒有將ssl模塊編譯進nginx,在configure的時候加上“–with-http\_ssl\_module”即可 詳細一點: > ####### 下載你當前版本的nginx包,并且解壓 進到目錄 > ./configure --with-http\_ssl\_module > ####### 切記千萬不要make install 那樣就覆蓋安裝了 > make > ####### 將原來的nginx備份 備份之前先kill當前正在啟動的nginx > cp /usr/local/nginx/sbin/nginx /usr/local/nginx/sbin/nginx.bak > ####### make之后會在當前目錄生成 objs 目錄 > cp objs/nginx /usr/local/nginx/sbin/nginx > ####### 然后重新啟動nginx > /usr/local/nginx/sbin/nginx * 問題2:http 轉到 https 據說是有加rewrite的方法: ~~~ rewrite ^/(.*)$ http://domain.com/$1 permanent; ~~~ 但是好像現在nginx新版本已經換了種寫法: ~~~ server { listen 80; server_name www.opqnext.com; return 301 https://$server_name$request_uri; } server { listen 443 ssl; server_name www.opqnext.com; [....] } ~~~
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看