{"id":1090,"date":"2020-12-31T18:48:56","date_gmt":"2020-12-31T09:48:56","guid":{"rendered":"https:\/\/bellsprite.com\/?p=1090"},"modified":"2022-10-30T14:47:22","modified_gmt":"2022-10-30T05:47:22","slug":"%e6%97%a0%e6%96%ad%e7%82%b9%ef%bc%8c%e4%b8%8d%e7%bc%96%e7%a8%8b","status":"publish","type":"post","link":"https:\/\/bellsprite.com\/?p=1090","title":{"rendered":"\u65e0\u65ad\u70b9\uff0c\u4e0d\u7f16\u7a0b"},"content":{"rendered":"<p>\u6211\u5bf9\u5f00\u53d1\u73af\u5883\u7684\u57fa\u672c\u8981\u6c42\u4e4b\u4e00\u662f\u53ef\u4ee5\u4e0b\u65ad\u70b9\u5355\u6b65\u8c03\u8bd5\u3002\u8fd9\u5f88\u57fa\u7840\uff0c\u5374\u5f88\u91cd\u8981\u3002<\/p>\n<p>\u4ee3\u7801\u81ea\u52a8\u8865\u5168\u548c\u65ad\u70b9\u8c03\u8bd5\u529f\u80fd\u4e8c\u9009\u4e00\uff1f<br \/>\n\u6211\u9009\u65ad\u70b9\u3002<\/p>\n<p>\u70b9\u51fb\u51fd\u6570\u6216\u53d8\u91cf\u81ea\u52a8\u8df3\u8f6c\u5230\u58f0\u660e\u5904\u548c\u65ad\u70b9\u8c03\u8bd5\u529f\u80fd\u4e8c\u9009\u4e00\uff1f<br \/>\n\u6211\u9009\u65ad\u70b9\u3002<\/p>\n<p>\u9759\u6001\u7c7b\u578b\u63a8\u5bfc\uff0c\u7f16\u8bd1\u65f6\u7c7b\u578b\u68c0\u67e5\u548c\u65ad\u70b9\u8c03\u8bd5\u529f\u80fd\u4e8c\u9009\u4e00\uff1f<br \/>\n\u55ef\uff0c\u662f\u4e2a\u96be\u9898\u3002<\/p>\n<p>\u8fd9\u6837\u8bb2\u5e94\u8be5\u8db3\u4ee5\u89e3\u91ca\u65ad\u70b9\u8c03\u8bd5\u80fd\u529b\u5728\u6211\u5fc3\u4e2d\u7684\u5730\u4f4d\u4e86\u5427\u3002<\/p>\n<p>\u4e3a\u4ec0\u4e48\u7a81\u7136\u60f3\u8d77\u8bf4\u8fd9\u4ef6\u4e8b\u5462\uff0c\u662f\u56e0\u4e3a\u6628\u5929\u665a\u4e0a\u6211\u4e3a\u4e86\u7ed9\u6211\u7684 php \u5f00\u53d1\u73af\u5883\u5b89\u88c5 xdebug \u6298\u817e\u4e86\u4e00\u5bbf\uff0c\u6709\u611f\u800c\u53d1\u4e86\u3002<\/p>\n<p>\u6309\u8bf4\u7ed9 php \u5b89 xdebug \u80fd\u6709\u591a\u96be\u5462\uff1f\u786e\u5b9e\u4e0d\u96be\uff0c\u6211\u5728\u516c\u53f8\u548c\u4e2a\u4eba\u73af\u5883\u91cc\u4e5f\u5b89\u8fc7\u5f88\u591a\u6b21\u4e86\uff0c\u57fa\u672c\u6ca1\u9047\u5230\u8fc7\u592a\u5927\u56f0\u96be\u3002\u53ef\u6628\u5929\u7684\u60c5\u51b5\u6bd4\u8f83\u7279\u6b8a\uff0c\u751a\u81f3\u582a\u79f0\u6781\u7aef\uff0c\u771f\u7684\u662f\u628a\u4e00\u4e2a\u7b80\u5355\u7684\u95ee\u9898\u62d4\u9ad8\u5230\u4e86\u9762\u8bd5\u9898\u7684\u6c34\u5e73\u3002<\/p>\n<p>\u4e8b\u60c5\u7684\u8d77\u56e0\u662f\uff0c\u6211\u60f3\u5728\u5143\u65e6\u5047\u671f\u91cc\u5b66\u4e60\u4e00\u4e0b laravel\u3002\u6700\u65b0\u7684 laravel \u6846\u67b6\u8981\u6c42 php \u7248\u672c\u5728 7.2 \u4ee5\u4e0a\uff0c\u5916\u52a0\u4e00\u4e9b\u5176\u4ed6\u7684\u4f9d\u8d56\u9879\u3002\u6211\u8fd9\u4e2a\u535a\u5ba2\u662f\u8fd0\u884c\u5728\u4e00\u4e2a web hosting \u670d\u52a1\u5668\u4e0a\u7684\uff0c\u60f3\u52a8\u670d\u52a1\u5668\u914d\u7f6e\u5e76\u4e0d\u5bb9\u6613\u3002\u6211\u5e38\u7528\u7684 vps \u662f\u670b\u53cb\u4e70\u7684\uff0c\u6211\u672c\u8eab\u662f\u501f\u5bbf\u5728\u90a3\u91cc\uff0c\u4e5f\u4e0d\u60f3\u592a\u7834\u574f\u4ed6\u7684\u73af\u5883\u3002\u6700\u7ec8\u6211\u9009\u62e9\u5728 vps \u4e0a\u7528 docker \u5b9e\u73b0\u4e00\u4e2a\u6ee1\u8db3 laravel \u8981\u6c42\u7684\u5f00\u53d1\u73af\u5883\uff0c\u800c\u8fd9\u6b63\u662f\u5669\u68a6\u7684\u5f00\u59cb\u3002<\/p>\n<p>\u5728 docker \u91cc\u8dd1 php\uff0c\u8fd9\u4e2a php container \u66b4\u9732\u7ed9\u5916\u754c\u8bbf\u95ee\u7684\u7aef\u53e3\u5c31\u4e0d\u80fd\u662f 80 \u4e86\u3002\u5047\u8bbe\u66b4\u9732\u7ed9\u5916\u754c\u8bbf\u95ee\u7684\u7aef\u53e3\u662f 8080\uff0c\u6211\u8bbf\u95ee\u8fd9\u4e2a docker \u5185\u7684 php \u6587\u4ef6\u7684\u65b9\u5f0f\u5c31\u662f <span style=\"background-color: #f0f0f0;\">http:\/\/my.vps:8080\/path\/to\/file<\/span> \uff0c\u770b\u8d77\u6765\u6709\u70b9\u4e11\u4e0d\u662f\u4e48\u3002\u4e3a\u4e86\u7f8e\u5316\u8fd9\u4e2a url\uff0c\u6211\u4fee\u6539\u4e86 vps \u672c\u673a\u7684 apache \u8bbe\u7f6e\uff0c\u7ed9\u8fd9\u4e2a 8080 \u7aef\u53e3\u914d\u7f6e\u4e86\u4e00\u4e2a\u8f6c\u53d1\u7528\u7684\u5b50\u76ee\u5f55 docker\uff0c\u8fd9\u6837\u6211\u53ef\u4ee5\u901a\u8fc7 <span style=\"background-color: #f0f0f0;\">http:\/\/my.vps\/docker\/path\/to\/file<\/span> \u7684 url \u6765\u8bbf\u95ee docker\u3002\u600e\u4e48\u6837\uff0c\u597d\u770b\u591a\u4e86\u5427\uff0c\u54c8\u54c8\uff01<\/p>\n<p>\u5230\u8fd9\u4e00\u6b65\u505a\u5b8c\uff0c\u6211\u624d\u5f00\u59cb\u914d\u7f6e xdebug\uff0c\u800c\u8fd9\u65f6\uff0c\u6211\u7684 IDE \u548c\u76ee\u6807 php \u670d\u52a1\u4e4b\u95f4\u5df2\u7ecf\u9694\u4e86\u4e24\u5c42\u4e86\u3002<\/p>\n<p>&nbsp;<\/p>\n<p><a href=\"https:\/\/bellsprite.com\/blog\/wp-content\/uploads\/2020\/12\/1-1.png\"><img loading=\"lazy\" decoding=\"async\" class=\"kira-image-border wp-image-1091 size-full aligncenter\" src=\"https:\/\/bellsprite.com\/blog\/wp-content\/uploads\/2020\/12\/1-1.png\" alt=\"\" width=\"1225\" height=\"256\" srcset=\"https:\/\/bellsprite.com\/wp-content\/uploads\/2020\/12\/1-1.png 1225w, https:\/\/bellsprite.com\/wp-content\/uploads\/2020\/12\/1-1-300x63.png 300w, https:\/\/bellsprite.com\/wp-content\/uploads\/2020\/12\/1-1-1024x214.png 1024w, https:\/\/bellsprite.com\/wp-content\/uploads\/2020\/12\/1-1-768x160.png 768w\" sizes=\"auto, (max-width: 1225px) 100vw, 1225px\" \/><\/a><\/p>\n<p>\u51b7\u9759\uff01\u4ed4\u7ec6\u60f3\u60f3\uff0c\u5c31\u7b97\u4e0d\u7ed9 apache \u914d\u7f6e ProxyPass\uff0c\u5b83\u5230 php \u4e4b\u95f4\u4e5f\u662f\u4f1a\u9694\u4e00\u5c42\u7684\u5440\uff0c\u6240\u4ee5\u8fd9\u4e0d\u7b97\u662f\u589e\u52a0\u96be\u5ea6\u3002\u5443\uff0c\u4f46\u662f\u7b97\u4e0a ProxyPassReverse \u8bbe\u7f6e\uff0c\u6211\u7684 http header \u5728\u4e2d\u95f4\u88ab\u6539\u6765\u6539\u53bb\u7684\uff0c\u8fd8\u662f\u589e\u52a0\u4e86\u4e0d\u7a33\u5b9a\u56e0\u7d20\u3002\u53cd\u6b63\u5148\u8bd5\u8bd5\u518d\u8bf4\u5427\u3002<\/p>\n<p>\u4e00\u8bd5\u679c\u7136\u4e0d\u884c\uff0c\u8fde\u4e0d\u901a\u3002<\/p>\n<p>\u90a3\u5c31\u4e0d\u7740\u6025\u4e86\uff0c\u5148\u4ece\u5934\u634b\u4e00\u904d\u901a\u4fe1\u6d41\u7a0b\u5427\u3002\u9644\u4e0a\u6211\u6700\u559c\u6b22\u7684 xdebug \u901a\u4fe1\u6d41\u7a0b\u56fe\u3002<\/p>\n<p><a href=\"https:\/\/bellsprite.com\/blog\/wp-content\/uploads\/2020\/12\/dbgp-setup.gif\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-1092 size-full\" src=\"https:\/\/bellsprite.com\/blog\/wp-content\/uploads\/2020\/12\/dbgp-setup.gif\" alt=\"\" width=\"582\" height=\"222\" \/><\/a><\/p>\n<p>\u770b\u6837\u5b50\u6d4f\u89c8\u5668\u5230 php\/Xdebug \u8fd9\u90e8\u5206\u901a\u4fe1\u65f6\u6ca1\u95ee\u9898\u7684\uff0c\u95ee\u9898\u51fa\u5728 xdebug \u60f3\u56de\u62e8\u7ed9\u6211\u7684\u65f6\u5019\u3002<\/p>\n<p>\u67e5\u4e86\u4e00\u4e0b\uff0c\u6211\u7528\u7684 PhpStorm \u7684\u6587\u6863\u91cc\u6709<a href=\"https:\/\/www.jetbrains.com\/help\/phpstorm\/remote-debugging-via-ssh-tunnel.html#set-up-an-ssh-tunnel-to-the-remote-machine\">\u8fdc\u7a0b\u8c03\u8bd5 php \u65f6\u7684\u6307\u5bfc\u65b9\u6848<\/a>\uff1a<\/p>\n<pre><span class=\"token function\">ssh<\/span> -R <span class=\"token number\">9000<\/span>:localhost:9000 username@hostname<\/pre>\n<p>\u601d\u8def\u662f\u8ba9 xdebug \u56de\u62e8\u7684\u65f6\u5019\u8bbf\u95ee\u670d\u52a1\u5668\u7aef\u7684 9000 \u7aef\u53e3\uff0c\u540c\u65f6\u628a\u670d\u52a1\u5668\u7aef\u7684 9000 \u7aef\u53e3\u53cd\u5411\u4ee3\u7406\u5230\u6211\u7684 PhpStorm \u6240\u5728\u672c\u5730\u4e3b\u673a\u7684 9000 \u7aef\u53e3\uff0c\u8fd9\u6837\u670d\u52a1\u5668\u7aef xdebug \u7684\u56de\u62e8\u53ef\u4ee5\u6700\u7ec8\u88ab\u5728\u672c\u5730\u76d1\u542c 9000 \u7aef\u53e3\u7684 PhpStorm \u63a5\u6536\u5230\uff0c\u5f88\u5408\u7406\u3002<\/p>\n<p>\u4e0d\u8fc7\u6211\u7684\u73af\u5883\u91cc\u8fd8\u6d89\u53ca\u5230\u4e86 docker\uff0c\u600e\u4e48\u8ba9 docker \u5bb9\u5668\u5185\u7684 xdebug \u7684\u8fde\u63a5\u8bf7\u6c42\u8f6c\u53d1\u5230\u5916\u90e8\u5bbf\u4e3b\u4e0a\u5462\uff1f\u56e0\u4e3a\u6211\u662f\u7528 docker-compose \u521b\u5efa\u7684 docker\uff0c\u6240\u4ee5\u6211\u9996\u5148\u5c1d\u8bd5\u7528 docker-compose \u81ea\u5e26\u7684 container \u5230\u4e3b\u673a\u7684<a href=\"https:\/\/github.com\/compose-spec\/compose-spec\/blob\/master\/spec.md#ports\">\u7aef\u53e3\u6620\u5c04\u65b9\u6cd5<\/a>\u3002<\/p>\n<pre>ports:\r\n\u00a0 - 9000:9000<\/pre>\n<p>\u7ed3\u679c\u5728 docker \u542f\u52a8\u65f6 ssh \u7684\u53cd\u5411\u4ee3\u7406\u65e0\u6cd5\u7ed1\u5b9a\u5230\u670d\u52a1\u5668\u7aef\u7684 9000 \u7aef\u53e3\uff0c\u8fd9\u62db\u4e0d\u884c\u3002\u4e3a\u4e86\u786e\u8ba4\u539f\u56e0\uff0c\u6211\u5728 docker \u5bb9\u5668\u5185\u548c\u5bbf\u4e3b\u670d\u52a1\u5668\u4e0a\u5206\u522b\u7528 tcpdump \u6d4b\u8bd5 9000 \u7aef\u53e3\u4e0a\u7684\u901a\u4fe1\u5185\u5bb9\u3002\u7ed3\u679c\u663e\u793a docker \u5bb9\u5668\u5185\u7684 9000 \u7aef\u53e3\u4e0a\u786e\u5b9e\u6709\u901a\u4fe1\uff0c\u4f46\u5bbf\u4e3b\u670d\u52a1\u5668\u7684 9000 \u7aef\u53e3\u4e0a\u6ca1\u6709\u4efb\u4f55\u901a\u4fe1\u3002\u770b\u6765 docker-compose \u7684 ports \u662f\u4e13\u95e8\u7528\u6765\u8ba9\u5bbf\u4e3b\u8bbf\u95ee\u5bb9\u5668\u4f7f\u7528\u7684\uff0c\u53cd\u8fc7\u6765\u884c\u4e0d\u901a\u3002<\/p>\n<pre>sudo tcpdump -i any port 9000<\/pre>\n<p>\u6211\u77e5\u9053 mac \u7248\u7684 docker \u5bb9\u5668\u8bbf\u95ee\u5bbf\u4e3b ip \u6709\u4e00\u4e2a docker.for.mac.localhost \u7684 hostname \uff0c\u4f46\u662f\u5728 linux \u73af\u5883\u91cc\u5bf9\u5e94\u7684 host.docker.internal \u4e0d\u77e5\u9053\u4e3a\u4ec0\u4e48\u6ca1\u6709\u88ab\u5b9a\u4e49\u3002<\/p>\n<p>\u7b97\u4e86\u66b4\u529b\u70b9\u76f4\u63a5\u62ff ip \u5427\uff01\u6211\u5728 docker \u91cc\u505a\u4e86\u4e00\u4e2a\u663e\u793a\u8bf7\u6c42\u65b9 ip \u7684 php \u9875\u9762\uff0c\u7c7b\u4f3c\u4e8e\u4e0b\u9762\u8fd9\u6837\uff1a<\/p>\n<pre>&lt;?php\r\necho $_SERVER[REMOTE_ADDR];<\/pre>\n<p>\u53d6\u5230\u7684 ip \u662f 172.19.0.1 \u3002\u4e4b\u540e\u53cd\u590d\u91cd\u542f docker \u8bd5\u4e86\u51e0\u6b21\uff0cip \u6ca1\u53d8\uff0c\u5e94\u8be5\u662f\u95ee\u9898\u4e0d\u5927\u4e86\uff0c\u5c31\u5b83\u5427\u3002<\/p>\n<p>\u7528\u8fd9\u4e2a\u914d\u7f6e\u6d4b\u4e86\u4e00\u4e0b\uff0c\u7ed3\u679c PhpStorem \u8fd8\u662f\u8fde\u4e0d\u4e0a xdebug\u3002\u3002\u4ec0\u4e48\u60c5\u51b5\uff01<\/p>\n<p>\u7528 tcpdump \u770b\u4e86\u4e00\u4e0b\u8fdc\u7aef\u5bbf\u4e3b\u670d\u52a1\u5668\u7684 9000 \u7aef\u53e3\u5df2\u7ecf\u6709\u6d41\u91cf\u4e86\uff0c\u4f46\u672c\u5730\u7528 wireshark \u5374\u770b\u4e0d\u5230\u672c\u673a 9000 \u7aef\u53e3\u4e0a\u7684\u6d41\u91cf\u3002PhpStorm \u884c\u4e0d\u884c\u554a\uff0c\u6709\u6ca1\u6709\u5728\u76d1\u542c 9000 \u54e6\uff1f\u7528 360 \u6d41\u91cf\u9632\u706b\u5899\u770b\u4e86\u4e00\u4e0b\uff0c\u786e\u5b9e\u542f\u7528 PhpStorm \u7684\u76d1\u542c\u6a21\u5f0f\u540e\u7a0b\u5e8f\u4f1a\u5f00\u59cb\u76d1\u542c 9000 \u7aef\u53e3\uff0c\u5173\u95ed\u76d1\u542c\u6a21\u5f0f\u540e\u7a0b\u5e8f\u5bf9 9000 \u7aef\u53e3\u7684\u76d1\u542c\u4e5f\u4f1a\u505c\u6b62\u3002<\/p>\n<p>\u4f1a\u4e0d\u4f1a\u662f PhpStorm \u6ca1\u542c\u61c2\u5462\uff1f\u4e0b\u4e00\u4e2a xdebug \u7684<a href=\"https:\/\/xdebug.org\/docs\/dbgpClient\">\u547d\u4ee4\u884c\u5ba2\u6237\u7aef<\/a>\u8bd5\u4e86\u8bd5\uff0c\u6ca1\u53cd\u5e94\u3002\u884c\u4e0d\u884c\u554a\uff1f\u53c8\u4e0b\u4e86\u4e2a linux \u7248\u7684\u5728\u670d\u52a1\u5668\u4e0a\u6267\u884c <span style=\"background-color: #f0f0f0;\">.\/dbgpClient -p 9000<\/span> \uff0c\u80fd\u6536\u5230 xdebug \u7684\u56de\u62e8\uff0c\u8fdb\u5165\u8c03\u8bd5\u72b6\u6001\u3002\u770b\u6765\u95ee\u9898\u51fa\u5728\u670d\u52a1\u5668\u7684\u901a\u4fe1\u6ca1\u6709\u8f6c\u53d1\u7ed9\u6211\u7684\u672c\u5730\u4e3b\u673a\u3002<\/p>\n<p>\u4e3a\u4ec0\u4e48\u5462\uff1f\u6ca1\u5934\u7eea\u554a\u3002\u3002\u6572\u4e2a <span style=\"background-color: #f0f0f0;\">sudo netstat -natpl | grep 9000<\/span> \u7814\u7a76\u4e86\u4e00\u4e0b\uff0c\u770b\u5230 <span style=\"background-color: #f0f0f0;\">127.0.0.1:9000<\/span> \u8fd9\u91cc\u7a81\u7136\u60f3\u8d77\u6765\uff0cssh \u7684\u53cd\u5411\u4ee3\u7406\u9ed8\u8ba4\u53ea\u63a5\u53d7\u6765\u81ea\u672c\u5730\u7684\u901a\u4fe1\uff0cdocker-compose \u7684\u5bb9\u5668\u9ed8\u8ba4\u662f\u521b\u5efa\u4e00\u4e2a\u72ec\u7acb\u7684\u5185\u7f51 ip \u7528\u6765\u901a\u4fe1\u7684\uff0c\u53cd\u6b63\u4e0d\u662f 127.0.0.1 \u3002\u4f1a\u4e0d\u4f1a\u56e0\u4e3a\u8fd9\u4e2a\uff0c\u6240\u4ee5 ssh \u7684\u53cd\u5411\u4ee3\u7406\u6ca1\u6709\u53d7\u7406\u6765\u81ea docker \u7684\u901a\u4fe1\uff1f<\/p>\n<p>google \u4e86\u4e00\u4e0b\uff0c\u4fee\u6539 ssh \u7684\u8bbe\u7f6e\u4e3a <span style=\"background-color: #f0f0f0;\">GatewayPorts clientspecified<\/span> \u53ef\u4ee5\u8ba9\u5ba2\u6237\u7aef\u51b3\u5b9a\u670d\u52a1\u5668\u7aef\u7ed1\u5b9a\u7684\u7aef\u53e3\u53ef\u4ee5\u63a5\u6536\u6765\u81ea\u54ea\u4e9b ip \u7684\u901a\u4fe1\u3002\u4e8e\u662f\u6253\u5f00 ssh \u914d\u7f6e\u6587\u4ef6\uff0c\u53d1\u73b0\u6ca1\u6709 GatewayPorts \u7684\u8bbe\u7f6e\uff0c\u90a3\u66f4\u597d\uff0c\u76f4\u63a5\u6dfb\u52a0\u5728\u6587\u4ef6\u672b\u5c3e\uff0c\u7136\u540e\u91cd\u542f ssh \u670d\u52a1\u3002<\/p>\n<pre> sudo vi \/etc\/ssh\/sshd_config\r\n sudo systemctl restart sshd.service<\/pre>\n<p>\u4e4b\u540e\u5728\u672c\u5730\u4e3b\u673a\u4e0a\u91cd\u65b0\u6267\u884c ssh \u53cd\u5411\u4ee3\u7406\uff0c\u8fd9\u6b21\u8981\u8bbe\u7f6e\u4e3a\u5141\u8bb8\u63a5\u6536\u6765\u81ea\u5916\u90e8 ip \u7684\u901a\u4fe1\uff1a<\/p>\n<pre> ssh -R 0.0.0.0:9000:localhost:9000 username@hostname<\/pre>\n<p>\u8fd9\u6b21\uff0c\u7ec8\u4e8e\u8c03\u901a\u4e86\u3002<\/p>\n<p>\u4e0b\u9762\u662f\u6280\u672f\u603b\u7ed3\uff08\u592a\u7d2f\u4e86\u5c31\u8d34\u5f20\u56fe\u5427 orz\uff09\uff1a<\/p>\n<p><a href=\"https:\/\/bellsprite.com\/blog\/wp-content\/uploads\/2020\/12\/2-1.png\"><img loading=\"lazy\" decoding=\"async\" class=\"kira-image-border alignnone wp-image-1099 size-full\" src=\"https:\/\/bellsprite.com\/blog\/wp-content\/uploads\/2020\/12\/2-1.png\" alt=\"\" width=\"1441\" height=\"706\" srcset=\"https:\/\/bellsprite.com\/wp-content\/uploads\/2020\/12\/2-1.png 1441w, https:\/\/bellsprite.com\/wp-content\/uploads\/2020\/12\/2-1-300x147.png 300w, https:\/\/bellsprite.com\/wp-content\/uploads\/2020\/12\/2-1-1024x502.png 1024w, https:\/\/bellsprite.com\/wp-content\/uploads\/2020\/12\/2-1-768x376.png 768w\" sizes=\"auto, (max-width: 1441px) 100vw, 1441px\" \/><\/a><\/p>\n<p>\u8865\u5145\uff1a<\/p>\n<p><strong>1. \u4e3a\u4ec0\u4e48\u6211\u5728\u672c\u5730\u7684 window \u4e3b\u673a\u4e0a\u53ef\u4ee5\u4f7f\u7528 ssh \u547d\u4ee4\uff1f<\/strong><br \/>\n\u56e0\u4e3a\u7528\u7684 Cygwin<\/p>\n<p><strong>2. \u5bf9\u6240\u6709 ip \u5f00\u653e\u7aef\u53e3\u8bbf\u95ee\u4f1a\u4e0d\u4f1a\u6709\u5b89\u5168\u9690\u60a3\uff1f<\/strong><br \/>\n\u786e\u5b9e\u3002\u5e94\u8be5\u53ef\u4ee5\u628a\u6700\u540e\u7684 0.0.0.0 \u6539\u6210 docker \u5bb9\u5668\u7684 ip\uff0c\u5982\u679c\u4ed6\u6709\u56fa\u5b9a ip \u7684\u8bdd\u3002\u4e0d\u8fc7\u6211\u53ea\u4f1a\u5728\u81ea\u5df1\u9700\u8981\u8c03\u8bd5 php \u7684\u65f6\u5019\u624d\u4f1a\u521b\u5efa\u8fd9\u4e2a\u53cd\u5411\u4ee3\u7406\uff0c\u6211\u6ca1\u5728\u7528\u7684\u65f6\u5019\u8fd9\u4e2a\u5b89\u5168\u9690\u60a3\u4e0d\u5b58\u5728\uff0c\u6211\u5728\u7528\u7684\u65f6\u5019\u6709\u5176\u4ed6\u4eba\u5165\u4fb5\u8fd9\u4e2a\u7aef\u53e3\u5e94\u8be5\u76f8\u5bf9\u6bd4\u8f83\u5bb9\u6613\u5bdf\u89c9\u5230\u3002\u8fd9\u91cc\u786e\u5b9e\u662f\u9632\u8303\u610f\u8bc6\u4e0d\u8db3\uff0c\u5077\u61d2\u4e86\u3002\u4e4b\u540e\u4f1a\u91c7\u7528\u66f4\u5b89\u5168\u7684\u8fde\u63a5\u65b9\u5f0f\u7684\u3002<\/p>\n<p><strong>3. apache \u7684\u7aef\u53e3\u4ee3\u7406\u5230\u5b50\u76ee\u5f55\u4f1a\u5f71\u54cd xdebug \u8c03\u5f0f\u5417\uff1f<\/strong><br \/>\n\u4e0d\u4f1a\u3002\u65e0\u8bba\u8bbf\u95ee\u5b50\u76ee\u5f55\u8fd8\u662f\u76f4\u63a5\u8bbf\u95ee\u7aef\u53e3\uff0c\u8bbe\u7f6e\u5728 PhpStorm \u91cc\u7684\u65ad\u70b9\u90fd\u53ef\u4ee5\u6b63\u786e\u751f\u6548\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6211\u5bf9\u5f00\u53d1\u73af\u5883\u7684\u57fa\u672c\u8981\u6c42\u4e4b\u4e00\u662f\u53ef\u4ee5\u4e0b\u65ad\u70b9\u5355\u6b65\u8c03\u8bd5\u3002\u8fd9\u5f88\u57fa\u7840\uff0c\u5374\u5f88\u91cd\u8981\u3002 \u4ee3\u7801\u81ea\u52a8\u8865\u5168\u548c\u65ad\u70b9\u8c03\u8bd5\u529f\u80fd\u4e8c\u9009\u4e00\uff1f \u6211\u9009 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_themeisle_gutenberg_block_has_review":false,"footnotes":""},"categories":[1],"tags":[],"class_list":["post-1090","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"views":978,"_links":{"self":[{"href":"https:\/\/bellsprite.com\/index.php?rest_route=\/wp\/v2\/posts\/1090","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/bellsprite.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/bellsprite.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/bellsprite.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/bellsprite.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1090"}],"version-history":[{"count":12,"href":"https:\/\/bellsprite.com\/index.php?rest_route=\/wp\/v2\/posts\/1090\/revisions"}],"predecessor-version":[{"id":1318,"href":"https:\/\/bellsprite.com\/index.php?rest_route=\/wp\/v2\/posts\/1090\/revisions\/1318"}],"wp:attachment":[{"href":"https:\/\/bellsprite.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1090"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/bellsprite.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1090"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/bellsprite.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1090"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}