<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之旅 廣告
                在阿里云或者騰訊云上都可以獲取到一年免費的證書,但審核還是比較麻煩,而且一年后還是要收費的。因此這里提供一個自己制作證書的教程。 自發證書的好處就是免費,簡單不需要審核。缺點就是瀏覽器不認你的證書,訪問時會提示這個: ![](https://box.kancloud.cn/a0384a41fc0c51a33f84e6c326e14f2e_758x568.png) 只有點擊高級 ![](https://box.kancloud.cn/cc59104de631dde89c59f3f7c7c84643_651x252.png) 然后點擊繼續前往才能訪問到網站 ![](https://box.kancloud.cn/fb27b1fd18d51b8201efce6c856943cf_371x109.png) 因此這種方式只適合用于一些接口調用,如小程序等,或者團隊內部使用。 驗證當前服務器是否安裝了openssl: ~~~ /alidata/server/nginx/sbin/nginx -V rpm -qa | grep openssl ~~~ 查看openssl版本 ~~~ openssl version -a ~~~ 1.0.2以下的版本就要升級,之前的版本官方都已經停止維護,升級方法見下一章節:[openssl升級到1.02](OpenSSL升級到1.02.md) 創建證書 ~~~ cd /root openssl genrsa -out cert.key 2048 openssl req -new -x509 -key cert.key -out cert.pem ~~~ ![](https://box.kancloud.cn/65f01e08d2e0c93fdf81e5f88045705b_637x282.png) 創建https文件 ~~~ cd /alidata/server/nginx/conf/vhosts vi safe.conf ~~~ 在safe.conf 增加以下內容: ~~~ server { listen 443; server_name safe.weiphp.cn; index index.php; root /htdocs/safe; ssl on; ssl_certificate /root/cert.pem; ssl_certificate_key /root/cert.key; ssl_session_timeout 5m; ssl_protocols SSLv1.2 SSLv1.1 TLSv1; ssl_prefer_server_ciphers on; location ~ \.php { #fastcgi_pass unix:/tmp/php-cgi.sock; fastcgi_pass 127.0.0.1:9000; fastcgi_split_path_info ^(.+\.php)(.*)$; fastcgi_param PATH_INFO $fastcgi_path_info; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; include fastcgi.conf; } location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$ { expires 30d; } location ~ .*\.(js|css)?$ { expires 1h; } access_log /alidata/log/nginx/access/safe.log; } ~~~ 然后保存退出 ~~~ :wq ~~~ 最后重啟nginx: ~~~ /etc/init.d/nginx reload ~~~ 查看當前服務器的防火墻是否已經開啟: 如果顯示下面的提示說明沒開啟,這樣的話這一步略過 ![](https://box.kancloud.cn/114d15ec8202533ed31dac71ac603de0_477x32.png) 如果已經開啟,需要把443端口設置為開放狀態: ~~~ iptables -I INPUT -p tcp --dport 443 -j ACCEPT service iptables save ~~~ 最后把上面的域名(safe.weiphp.cn)配置指向到當前服務器,然后在/htdocs/safe目錄下部署我們之前的WeiApp(原名weicms)系統代碼或者自己的系統代碼就可以了 如果在小程序開發工具里提示這個錯誤: ~~~ 小程序要求的 TLS 版本必須大于等于 1.2 ~~~ ![](image/screenshot_1483688205718.png) 只需要在開發環境,項目---》勾選不校驗即可 ![](image/screenshot_1483688333247.png)
                  <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>

                              哎呀哎呀视频在线观看