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

                合規國際互聯網加速 OSASE為企業客戶提供高速穩定SD-WAN國際加速解決方案。 廣告
                [toc] 場景:微信開發只能在服務器上開發,不方便調試。反向代理后,可以在本地進行開發和調試。 >[info]軟件下載的鏈接:http://download.csdn.net/download/qq\_33862644/10220524 ## :-: **設置流程** ### :-: **1、線上設置** ![](https://box.kancloud.cn/f0cb8310220f7584217f6e232472c0d3_573x418.png) ![](https://box.kancloud.cn/8b03673cd8151bd26a16c368302148a2_562x678.png) 然后輸入幾條命令: ``` shell ssh -L 0.0.0.0:80:127.0.0.1:80 root@127.0.0.1 ss -ntl 查看所有使用中的端口 ps aux 查看所有進程 ``` 編輯服務器上面的/etc/ssh/sshd_config 搜索gatewayports 將gatewayports 改為yes >[warning]這時你會發現輸入:netstat -nltp指令。看見的80端口,后面不再是nginx了 ### :-: **2、本地設置** ![](https://box.kancloud.cn/c410883f5378098a58cd56ac5729b1b5_659x386.png) ~~~ #好評返現 server { listen 80 default_server; server_name test; root "D:/phpStudy/WWW/hpfx/public"; location / { index index.html index.htm index.php; autoindex on; # 偽靜態配置 if (!-e $request_filename) { rewrite ^(.*)$ /index.php?s=$1 last; break; } } location ~ \.php(.*)$ { fastcgi_pass 127.0.0.1:9000; fastcgi_index index.php; fastcgi_split_path_info ^((?U).+\.php)(.+)$; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_param PATH_INFO $fastcgi_path_info; fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info; include fastcgi_params; fastcgi_param TP_ENV sixian; } } ~~~ ### :-: **3、測試** 瀏覽器中輸入127.0.0.1,然后修改本地代碼 ![](https://box.kancloud.cn/bd25cb45728b136d9ff67b0db593225d_982x155.png) ## :-: **開啟/關閉反向代理的步驟** - 使用本地(開啟):打開Bitvise SSH Client軟件。線上就可以直接訪問本地了 >[warning]線上nginx要關閉,因為線上的80端口是給Bitvise SSH Client軟件使用的(占用了80端口,替代了nginx) - 使用線上(關閉):關閉Bitvise SSH Client軟件,開啟線上的nginx ## :-: **原理** - 微信服務器把請求發給線上服務器。線上服務器把請求發到了你本地服務器(如 phpstudy的ngxin)。這樣就可以直接用本地的項目和微信服務器交互。 - 只不過是把項目部署到了線上,真正訪問的服務器是你本地服務器。 - vhost中的配置也是需要的,因為線上的nginx關閉后,項目需要一個服務器,這時候用的就是你本地服務器了
                  <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>

                              哎呀哎呀视频在线观看