{"id":11953,"date":"2025-04-18T19:06:57","date_gmt":"2025-04-18T11:06:57","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/11953.html"},"modified":"2025-04-18T19:06:57","modified_gmt":"2025-04-18T11:06:57","slug":"%e4%bb%8e%e9%9b%b6%e5%bc%80%e5%a7%8b%e7%9a%84-vue%e9%a1%b9%e7%9b%ae%e9%83%a8%e7%bd%b2%e5%88%b0%e6%9c%8d%e5%8a%a1%e5%99%a8%e8%af%a6%e7%bb%86%e6%ad%a5%e9%aa%a4%ef%bc%88vue%e9%a1%b9%e7%9b%aebuild","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/11953.html","title":{"rendered":"\u4ece\u96f6\u5f00\u59cb\u7684 vue\u9879\u76ee\u90e8\u7f72\u5230\u670d\u52a1\u5668\u8be6\u7ec6\u6b65\u9aa4\uff08vue\u9879\u76eebuild\u6253\u5305+nginx\u90e8\u7f72+\u914d\u7f6essl\u8bc1\u4e66\uff09"},"content":{"rendered":"<h2>\u4ece\u96f6\u5f00\u59cb\u7684 vue\u9879\u76ee\u90e8\u7f72\u5230\u670d\u52a1\u5668\u8be6\u7ec6\u6b65\u9aa4&#xff08;vue\u9879\u76eebuild\u6253\u5305&#043;nginx\u90e8\u7f72&#043;\u914d\u7f6essl\u8bc1\u4e66&#xff09;<\/h2>\n<\/p>\n<h4>\u6587\u7ae0\u76ee\u5f55<\/h4>\n<ul>\n<li>\u4ece\u96f6\u5f00\u59cb\u7684 vue\u9879\u76ee\u90e8\u7f72\u5230\u670d\u52a1\u5668\u8be6\u7ec6\u6b65\u9aa4&#xff08;vue\u9879\u76eebuild\u6253\u5305&#043;nginx\u90e8\u7f72&#043;\u914d\u7f6essl\u8bc1\u4e66&#xff09;<\/li>\n<li>\u4e00\u3001\u524d\u8a00<\/li>\n<li>\u4e8c\u3001vue\u9879\u76ee\u90e8\u7f72\u524d\u914d\u7f6e<\/li>\n<li>\n<ul>\n<li>1\u3001vite.config.js \u589e\u52a0base\u5b57\u6bb5<\/li>\n<li>2\u3001src\/router\/index.js \u5728\u5386\u53f2\u8bb0\u5f55\u4e2d\u52a0\u5165BASR_URL<\/li>\n<li>3\u3001src\/utils\/request.js \u52a0\u4e0a\u540e\u7aef\u7684baseURL<\/li>\n<\/ul>\n<\/li>\n<li>\u4e8c\u3001\u52a0SSl\u8bc1\u4e66\u914d\u7f6ehttps<\/li>\n<li>\n<ul>\n<li>1\u3001\u5c06\u57df\u540d\u89e3\u6790\u5230\u4f60\u7684\u670d\u52a1\u5668<\/li>\n<li>2\u3001\u9a8c\u8bc1\u8be5\u57df\u540d\u662f\u5426\u89e3\u6790\u6210\u529f<\/li>\n<li>3\u3001let&#039;s Encrypt \u8bc1\u4e66\u7533\u8bf7<\/li>\n<li>\n<ul>\n<li>&#xff08;1&#xff09;certbot\u5b89\u88c5<\/li>\n<li>&#xff08;2&#xff09;let&#039;s Encrypt \u8bc1\u4e66\u7533\u8bf7<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<li>\u4e09\u3001\u914d\u7f6enginx<\/li>\n<li>\n<ul>\n<li>1\u3001nginx\u5b89\u88c5<\/li>\n<li>2\u3001\u914d\u7f6enginx.conf<\/li>\n<li>3\u3001\u91cd\u65b0\u8fd0\u884cnginx<\/li>\n<li>4\u3001vue \u7f16\u8bd1\u540e\u6587\u4ef6\u4e0a\u4f20\u670d\u52a1\u5668<\/li>\n<\/ul>\n<\/li>\n<li>\u56db\u3001\u540e\u8bdd<\/li>\n<li>\n<ul>\n<li>1\u3001\u5b8c\u7ed3<\/li>\n<li>2\u3001\u6bcf\u65e5\u5c0ftip&#xff1a;ssl\u8bc1\u4e66\u81ea\u52a8\u7eed\u8ba2\u3002<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<h2>\u4e00\u3001\u524d\u8a00<\/h2>\n<p>\u672a\u6765\u7684\u5f00\u53d1\u8005\u4eec\u8bf7\u4e0a\u5ea7&#xff0c;\u5728\u8fd9\u91cc\u8bb8\u591a\u4eba\u5728\u81ea\u5df1\u7684\u7535\u8111\u505a\u5b8c\u524d\u7aef\u540e&#xff0c;\u4e0b\u4e00\u6b65\u5c31\u662f\u600e\u4e48\u90e8\u7f72\u5230\u670d\u52a1\u5668\u4e0a\u5bf9\u5916\u5f00\u653e\u4e86\u3002 ps&#xff1a;\u9ed8\u8ba4\u5404\u4f4d\u5927\u5927\u5df2\u7ecf\u8d2d\u4e70\u4e91\u670d\u52a1\u5668\u4e86\u54c8\u3002 \u6211\u7684\u670d\u52a1\u5668\u662fubutu 22.04&#xff0c;\u7b2c\u4e00\u6b21\u8ddf\u968f\u672c\u6559\u7a0b\u7684\u65f6\u5019\u6700\u597d\u4e5f\u662fubuntu\u7cfb\u7edf&#xff0c;\u907f\u514d\u73af\u5883\u95ee\u9898\u3002<\/p>\n<h2>\u4e8c\u3001vue\u9879\u76ee\u90e8\u7f72\u524d\u914d\u7f6e<\/h2>\n<p>\u4e3a\u4e86\u4fbf\u4e8e\u6f14\u793a&#xff0c;\u6211\u65b0\u5efa\u4e86\u4e00\u4e2a\u9879\u76ee\u7528\u4e8e\u6f14\u793a\u3002<\/p>\n<h3>1\u3001vite.config.js \u589e\u52a0base\u5b57\u6bb5<\/h3>\n<p><span class=\"token keyword\">import<\/span> <span class=\"token punctuation\">{<\/span> fileURLToPath<span class=\"token punctuation\">,<\/span> <span class=\"token constant\">URL<\/span> <span class=\"token punctuation\">}<\/span> <span class=\"token keyword\">from<\/span> <span class=\"token string\">&#039;node:url&#039;<\/span><\/p>\n<p><span class=\"token keyword\">import<\/span> <span class=\"token punctuation\">{<\/span> defineConfig <span class=\"token punctuation\">}<\/span> <span class=\"token keyword\">from<\/span> <span class=\"token string\">&#039;vite&#039;<\/span><br \/>\n<span class=\"token keyword\">import<\/span> vue <span class=\"token keyword\">from<\/span> <span class=\"token string\">&#039;&#064;vitejs\/plugin-vue&#039;<\/span><\/p>\n<p><span class=\"token comment\">\/\/ https:\/\/vite.dev\/config\/<\/span><br \/>\n<span class=\"token keyword\">export<\/span> <span class=\"token keyword\">default<\/span> <span class=\"token function\">defineConfig<\/span><span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">{<\/span><br \/>\n  base<span class=\"token operator\">:<\/span><span class=\"token string\">&#039;vue-test&#039;<\/span><span class=\"token punctuation\">,<\/span><span class=\"token comment\">\/\/\u8fd9\u4e2a\u4e3a\u9879\u76ee\u540d<\/span><br \/>\n  plugins<span class=\"token operator\">:<\/span> <span class=\"token punctuation\">[<\/span><br \/>\n    <span class=\"token function\">vue<\/span><span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">,<\/span><br \/>\n  <span class=\"token punctuation\">]<\/span><span class=\"token punctuation\">,<\/span><br \/>\n  resolve<span class=\"token operator\">:<\/span> <span class=\"token punctuation\">{<\/span><br \/>\n    alias<span class=\"token operator\">:<\/span> <span class=\"token punctuation\">{<\/span><br \/>\n      <span class=\"token string\">&#039;&#064;&#039;<\/span><span class=\"token operator\">:<\/span> <span class=\"token function\">fileURLToPath<\/span><span class=\"token punctuation\">(<\/span><span class=\"token keyword\">new<\/span> <span class=\"token class-name\">URL<\/span><span class=\"token punctuation\">(<\/span><span class=\"token string\">&#039;.\/src&#039;<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token keyword\">import<\/span><span class=\"token punctuation\">.<\/span>meta<span class=\"token punctuation\">.<\/span>url<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">)<\/span><br \/>\n    <span class=\"token punctuation\">}<\/span><br \/>\n  <span class=\"token punctuation\">}<\/span><br \/>\n<span class=\"token punctuation\">}<\/span><span class=\"token punctuation\">)<\/span><\/p>\n<h3>2\u3001src\/router\/index.js \u5728\u5386\u53f2\u8bb0\u5f55\u4e2d\u52a0\u5165BASR_URL<\/h3>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418110652-6802324cea2fd.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><\/p>\n<h3>3\u3001src\/utils\/request.js \u52a0\u4e0a\u540e\u7aef\u7684baseURL<\/h3>\n<p>\u5982\u679c&#xff0c;\u6d89\u53ca\u540e\u7aef&#xff0c;\u5219\u9700\u8981\u5728\u62e6\u622a\u5668\u90a3\u8fb9\u52a0\u4e0a\u540e\u7aef\u7684baseURL,\u3002\u5982\u679c\u6ca1\u6709\u5219\u4e0d\u7528\u7ba1&#xff0c;\u540c\u65f6\u540e\u7eednginx\u4e5f\u4e0d\u9700\u8981\u914d\u8fd9\u4e2a\u8def\u7531<img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418110653-6802324d3ecc9.png\" alt=\"\" \/><\/p>\n<h2>\u4e8c\u3001\u52a0SSl\u8bc1\u4e66\u914d\u7f6ehttps<\/h2>\n<p>\u524d\u7f6e\u6761\u4ef6&#xff1a;\u6211\u9ed8\u8ba4\u4f60\u5df2\u7ecf\u6709\u57df\u540d\u4e86&#xff0c;\u5982\u679c\u6ca1\u6709\u9700\u8981\u5728\u56fd\u5185\u7684\u963f\u91cc\u4e91\u3001\u817e\u8baf\u4e91\u3001\u534e\u4e3a\u4e91&#xff0c;\u56fd\u5916\u7684Hostinger\u7b49\u4e91\u670d\u52a1\u5546\u90fd\u63d0\u4f9b\u57df\u540d\u6ce8\u518c\u548c\u57df\u540d\u89e3\u6790\u670d\u52a1\u3002\u627e\u4e00\u4e2a\u4f60\u559c\u6b22\u7684\u5c31\u53ef\u4ee5&#xff0c;\u5728\u8fd9\u91cc\u6211\u7528\u7684\u662f\u963f\u91cc\u4e91\u6ce8\u518c\u7684\u57df\u540d\u8fdb\u884c\u6f14\u793a\u3002 &#xff08;\u56fd\u5185\u7684\u57df\u540d\u9700\u8981\u63d0\u524d\u5907\u6848&#xff0c;15\u5929\u5de6\u53f3\u3002\u5982\u679c\u6bd4\u8f83\u7740\u6025\u4e14\u53ea\u662f\u6f14\u793a\u53ef\u4ee5\u7528\u9999\u6e2f\u6216\u8005\u56fd\u5916\u5982Hostinger \u4e91\u670d\u52a1\u5382\u5546\u63d0\u4f9b\u7684\u57df\u540d\u8fd9\u6837\u53ef\u4ee5\u514d\u6389\u5907\u6848\u7684\u6b65\u9aa4&#xff09;<\/p>\n<h3>1\u3001\u5c06\u57df\u540d\u89e3\u6790\u5230\u4f60\u7684\u670d\u52a1\u5668<\/h3>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418110653-6802324d8d47f.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><\/p>\n<p>\u7b49\u5f8520s\u5de6\u53f3\u8ba9\u5176\u4f20\u64ad\u3002<\/p>\n<h3>2\u3001\u9a8c\u8bc1\u8be5\u57df\u540d\u662f\u5426\u89e3\u6790\u6210\u529f<\/h3>\n<p>\u6267\u884c nslookup &#043; \u57df\u540d&#xff0c;\u5373\u53ef\u67e5\u8be2\u57df\u540d\u89e3\u6790\u5bf9\u8c61<\/p>\n<p>nslookup bak.sligenai.cn<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418110654-6802324e8cbe0.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/> \u770b\u5230\u89e3\u6790\u5230\u4f60\u7684\u516c\u7f51\u670d\u52a1\u5668\u7684ip\u5c31\u5b8c\u6210\u4e86<\/p>\n<h3>3\u3001let\u2019s Encrypt \u8bc1\u4e66\u7533\u8bf7<\/h3>\n<h4>&#xff08;1&#xff09;certbot\u5b89\u88c5<\/h4>\n<p>\u6211\u4eec\u9700\u8981\u5b89\u88c5Certbot\u5e76\u7528\u4e8e\u7533\u8bf7let\u2019s Encrypt \u3002 \u6253\u5f00\u7ec8\u7aef&#xff0c;\u8fd0\u884c\u4ee5\u4e0b\u547d\u4ee4&#xff1a;<\/p>\n<p>sudo apt update<br \/>\nsudo apt install certbot python3-certbot-nginx<\/p>\n<h4>&#xff08;2&#xff09;let\u2019s Encrypt \u8bc1\u4e66\u7533\u8bf7<\/h4>\n<p> sudo certbot &#8211;nginx -d bak.sligenai.cn<\/p>\n<p>\u5982\u679c\u662f\u7b2c\u4e00\u6b21&#xff0c;\u53ef\u80fd\u4f1a\u8981\u4f60\u8f93\u5165\u4f60\u7684\u90ae\u7bb1\u548c\u8ba9\u4f60\u8f93\u5165A\u6216Yes\u540c\u610f\u4e00\u4e9b\u6761\u6b3e\u4f60\u6309\u7740\u8f93\u5165\u5c31\u884c\u3002 <img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418110654-6802324eaf817.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/> \u7136\u540e\u5c31\u751f\u6210\u597d\u8bc1\u4e66\u4e86\u3002\u8bb0\u5f97\u4fdd\u5b58\u597dfullchain.pem\u548cprivate.pem\u7684\u8def\u5f84&#xff0c;\u8fd9\u4e2a\u7b49\u4e0b\u4f1a\u7528\u5230\u3002<\/p>\n<p>\u4e0b\u9762\u662f\u6211\u7684fullchain.pem\u548cprivate.pem\u7684\u8def\u5f84 \/etc\/letsencrypt\/live\/bak.sligenai.cn\/fullchain.pem \/etc\/letsencrypt\/live\/bak.sligenai.cn\/privkey.pem<\/p>\n<p>fullchain.pem\u548cprivkey.pem\u8fd9\u4e24\u4e2a\u6587\u4ef6\u5bf9\u4e8e\u914d\u7f6eWeb\u670d\u52a1\u5668\u4ee5\u5b89\u5168\u5730\u63d0\u4f9b\u670d\u52a1\u662f\u975e\u5e38\u91cd\u8981\u7684\u3002\u4e0b\u9762\u662f\u8fd9\u4e24\u4e2a\u6587\u4ef6\u7684\u8be6\u7ec6\u8bf4\u660e&#xff1a; fullchain.pem<\/p>\n<ul>\n<li>\u542b\u4e49&#xff1a;fullchain.pem\u6587\u4ef6\u5305\u542b\u4e86\u4f60\u7684\u57df\u540d\u8bc1\u4e66\u4ee5\u53ca\u4efb\u4f55\u4e2d\u95f4\u8bc1\u4e66\u7684\u5b8c\u6574\u94fe&#xff0c;\u4f46\u4e0d\u5305\u62ec\u6839\u8bc1\u4e66\u3002\u8fd9\u4e2a\u6587\u4ef6\u662f\u5c06\u4f60\u7684\u8bc1\u4e66(cert.pem)\u548c\u4e2d\u95f4\u8bc1\u4e66(chain.pem)\u5408\u5e76\u800c\u6210\u7684\u3002\u5728\u5927\u591a\u6570Web\u670d\u52a1\u5668\u7684SSL\u914d\u7f6e\u4e2d&#xff0c;\u4f7f\u7528\u8fd9\u4e2a\u6587\u4ef6\u53ef\u4ee5\u786e\u4fdd\u5ba2\u6237\u7aef&#xff08;\u5982Web\u6d4f\u89c8\u5668&#xff09;\u80fd\u591f\u4fe1\u4efb\u4f60\u7684\u8bc1\u4e66&#xff0c;\u5373\u80fd\u591f\u901a\u8fc7\u8bc1\u4e66\u94fe\u9a8c\u8bc1\u5230\u8fbe\u4e00\u4e2a\u6839CA&#xff0c;\u8be5\u6839CA\u5df2\u88ab\u5ba2\u6237\u7aef\u4fe1\u4efb\u3002<\/li>\n<li>\u7528\u9014&#xff1a;\u5728\u914d\u7f6eSSL\/TLS\u65f6&#xff0c;fullchain.pem\u901a\u5e38\u7528\u4e8e\u670d\u52a1\u5668\u914d\u7f6e\u4e2d\u6307\u5b9a\u8bc1\u4e66\u6587\u4ef6\u3002\u4f8b\u5982&#xff0c;\u5728Nginx\u4e2d&#xff0c;\u4f1a\u7528\u5b83\u6765\u8bbe\u7f6essl_certificate\u6307\u4ee4\u3002<\/li>\n<\/ul>\n<p>privkey.pem<\/p>\n<ul>\n<li>\u542b\u4e49&#xff1a;privkey.pem\u6587\u4ef6\u5305\u542b\u4e86\u4f60\u7684\u79c1\u94a5&#xff0c;\u8fd9\u662f\u5728\u751f\u6210CSR&#xff08;\u8bc1\u4e66\u7b7e\u540d\u8bf7\u6c42&#xff09;\u65f6\u521b\u5efa\u7684\u3002\u79c1\u94a5\u662f\u5b89\u5168\u901a\u4fe1\u7684\u57fa\u7840&#xff0c;\u7528\u4e8e\u5728SSL\/TLS\u63e1\u624b\u8fc7\u7a0b\u4e2d\u5bf9\u670d\u52a1\u5668\u7aef\u4fe1\u606f\u8fdb\u884c\u52a0\u5bc6&#xff0c;\u786e\u4fdd\u53ea\u6709\u5bf9\u5e94\u7684\u516c\u94a5&#xff08;\u5373\u4f60\u7684\u670d\u52a1\u5668\u8bc1\u4e66&#xff09;\u80fd\u591f\u89e3\u5bc6\u3002\u79c1\u94a5\u5fc5\u987b\u4fdd\u5bc6&#xff0c;\u4efb\u4f55\u6cc4\u9732\u90fd\u53ef\u80fd\u5bfc\u81f4\u901a\u4fe1\u88ab\u89e3\u5bc6\u3002<\/li>\n<li>\u7528\u9014&#xff1a;\u5728Web\u670d\u52a1\u5668\u7684SSL\u914d\u7f6e\u4e2d&#xff0c;privkey.pem\u7528\u4e8e\u8bbe\u7f6e\u79c1\u94a5\u6587\u4ef6\u7684\u4f4d\u7f6e\u3002\u4f8b\u5982&#xff0c;\u5728Nginx\u914d\u7f6e\u4e2d&#xff0c;\u4f1a\u7528\u5b83\u6765\u8bbe\u7f6essl_certificate_key\u6307\u4ee4\u3002<\/li>\n<\/ul>\n<p>\u603b\u7ed3<\/p>\n<ul>\n<li>fullchain.pem&#xff1a;\u5305\u542b\u4f60\u7684\u57df\u540d\u8bc1\u4e66\u548c\u4e2d\u95f4\u8bc1\u4e66\u7684\u5168\u90e8\u5185\u5bb9&#xff0c;\u7528\u4e8e\u670d\u52a1\u5668\u914d\u7f6e\u4e2d\u6307\u5b9a\u8bc1\u4e66\u94fe\u3002<\/li>\n<li>privkey.pem&#xff1a;\u5305\u542b\u4f60\u7684\u79c1\u94a5&#xff0c;\u7528\u4e8e\u670d\u52a1\u5668\u914d\u7f6e\u4e2d\u6307\u5b9a\u79c1\u94a5\u6587\u4ef6\u7684\u4f4d\u7f6e\u3002<\/li>\n<\/ul>\n<p>\u5728\u914d\u7f6eSSL\/TLS\u65f6&#xff0c;\u786e\u4fdd\u6b63\u786e\u4f7f\u7528\u8fd9\u4e9b\u6587\u4ef6&#xff0c;\u540c\u65f6\u4fdd\u62a4\u597d\u4f60\u7684\u79c1\u94a5&#xff0c;\u907f\u514d\u5b89\u5168\u98ce\u9669\u3002<\/p>\n<p>\u6ce81&#xff1a;\u5982\u679c\u4f60\u6ca1\u6709\u5f00\u653e443&#xff0c;80\u7aef\u53e3&#xff0c;\u7533\u8bf7\u7684\u65f6\u5019\u4f1a\u62a5\u9519 \u6ce82&#xff1a;\u5982\u679c\u4f60\u6ca1\u6709\u5c06\u57df\u540d\u89e3\u6790\u5230\u8fd9\u4e2a\u670d\u52a1\u5668\u7684ip\u4e5f\u4f1a\u62a5\u9519&#xff0c;\u4f1a\u51fa\u73b0\u7c7b\u4f3c\u4e0b\u9762\u7684\u56de\u590d\u3002 <img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418110655-6802324f3ece6.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><\/p>\n<h2>\u4e09\u3001\u914d\u7f6enginx<\/h2>\n<h3>1\u3001nginx\u5b89\u88c5<\/h3>\n<p>sudo apt update<br \/>\nsudo apt install nginx<\/p>\n<h3>2\u3001\u914d\u7f6enginx.conf<\/h3>\n<p>\u6253\u5f00nginx.conf<\/p>\n<p> vim \/etc\/nginx\/nginx.conf<\/p>\n<p>\u4e0b\u9762\u662f\u4e00\u4e2anginx.conf\u6a21\u7248<\/p>\n<p># nginx.conf<br \/>\nworker_processes auto; # \u4e0eworker_connections\u4e58\u79ef\u8868\u793a\u5b9e\u9645\u5904\u7406\u4e8b\u4ef6\u7684\u603b\u6570<\/p>\n<p>events {<br \/>\n    worker_connections 1024;  # \u6bcf\u4e2a\u5de5\u4f5c\u8fdb\u7a0b\u8fde\u63a5\u6570<br \/>\n}<\/p>\n<p>http {<br \/>\n    include       mime.types;   # \u6587\u4ef6\u6269\u5c55\u540d\u4e0e\u6587\u4ef6\u7c7b\u578b\u6620\u5c04\u8868<br \/>\n    default_type  application\/octet-stream;<br \/>\n    client_max_body_size 10M;<br \/>\n    sendfile        on;            # \u51cf\u5c11\u7f51\u7edc\u62a5\u6587\u6570\u91cf<br \/>\n    keepalive_timeout  65; # \u94fe\u63a5\u8d85\u65f6\u65f6\u95f4&#xff0c;\u81ea\u52a8\u65ad\u5f00&#xff0c;\u5982\u679c\u4e3a0\u5219\u65e0\u9650\u65f6\u957f\u3002<\/p>\n<p>    # HTTP server\u914d\u7f6e&#xff08;\u91cd\u5b9a\u5411\u5230HTTPS&#xff09;<br \/>\n    server {<br \/>\n        listen 80;  # \u76d1\u542c80\u7aef\u53e3<br \/>\n        server_name bak.sligenai.cn;             # \u66ff\u6362\u4e3a\u4f60\u7684\u57df\u540d<br \/>\n        return 301 https:\/\/$host$request_uri;  # \u5f3a\u5236\u91cd\u5b9a\u5411\u5230HTTPS<br \/>\n    }<br \/>\n    # HTTPS server\u914d\u7f6e<br \/>\n    server {<br \/>\n        listen 443 ssl;  # \u76d1\u542c443\u7aef\u53e3<br \/>\n        server_name bak.sligenai.cn;             # \u66ff\u6362\u4e3a\u4f60\u7684\u57df\u540d<\/p>\n<p>        ssl_certificate \/etc\/letsencrypt\/live\/bak.sligenai.cn\/fullchain.pem;          #\u66ff\u6362\u4e3a\u4f60\u7684fuuchian.pem<br \/>\n        ssl_certificate_key \/etc\/letsencrypt\/live\/bak.sligenai.cn\/privkey.pem;    #\u66ff\u6362\u4e3a\u4f60\u7684privkey.pem<\/p>\n<p>        root         \/usr\/share\/nginx\/html;<\/p>\n<p>        location \/ {<br \/>\n            index index.html index.htm;<br \/>\n            rewrite \/ \/login permanent; # \u6839\u636e\u9700\u6c42\u9009\u62e9\u662f\u5426\u4fdd\u7559<br \/>\n        }<\/p>\n<p>        location \/vue-test {                              #\u66ff\u6362\u4e3a\u4f60\u7684\u9879\u76ee\u8def\u7531&#xff0c;\u6ce8\u610f\u9700\u8981\u4e00\u5f00\u5934\u7684base\u4e00\u81f4<br \/>\n            index index.html index.htm;<br \/>\n            try_files $uri $uri\/ \/vue-test\/index.html;       #\u8fd9\u4e2a\u5219\u662f\/\u8def\u7531\/index.html \u524d\u9762\u7684\u90e8\u5206\u4e00\u81f4\u4e0d\u7528\u52a8\u3002<br \/>\n        }<\/p>\n<p>          location \/abc {   #\u66ff\u6362\u4e3a\u8bf7\u6c42\u62e6\u622a\u5668\u4e2d\u7684baseURL\u7684\u5730\u5740&#xff0c;\u5982\u679c\u6ca1\u6709\u540e\u7aef\u5219\u53ef\u4ee5\u5220\u6389\u8fd9\u4e00\u90e8\u5206<br \/>\n            add_header Cache-Control no-cache;<br \/>\n            add_header Pragma no-cache;<br \/>\n            add_header Expires 0;<br \/>\n            proxy_pass  http:\/\/localhost:3777\/;   #\u540e\u7aef\u5730\u5740<br \/>\n        }<br \/>\n        error_page  404  \/404.html;  # \u81ea\u5b9a\u4e49404\u9875\u9762<br \/>\n        location &#061; \/404.html {<br \/>\n            internal;<br \/>\n        }<\/p>\n<p>        error_page  500 502 503 504  \/50x.html;  # \u81ea\u5b9a\u4e49500\u9875\u9762<br \/>\n        location &#061; \/50x.html {<br \/>\n            internal;<br \/>\n        }<br \/>\n    }<\/p>\n<p>}<\/p>\n<p>\u6ce81&#xff1a;\u4e0a\u9762\u4e00\u5171\u4e24\u4e2a\u8def\u7531 \/vue-test\u3001 \/abc &#xff0c;\u5206\u522b\u4e3a\u524d\u7aef\u548c\u540e\u7aef\u3002 \u6ce82&#xff1a;\u5982\u679c\u6709\u591a\u4e2a\u9879\u76ee\u5219\u590d\u5236\/vue-test \u5728\u65c1\u8fb9\u7c98\u8d34\u4e00\u4e2a&#xff0c;\u6539\u6389\u8def\u7531\u5373\u53ef\u3002 \u6ce83&#xff1a; \u5982\u679c\u6709\u5176\u4ed6\u57df\u540d&#xff0c;\u5219\u989d\u5916\u628a\u4e0a\u9762\u8fd9\u4e2aserver\u590d\u5236\u4e00\u904d&#xff0c;\u5373\u53ef\u3002<\/p>\n<h3>3\u3001\u91cd\u65b0\u8fd0\u884cnginx<\/h3>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418110655-6802324f9dbb8.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/> \u68c0\u6d4bnginx.conf\u662f\u5426\u914d\u7f6e\u6b63\u5e38<\/p>\n<p>nginx -t<\/p>\n<p>\u5982\u679c\u62a5\u9519&#xff0c;\u5219\u6309\u7167\u63d0\u793a\u4fee\u6539\u5373\u53ef\u3002<\/p>\n<p>\u91cd\u65b0\u8fd0\u884cnginx<\/p>\n<p>sudo systemctl reload nginx<\/p>\n<h3>4\u3001vue \u7f16\u8bd1\u540e\u6587\u4ef6\u4e0a\u4f20\u670d\u52a1\u5668<\/h3>\n<p>\u5728\u8fd9\u91cc\u6211\u4eec\u4f7f\u7528SCP\u5b8c\u6210\u4f20\u8f93<\/p>\n<p>scp&#xff08;Secure Copy Protocol&#xff09;\u662f\u4e00\u4e2a\u5728Linux\u548cUnix\u7cfb\u7edf\u4e0a\u5e7f\u6cdb\u4f7f\u7528\u7684\u547d\u4ee4\u884c\u5de5\u5177&#xff0c;\u7528\u4e8e\u5728\u672c\u5730\u548c\u8fdc\u7a0b\u4e4b\u95f4\u5b89\u5168\u5730\u590d\u5236\u6587\u4ef6\u548c\u76ee\u5f55\u3002\u5b83\u57fa\u4e8eSSH&#xff08;Secure Shell&#xff09;\u534f\u8bae&#xff0c;\u63d0\u4f9b\u4e86\u6570\u636e\u4f20\u8f93\u7684\u52a0\u5bc6\u548c\u5b89\u5168\u8ba4\u8bc1&#xff0c;\u786e\u4fdd\u5728\u4f20\u8f93\u8fc7\u7a0b\u4e2d\u6570\u636e\u4e0d\u4f1a\u88ab\u7a83\u542c\u6216\u7be1\u6539\u3002<\/p>\n<p>scp\u7684\u57fa\u672c\u8bed\u6cd5\u975e\u5e38\u76f4\u63a5&#xff0c;\u53ef\u4ee5\u7528\u6765\u590d\u5236\u6587\u4ef6\u6216\u76ee\u5f55\u4ece\u4e00\u4e2a\u4f4d\u7f6e\u5230\u53e6\u4e00\u4e2a\u4f4d\u7f6e\u3002\u8fd9\u91cc\u6709\u51e0\u4e2a\u5e38\u89c1\u7684\u7528\u6cd5\u793a\u4f8b&#xff1a;<\/p>\n<li>\u590d\u5236\u672c\u5730\u6587\u4ef6\u5230\u8fdc\u7a0b<\/li>\n<li>\u6a21\u7248&#xff1a;scp \/path\/to\/local\/file username&#064;remotehost:\/path\/to\/remote\/directory<\/li>\n<p>\u6211\u4eec\u8981\u62f7\u8d1d\u7f16\u8bd1\u540e\u6587\u4ef6\u5230nginx\u7684web\u9875\u9762\u653e\u7f6e\u5730\u65b9&#xff1a;\/usr\/share\/nginx\/html \u6240\u4ee5\u6211\u4eec\u5230\u9879\u76ee\u8def\u5f84\u4e0b\u6267\u884c\u6307\u4ee4\u5982\u4e0b&#xff1a;(ip\u66ff\u6362\u4e3a\u4f60\u7684)<\/p>\n<p>scp -r .\\\\dist\\\\ root&#064;123.57.210.235:\/usr\/share\/nginx\/html<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418110655-6802324fae6f7.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/> \u91cd\u547d\u540ddist\u4e3a\u8def\u7531\u7684\u5730\u5740<\/p>\n<h2>\u56db\u3001\u540e\u8bdd<\/h2>\n<h3>1\u3001\u5b8c\u7ed3<\/h3>\n<p>\u7136\u540e\u6211\u4eec\u8fdb\u5165:https:\/\/bak.sligenai.cn\/vue-test\/&#xff0c;\u53ef\u4ee5\u770b\u5230\u5df2\u7ecf\u8bbf\u95ee\u6210\u529f\u4e86&#xff01; \u606d\u559c\u4f60&#xff01;\u638c\u63e1\u4e86\u5982\u4f55\u4ece\u96f6\u5f00\u59cb\u7684 vue\u9879\u76ee\u90e8\u7f72\u5230\u670d\u52a1\u5668&#xff08;vue\u9879\u76eebuild\u6253\u5305&#043;nginx\u90e8\u7f72&#043;\u914d\u7f6essl\u8bc1\u4e66&#xff09;&#xff0c;\u6267\u884c\u4e0a\u9762\u7684\u6b65\u9aa4\u5982\u679c\u6709\u4ec0\u4e48\u95ee\u9898\u6b22\u8fce\u5728\u4e0b\u9762\u63d0\u51fa&#xff01;<\/p>\n<p>\u81f3\u6b64&#xff0c;\u4f60\u5df2\u7ecf\u6210\u529f\u4e3a\u4f60\u7684\u7f51\u7ad9\u5b89\u88c5\u4e86Let\u2019s Encrypt SSL\u8bc1\u4e66&#xff0c;\u5e76\u914d\u7f6e\u4e86\u81ea\u52a8\u7eed\u8ba2\u3002\u4f60\u7684\u7f51\u7ad9\u73b0\u5728\u5e94\u8be5\u4e5f\u53ef\u4ee5\u901a\u8fc7HTTPS\u5b89\u5168\u8bbf\u95ee\u4e86\u3002 <img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418110655-6802324fcd119.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><\/p>\n<h3>2\u3001\u6bcf\u65e5\u5c0ftip&#xff1a;ssl\u8bc1\u4e66\u81ea\u52a8\u7eed\u8ba2\u3002<\/h3>\n<p>let\u2019s Encrypt\u7684\u6709\u6548\u671f\u662f90\u5929&#xff0c;\u600e\u4e48\u81ea\u52a8\u66f4\u65b0\u5462&#xff1f;\u8fd0\u884c\u4e0b\u9762\u7684\u4ee3\u7801&#xff1a;<\/p>\n<p>sudo certbot renew &#8211;dry-run<\/p>\n<p>\u5982\u679c\u8fd9\u4e2a\u547d\u4ee4\u6210\u529f\u6267\u884c&#xff0c;\u90a3\u4e48\u8bc1\u4e66\u7eed\u8ba2\u5de5\u4f5c\u5c06\u81ea\u52a8\u8fdb\u884c\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb4.6k\u6b21\uff0c\u70b9\u8d5e15\u6b21\uff0c\u6536\u85cf37\u6b21\u3002\u672a\u6765\u7684\u5f00\u53d1\u8005\u4eec\u8bf7\u4e0a\u5ea7\uff0c\u5728\u8fd9\u91cc\u8bb8\u591a\u4eba\u5728\u81ea\u5df1\u7684\u7535\u8111\u505a\u5b8c\u524d\u7aef\u540e\uff0c\u4e0b\u4e00\u6b65\u5c31\u662f\u600e\u4e48\u90e8\u7f72\u5230\u670d\u52a1\u5668\u4e0a\u5bf9\u5916\u5f00\u653e\u4e86\u3002ps\uff1a\u9ed8\u8ba4\u5404\u4f4d\u5927\u5927\u5df2\u7ecf\u8d2d\u4e70\u4e91\u670d\u52a1\u5668\u4e86\u54c8\u3002\u6211\u7684\u670d\u52a1\u5668\u662fubutu 22.04\uff0c\u7b2c\u4e00\u6b21\u8ddf\u968f\u672c\u6559\u7a0b\u7684\u65f6\u5019\u6700\u597d\u4e5f\u662fubuntu\u7cfb\u7edf\uff0c\u907f\u514d\u73af\u5883\u95ee\u9898\u3002_vue\u90e8\u7f72\u5230\u670d\u52a1\u5668\u6b65\u9aa4<\/p>\n","protected":false},"author":2,"featured_media":11944,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[117,625,87,43],"topic":[],"class_list":["post-11953","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-server","tag-nginx","tag-vue-js","tag-87","tag-43"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>\u4ece\u96f6\u5f00\u59cb\u7684 vue\u9879\u76ee\u90e8\u7f72\u5230\u670d\u52a1\u5668\u8be6\u7ec6\u6b65\u9aa4\uff08vue\u9879\u76eebuild\u6253\u5305+nginx\u90e8\u7f72+\u914d\u7f6essl\u8bc1\u4e66\uff09 - \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\/11953.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u4ece\u96f6\u5f00\u59cb\u7684 vue\u9879\u76ee\u90e8\u7f72\u5230\u670d\u52a1\u5668\u8be6\u7ec6\u6b65\u9aa4\uff08vue\u9879\u76eebuild\u6253\u5305+nginx\u90e8\u7f72+\u914d\u7f6essl\u8bc1\u4e66\uff09 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb4.6k\u6b21\uff0c\u70b9\u8d5e15\u6b21\uff0c\u6536\u85cf37\u6b21\u3002\u672a\u6765\u7684\u5f00\u53d1\u8005\u4eec\u8bf7\u4e0a\u5ea7\uff0c\u5728\u8fd9\u91cc\u8bb8\u591a\u4eba\u5728\u81ea\u5df1\u7684\u7535\u8111\u505a\u5b8c\u524d\u7aef\u540e\uff0c\u4e0b\u4e00\u6b65\u5c31\u662f\u600e\u4e48\u90e8\u7f72\u5230\u670d\u52a1\u5668\u4e0a\u5bf9\u5916\u5f00\u653e\u4e86\u3002ps\uff1a\u9ed8\u8ba4\u5404\u4f4d\u5927\u5927\u5df2\u7ecf\u8d2d\u4e70\u4e91\u670d\u52a1\u5668\u4e86\u54c8\u3002\u6211\u7684\u670d\u52a1\u5668\u662fubutu 22.04\uff0c\u7b2c\u4e00\u6b21\u8ddf\u968f\u672c\u6559\u7a0b\u7684\u65f6\u5019\u6700\u597d\u4e5f\u662fubuntu\u7cfb\u7edf\uff0c\u907f\u514d\u73af\u5883\u95ee\u9898\u3002_vue\u90e8\u7f72\u5230\u670d\u52a1\u5668\u6b65\u9aa4\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/11953.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2025-04-18T11:06:57+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418110652-6802324cea2fd.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=\"3 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/11953.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/11953.html\",\"name\":\"\u4ece\u96f6\u5f00\u59cb\u7684 vue\u9879\u76ee\u90e8\u7f72\u5230\u670d\u52a1\u5668\u8be6\u7ec6\u6b65\u9aa4\uff08vue\u9879\u76eebuild\u6253\u5305+nginx\u90e8\u7f72+\u914d\u7f6essl\u8bc1\u4e66\uff09 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2025-04-18T11:06:57+00:00\",\"dateModified\":\"2025-04-18T11:06:57+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/11953.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/11953.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/11953.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u4ece\u96f6\u5f00\u59cb\u7684 vue\u9879\u76ee\u90e8\u7f72\u5230\u670d\u52a1\u5668\u8be6\u7ec6\u6b65\u9aa4\uff08vue\u9879\u76eebuild\u6253\u5305+nginx\u90e8\u7f72+\u914d\u7f6essl\u8bc1\u4e66\uff09\"}]},{\"@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":"\u4ece\u96f6\u5f00\u59cb\u7684 vue\u9879\u76ee\u90e8\u7f72\u5230\u670d\u52a1\u5668\u8be6\u7ec6\u6b65\u9aa4\uff08vue\u9879\u76eebuild\u6253\u5305+nginx\u90e8\u7f72+\u914d\u7f6essl\u8bc1\u4e66\uff09 - \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\/11953.html","og_locale":"zh_CN","og_type":"article","og_title":"\u4ece\u96f6\u5f00\u59cb\u7684 vue\u9879\u76ee\u90e8\u7f72\u5230\u670d\u52a1\u5668\u8be6\u7ec6\u6b65\u9aa4\uff08vue\u9879\u76eebuild\u6253\u5305+nginx\u90e8\u7f72+\u914d\u7f6essl\u8bc1\u4e66\uff09 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb4.6k\u6b21\uff0c\u70b9\u8d5e15\u6b21\uff0c\u6536\u85cf37\u6b21\u3002\u672a\u6765\u7684\u5f00\u53d1\u8005\u4eec\u8bf7\u4e0a\u5ea7\uff0c\u5728\u8fd9\u91cc\u8bb8\u591a\u4eba\u5728\u81ea\u5df1\u7684\u7535\u8111\u505a\u5b8c\u524d\u7aef\u540e\uff0c\u4e0b\u4e00\u6b65\u5c31\u662f\u600e\u4e48\u90e8\u7f72\u5230\u670d\u52a1\u5668\u4e0a\u5bf9\u5916\u5f00\u653e\u4e86\u3002ps\uff1a\u9ed8\u8ba4\u5404\u4f4d\u5927\u5927\u5df2\u7ecf\u8d2d\u4e70\u4e91\u670d\u52a1\u5668\u4e86\u54c8\u3002\u6211\u7684\u670d\u52a1\u5668\u662fubutu 22.04\uff0c\u7b2c\u4e00\u6b21\u8ddf\u968f\u672c\u6559\u7a0b\u7684\u65f6\u5019\u6700\u597d\u4e5f\u662fubuntu\u7cfb\u7edf\uff0c\u907f\u514d\u73af\u5883\u95ee\u9898\u3002_vue\u90e8\u7f72\u5230\u670d\u52a1\u5668\u6b65\u9aa4","og_url":"https:\/\/www.wsisp.com\/helps\/11953.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2025-04-18T11:06:57+00:00","og_image":[{"url":"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418110652-6802324cea2fd.png"}],"author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"3 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/11953.html","url":"https:\/\/www.wsisp.com\/helps\/11953.html","name":"\u4ece\u96f6\u5f00\u59cb\u7684 vue\u9879\u76ee\u90e8\u7f72\u5230\u670d\u52a1\u5668\u8be6\u7ec6\u6b65\u9aa4\uff08vue\u9879\u76eebuild\u6253\u5305+nginx\u90e8\u7f72+\u914d\u7f6essl\u8bc1\u4e66\uff09 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2025-04-18T11:06:57+00:00","dateModified":"2025-04-18T11:06:57+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/11953.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/11953.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/11953.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"\u4ece\u96f6\u5f00\u59cb\u7684 vue\u9879\u76ee\u90e8\u7f72\u5230\u670d\u52a1\u5668\u8be6\u7ec6\u6b65\u9aa4\uff08vue\u9879\u76eebuild\u6253\u5305+nginx\u90e8\u7f72+\u914d\u7f6essl\u8bc1\u4e66\uff09"}]},{"@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\/11953","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=11953"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/11953\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media\/11944"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=11953"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=11953"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=11953"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=11953"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}