{"id":37858,"date":"2025-05-18T07:06:04","date_gmt":"2025-05-17T23:06:04","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/37858.html"},"modified":"2025-05-18T07:06:04","modified_gmt":"2025-05-17T23:06:04","slug":"%e4%bd%bf%e7%94%a8vscode%e9%83%a8%e7%bd%b2%e9%a1%b9%e7%9b%ae%e5%88%b0%e6%9c%8d%e5%8a%a1%e5%99%a8","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/37858.html","title":{"rendered":"\u4f7f\u7528VSCode\u90e8\u7f72\u9879\u76ee\u5230\u670d\u52a1\u5668"},"content":{"rendered":"<h3>1.\u9879\u76ee\u6253\u5305<\/h3>\n<p>\u6839\u76ee\u5f55\u4f1a\u751f\u6210\u4e00\u4e2adist\u7684\u6587\u4ef6\u5939<\/p>\n<p>npm run build <\/p>\n<h3>2.\u4e0b\u8f7dssh\u63d2\u4ef6<\/h3>\n<p>\u5728vscode\u4e2d\u7684\u63d2\u4ef6\u5e93\u4e2d\u641c\u7d22SSH &#xff0c;\u627e\u5230SSH Tools\u4e0b\u8f7d&#xff1b;\u00a0<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"781\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/05\/20250517230559-68291657b8d4e.png\" width=\"1257\" \/><\/p>\n<h3>3.\u6dfb\u52a0\u8fdc\u7a0b\u8fde\u63a5\u5230vscode<\/h3>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"469\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/05\/20250517230600-682916581afec.png\" width=\"314\" \/><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"437\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/05\/20250517230600-682916582b0f4.png\" width=\"315\" \/><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"101\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/05\/20250517230600-682916583b1ba.png\" width=\"643\" \/><\/p>\n<p>Host Port \u4e3a\u670d\u52a1\u5668\u516c\u7f51ip\u5730\u5740\u00a0<\/p>\n<p>\u5bc6\u7801\u5728\u670d\u52a1\u5668\u91cd\u7f6e\u5bc6\u7801\u540e\u7531\u81ea\u5df1\u8bbe\u7f6e<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"520\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/05\/20250517230600-6829165846ade.png\" width=\"928\" \/><\/p>\n<h3>4.\u4e0b\u8f7dnginx<\/h3>\n<p>\u70b9\u51fb\u5783\u573e\u6876\u5f80\u5de6\u8fb9\u7b2c\u4e8c\u4e2a\u6253\u5f00\u7ec8\u7aef<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"943\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/05\/20250517230600-682916586df31.png\" width=\"319\" \/><\/p>\n<p>\u4e0b\u8f7dnginx\u5e76\u914d\u7f6e<\/p>\n<p>\/\/1\u66f4\u65b0\u7cfb\u7edf<br \/>\nsudo dnf update -y<br \/>\nsudo yum update -y <\/p>\n<p>\/\/2\u5b89\u88c5\u7f16\u8bd1\u5de5\u5177\u548c\u4f9d\u8d56\u5e93<br \/>\nsudo yum install -y gcc make openssl openssl-devel pcre-devel zlib-devel wget <\/p>\n<p>\/\/3\u4e0b\u8f7d\u6e90\u7801\u5305<br \/>\nwget https:\/\/nginx.org\/download\/nginx-1.23.4.tar.gz <\/p>\n<p>\/\/4\u89e3\u538b\u6e90\u7801\u5305<br \/>\ntar -zxvf nginx-1.23.4.tar.gz<br \/>\n# \u8fdb\u5165\u76ee\u5f55 cd nginx-1.23.4<br \/>\n# \u67e5\u770b\u5185\u5bb9 ls -la <\/p>\n<p>\/\/5\u7f16\u8bd1\u5e76\u5b89\u88c5<br \/>\n.\/configure &#8211;prefix&#061;\/usr\/local\/nginx &#8211;with-http_ssl_module &#8211;with-stream &#8211;with-http_stub_status_module<br \/>\nmake &amp;&amp; make install <\/p>\n<h3>5.\u914d\u7f6enginx.service\u6587\u4ef6<\/h3>\n<p>nginx.service \u6587\u4ef6\u662f\u4e00\u4e2a systemd \u670d\u52a1\u5355\u5143\u6587\u4ef6&#xff0c;\u7528\u4e8e\u5728\u57fa\u4e8e systemd \u7684 Linux \u7cfb\u7edf\u4e2d\u5b9a\u4e49\u5982\u4f55\u7ba1\u7406 Nginx HTTP \u548c\u53cd\u5411\u4ee3\u7406\u670d\u52a1\u5668\u7684\u670d\u52a1\u3002\u8fd9\u4e2a\u6587\u4ef6\u544a\u8bc9 systemd \u5982\u4f55\u542f\u52a8\u3001\u505c\u6b62\u3001\u91cd\u542f\u4ee5\u53ca\u76d1\u63a7 Nginx \u670d\u52a1\u7684\u72b6\u6001<\/p>\n<p>\u901a\u5e38\u60c5\u51b5\u4e0b&#xff0c;nginx.service \u6587\u4ef6\u53ef\u80fd\u4f4d\u4e8e\u4ee5\u4e0b\u8def\u5f84\u4e4b\u4e00&#xff1a;<\/p>\n<p>\/lib\/systemd\/system\/nginx.service<br \/>\n\/etc\/systemd\/system\/nginx.service <\/p>\n<p>\u6253\u5f00\u5e76\u7f16\u8f91nginx.service\u6587\u4ef6<\/p>\n<p>vim \/usr\/lib\/systemd\/system\/nginx.service <\/p>\n<p>\u6253\u5f00\u540e\u8f93\u5165\u5b57\u6bcd i \u8fdb\u5165\u7f16\u8f91\u72b6\u6001,\u6587\u4ef6\u5e95\u90e8\u51fa\u73b0&#8211; INSERT &#8212; \u540e\u8fdb\u884c\u7f16\u8f91&#xff0c;<\/p>\n<p>\u7f16\u8f91\u5b8c\u6210\u540e\u70b9\u51fbESC&#xff08;ESC\u518d\u9501\u5b9a\u60c5\u51b5\u4e0b&#xff09;\u9000\u51fa\u7f16\u8f91\u72b6\u6001&#xff0c;\u8f93\u5165 :wq \u9000\u51fa\u6587\u4ef6<\/p>\n<p>nginx.service\u6587\u4ef6\u53c2\u8003<\/p>\n<p>[Unit]<br \/>\nDescription&#061;nginx<br \/>\nAfter&#061;network.target<br \/>\n[Service]<br \/>\nType&#061;forking<br \/>\nExecStartPre&#061;\/usr\/local\/nginx\/sbin\/nginx -t<br \/>\nExecStart&#061;\/usr\/local\/nginx\/sbin\/nginx<br \/>\nExecReload&#061;\/usr\/local\/nginx\/sbin\/nginx -s reload<br \/>\nExecStop&#061;\/usr\/local\/nginx\/sbin\/nginx -s quit<br \/>\nPrivateTmp&#061;true<br \/>\n[Install]<br \/>\nWantedBy&#061;multi-user.target <\/p>\n<p>\u5982\u679c\u5728\u8f93\u5165vim \/usr\/lib\/systemd\/system\/nginx.service\u547d\u4ee4\u540e\u51fa\u73b0\u5982\u4e0b\u9875\u9762&#xff0c;\u8f93\u5165A\u9000\u51fa&#xff0c;\u518d\u8f93\u5165<\/p>\n<p>sudo rm \/usr\/lib\/systemd\/system\/.nginx.service.swp <\/p>\n<p>\u8fdb\u884c\u5220\u9664\u540e&#xff0c;\u518d\u51fa\u73b0\u7f16\u8f91<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"800\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/05\/20250517230600-682916587f112.png\" width=\"771\" \/><\/p>\n<h3>6.\u4e0a\u4f20\u9879\u76ee<\/h3>\n<p>\u5728\/home\u6587\u4ef6\u5939\u4e0b\u9762\u65b0\u589eproject\u6587\u4ef6\u5939&#xff0c;\u5728project\u6587\u4ef6\u5939\u4e0b\u9762\u65b0\u589edeepseekProject\u6587\u4ef6\u5939&#xff08;\u8fd9\u5c31\u662f\u4e0a\u4f20\u9879\u76ee\u7684\u6587\u4ef6\u5939&#xff09;&#xff0c;\u63a5\u7740\u65b0\u5efadist\u6587\u4ef6\u5939&#xff08;\u53ea\u80fd\u4e0a\u4f20\u6587\u4ef6&#xff09;&#xff0c;\u81ea\u5df1\u6839\u636edist\u7684\u5c42\u7ea7\u548c\u6587\u4ef6\u8fdb\u884c\u4e0a\u4f20\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"157\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/05\/20250517230600-68291658b9a40.png\" width=\"285\" \/><\/p>\n<p>\/home\/project\/deepseekProject\/dist\u00a0<\/p>\n<\/p>\n<h3>7.\u65b0\u5efa\u9879\u76ee\u914d\u7f6e\u6587\u4ef6<\/h3>\n<p>\u5728\/usr\/local\/nginx\/conf\u6587\u4ef6\u5939\u4e0b\u9762\u65b0\u589e\u4e00\u4e2a\u6587\u4ef6\u5939\u547d\u540d\u4e3amyhost&#xff0c;\u7ee7\u7eed\u5728myhost\u6587\u4ef6\u5939\u4e0b\u9762\u65b0\u589e\u9879\u76ee\u914d\u7f6e\u6587\u4ef6deepseekProject.conf(\u6839\u636e\u81ea\u5df1\u7684\u9879\u76ee\u540d\u79f0\u800c\u5b9a)<\/p>\n<p>server<br \/>\n{<br \/>\nlisten 80;<br \/>\nserver_name deepseekAI;<br \/>\nindex index.html;<br \/>\nroot \/home\/project\/deepseekProject\/dist; #dist\u4e0a\u4f20\u8def\u5f84<br \/>\n#\u907f\u514d\u8bbf\u95ee\u51fa\u73b0404\u9519\u8bef<br \/>\nlocation \/ { try_files $uri $uri\/ &#064;router; index index.html; }<br \/>\nlocation &#064;router { rewrite ^.*$ \/index.html last; }<br \/>\n} <\/p>\n<h3>8.\u4fee\u6539nginx\u914d\u7f6e\u6587\u4ef6<\/h3>\n<p>\u4fee\u6539\/usr\/local\/nginx\/conf\/nginx.conf\u6587\u4ef6\u7684\u00a0#gzip \u00a0on;\u4e0b\u9762\u7684server\u8fdb\u884c\u66ff\u6362&#xff1b;<\/p>\n<p>\u4e3b\u8981\u662f\u591a\u4e86\u4e00\u4e2a&#xff1a;include myhost\/*.conf;<\/p>\n<p> #gzip  on;<br \/>\n    include myhost\/*.conf;<br \/>\n    server {<br \/>\n        listen       80;<br \/>\n        server_name  localhost;<\/p>\n<p>        #charset koi8-r;<\/p>\n<p>        #access_log  logs\/host.access.log  main;<\/p>\n<p>        location \/ {<br \/>\n            root   html;<br \/>\n            index  index.html index.htm;<br \/>\n        }<\/p>\n<p>        #error_page  404              \/404.html;<\/p>\n<p>        # redirect server error pages to the static page \/50x.html<br \/>\n        #<br \/>\n        error_page   500 502 503 504  \/50x.html;<br \/>\n        location &#061; \/50x.html {<br \/>\n            root   html;<br \/>\n        }<\/p>\n<p>        # proxy the PHP scripts to Apache listening on 127.0.0.1:80<br \/>\n        #<br \/>\n        #location ~ \\\\.php$ {<br \/>\n        #    proxy_pass   http:\/\/127.0.0.1;<br \/>\n        #}<\/p>\n<p>        # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000<br \/>\n        #<br \/>\n        #location ~ \\\\.php$ {<br \/>\n        #    root           html;<br \/>\n        #    fastcgi_pass   127.0.0.1:9000;<br \/>\n        #    fastcgi_index  index.php;<br \/>\n        #    fastcgi_param  SCRIPT_FILENAME  \/scripts$fastcgi_script_name;<br \/>\n        #    include        fastcgi_params;<br \/>\n        #}<\/p>\n<p>        # deny access to .htaccess files, if Apache&#039;s document root<br \/>\n        # concurs with nginx&#039;s one<br \/>\n        #<br \/>\n        #location ~ \/\\\\.ht {<br \/>\n        #    deny  all;<br \/>\n        #}<br \/>\n    } <\/p>\n<h3>9.\u914d\u7f6e\u5b8c\u6210\u540e\u8f93\u5165systemctl start nginx\u542f\u52a8nginx<\/h3>\n<p>\/\/\u5e38\u7528\u547d\u4ee4<br \/>\n#\u542f\u52a8<br \/>\nsystemctl start nginx<br \/>\n#\u505c\u6b62<br \/>\nsystemctl stop nginx<br \/>\n#\u8bbe\u7f6e\u5f00\u673a\u542f\u52a8<br \/>\nsystemctl enable nginx<br \/>\n#\u67e5\u770b\u72b6\u6001<br \/>\nsystemctl status nginx<br \/>\nsystemctl status nginx.service<\/p>\n<p>#\u91cd\u65b0\u542f\u52a8<br \/>\nsystemctl restart nginx<\/p>\n<p>#\u8fd0\u884c\u4ee5\u4e0b\u547d\u4ee4\u6765\u5f7b\u5e95\u5237\u65b0 systemd \u7f13\u5b58&#xff1a;<br \/>\nsudo systemctl daemon-reexec<br \/>\nsudo systemctl daemon-reload<\/p>\n<p>#\u91cd\u542f nginx \u670d\u52a1<br \/>\nsudo systemctl restart nginx<\/p>\n<p>#\u67e5\u770b\u72b6\u6001\u662f\u5426\u8fd8\u62a5\u9519<br \/>\nsudo systemctl status nginx -l<\/p>\n<p>#\u67e5\u770b80\u7aef\u53e3\u5360\u7528\u60c5\u51b5<br \/>\nnetstat -tulnp | grep :80  \/\/sudo ss -tulnp | grep :80<br \/>\n#\u67e5\u770b\u5360\u7528\u8fdb\u7a0bid<br \/>\nps -p 1234<br \/>\n#\u6740\u6b7b\u8fdb\u7a0b<br \/>\nsudo kill -9 1234<\/p>\n<p>#\u8fd0\u884c\u4ee5\u4e0b\u547d\u4ee4\u67e5\u770b\u7cfb\u7edf\u5b9e\u9645\u52a0\u8f7d\u7684\u662f\u54ea\u4e2a\u670d\u52a1\u6587\u4ef6&#xff1a;<br \/>\nsystemctl show nginx.service -p FragmentPath<\/p>\n<p>#\u68c0\u67e5Nginx\u7684\u4e3b\u914d\u7f6e\u6587\u4ef6\u4f4d\u7f6e<br \/>\nnginx -t  \/\/ nginx -t <\/p>\n<p>\u670d\u52a1\u5668tips&#xff1a;\u914d\u7f6e\u7aef\u53e3<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"1526\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/05\/20250517230600-68291658c4b67.png\" width=\"2783\" \/><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"787\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/05\/20250517230602-6829165ac96f5.png\" width=\"2490\" \/><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb783\u6b21\uff0c\u70b9\u8d5e6\u6b21\uff0c\u6536\u85cf7\u6b21\u3002\u672c\u6587\u8be6\u7ec6\u4ecb\u7ecd\u4e86\u5982\u4f55\u5c06\u9879\u76ee\u90e8\u7f72\u5230\u670d\u52a1\u5668\u5e76\u914d\u7f6eNginx\u7684\u6b65\u9aa4\u3002\u9996\u5148\uff0c\u901a\u8fc7npm run build\u751f\u6210\u9879\u76ee\u7684dist\u6587\u4ef6\u5939\u3002\u63a5\u7740\uff0c\u5728VSCode\u4e2d\u5b89\u88c5SSH\u63d2\u4ef6\u5e76\u914d\u7f6e\u8fdc\u7a0b\u8fde\u63a5\u3002\u968f\u540e\uff0c\u5728\u670d\u52a1\u5668\u4e0a\u5b89\u88c5Nginx\uff0c\u5305\u62ec\u66f4\u65b0\u7cfb\u7edf\u3001\u5b89\u88c5\u4f9d\u8d56\u5e93\u3001\u4e0b\u8f7d\u5e76\u7f16\u8bd1Nginx\u6e90\u7801\u3002\u7136\u540e\uff0c\u914d\u7f6enginx.service\u6587\u4ef6\u4ee5\u7ba1\u7406Nginx\u670d\u52a1\u3002\u9879\u76ee\u6587\u4ef6\u901a\u8fc7SSH\u4e0a\u4f20\u5230\u670d\u52a1\u5668\u7684\u6307\u5b9a\u76ee\u5f55\uff0c\u5e76\u5728Nginx\u914d\u7f6e\u6587\u4ef6\u4e2d\u6dfb\u52a0\u9879\u76ee\u76f8\u5173\u7684\u914d\u7f6e\u3002\u6700\u540e\uff0c\u542f\u52a8Nginx\u670d\u52a1\uff0c\u5e76\u63d0\u4f9b\u4e86\u5e38\u7528\u7684Nginx\u7ba1\u7406\u547d\u4ee4\u3002\u6574\u4e2a\u8fc7\u7a0b\u6db5\u76d6\u4e86\u4ece\u9879\u76ee\u6253\u5305\u5230\u670d\u52a1\u5668\u90e8\u7f72\u7684\u5b8c\u6574\u6d41\u7a0b<\/p>\n","protected":false},"author":2,"featured_media":37848,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[76,43],"topic":[],"class_list":["post-37858","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-server","tag-vscode","tag-43"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>\u4f7f\u7528VSCode\u90e8\u7f72\u9879\u76ee\u5230\u670d\u52a1\u5668 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.wsisp.com\/helps\/37858.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u4f7f\u7528VSCode\u90e8\u7f72\u9879\u76ee\u5230\u670d\u52a1\u5668 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb783\u6b21\uff0c\u70b9\u8d5e6\u6b21\uff0c\u6536\u85cf7\u6b21\u3002\u672c\u6587\u8be6\u7ec6\u4ecb\u7ecd\u4e86\u5982\u4f55\u5c06\u9879\u76ee\u90e8\u7f72\u5230\u670d\u52a1\u5668\u5e76\u914d\u7f6eNginx\u7684\u6b65\u9aa4\u3002\u9996\u5148\uff0c\u901a\u8fc7npm run build\u751f\u6210\u9879\u76ee\u7684dist\u6587\u4ef6\u5939\u3002\u63a5\u7740\uff0c\u5728VSCode\u4e2d\u5b89\u88c5SSH\u63d2\u4ef6\u5e76\u914d\u7f6e\u8fdc\u7a0b\u8fde\u63a5\u3002\u968f\u540e\uff0c\u5728\u670d\u52a1\u5668\u4e0a\u5b89\u88c5Nginx\uff0c\u5305\u62ec\u66f4\u65b0\u7cfb\u7edf\u3001\u5b89\u88c5\u4f9d\u8d56\u5e93\u3001\u4e0b\u8f7d\u5e76\u7f16\u8bd1Nginx\u6e90\u7801\u3002\u7136\u540e\uff0c\u914d\u7f6enginx.service\u6587\u4ef6\u4ee5\u7ba1\u7406Nginx\u670d\u52a1\u3002\u9879\u76ee\u6587\u4ef6\u901a\u8fc7SSH\u4e0a\u4f20\u5230\u670d\u52a1\u5668\u7684\u6307\u5b9a\u76ee\u5f55\uff0c\u5e76\u5728Nginx\u914d\u7f6e\u6587\u4ef6\u4e2d\u6dfb\u52a0\u9879\u76ee\u76f8\u5173\u7684\u914d\u7f6e\u3002\u6700\u540e\uff0c\u542f\u52a8Nginx\u670d\u52a1\uff0c\u5e76\u63d0\u4f9b\u4e86\u5e38\u7528\u7684Nginx\u7ba1\u7406\u547d\u4ee4\u3002\u6574\u4e2a\u8fc7\u7a0b\u6db5\u76d6\u4e86\u4ece\u9879\u76ee\u6253\u5305\u5230\u670d\u52a1\u5668\u90e8\u7f72\u7684\u5b8c\u6574\u6d41\u7a0b\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/37858.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2025-05-17T23:06:04+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/05\/20250517230559-68291657b8d4e.png\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/37858.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/37858.html\",\"name\":\"\u4f7f\u7528VSCode\u90e8\u7f72\u9879\u76ee\u5230\u670d\u52a1\u5668 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2025-05-17T23:06:04+00:00\",\"dateModified\":\"2025-05-17T23:06:04+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/37858.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/37858.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/37858.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u4f7f\u7528VSCode\u90e8\u7f72\u9879\u76ee\u5230\u670d\u52a1\u5668\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\",\"url\":\"https:\/\/www.wsisp.com\/helps\/\",\"name\":\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"description\":\"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"contentUrl\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"caption\":\"admin\"},\"sameAs\":[\"http:\/\/wp.wsisp.com\"],\"url\":\"https:\/\/www.wsisp.com\/helps\/author\/admin\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"\u4f7f\u7528VSCode\u90e8\u7f72\u9879\u76ee\u5230\u670d\u52a1\u5668 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.wsisp.com\/helps\/37858.html","og_locale":"zh_CN","og_type":"article","og_title":"\u4f7f\u7528VSCode\u90e8\u7f72\u9879\u76ee\u5230\u670d\u52a1\u5668 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb783\u6b21\uff0c\u70b9\u8d5e6\u6b21\uff0c\u6536\u85cf7\u6b21\u3002\u672c\u6587\u8be6\u7ec6\u4ecb\u7ecd\u4e86\u5982\u4f55\u5c06\u9879\u76ee\u90e8\u7f72\u5230\u670d\u52a1\u5668\u5e76\u914d\u7f6eNginx\u7684\u6b65\u9aa4\u3002\u9996\u5148\uff0c\u901a\u8fc7npm run build\u751f\u6210\u9879\u76ee\u7684dist\u6587\u4ef6\u5939\u3002\u63a5\u7740\uff0c\u5728VSCode\u4e2d\u5b89\u88c5SSH\u63d2\u4ef6\u5e76\u914d\u7f6e\u8fdc\u7a0b\u8fde\u63a5\u3002\u968f\u540e\uff0c\u5728\u670d\u52a1\u5668\u4e0a\u5b89\u88c5Nginx\uff0c\u5305\u62ec\u66f4\u65b0\u7cfb\u7edf\u3001\u5b89\u88c5\u4f9d\u8d56\u5e93\u3001\u4e0b\u8f7d\u5e76\u7f16\u8bd1Nginx\u6e90\u7801\u3002\u7136\u540e\uff0c\u914d\u7f6enginx.service\u6587\u4ef6\u4ee5\u7ba1\u7406Nginx\u670d\u52a1\u3002\u9879\u76ee\u6587\u4ef6\u901a\u8fc7SSH\u4e0a\u4f20\u5230\u670d\u52a1\u5668\u7684\u6307\u5b9a\u76ee\u5f55\uff0c\u5e76\u5728Nginx\u914d\u7f6e\u6587\u4ef6\u4e2d\u6dfb\u52a0\u9879\u76ee\u76f8\u5173\u7684\u914d\u7f6e\u3002\u6700\u540e\uff0c\u542f\u52a8Nginx\u670d\u52a1\uff0c\u5e76\u63d0\u4f9b\u4e86\u5e38\u7528\u7684Nginx\u7ba1\u7406\u547d\u4ee4\u3002\u6574\u4e2a\u8fc7\u7a0b\u6db5\u76d6\u4e86\u4ece\u9879\u76ee\u6253\u5305\u5230\u670d\u52a1\u5668\u90e8\u7f72\u7684\u5b8c\u6574\u6d41\u7a0b","og_url":"https:\/\/www.wsisp.com\/helps\/37858.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2025-05-17T23:06:04+00:00","og_image":[{"url":"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/05\/20250517230559-68291657b8d4e.png"}],"author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"2 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/37858.html","url":"https:\/\/www.wsisp.com\/helps\/37858.html","name":"\u4f7f\u7528VSCode\u90e8\u7f72\u9879\u76ee\u5230\u670d\u52a1\u5668 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2025-05-17T23:06:04+00:00","dateModified":"2025-05-17T23:06:04+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/37858.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/37858.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/37858.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"\u4f7f\u7528VSCode\u90e8\u7f72\u9879\u76ee\u5230\u670d\u52a1\u5668"}]},{"@type":"WebSite","@id":"https:\/\/www.wsisp.com\/helps\/#website","url":"https:\/\/www.wsisp.com\/helps\/","name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","description":"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41","name":"admin","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/","url":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","contentUrl":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","caption":"admin"},"sameAs":["http:\/\/wp.wsisp.com"],"url":"https:\/\/www.wsisp.com\/helps\/author\/admin"}]}},"_links":{"self":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/37858","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/comments?post=37858"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/37858\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media\/37848"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=37858"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=37858"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=37858"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=37858"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}