{"id":11749,"date":"2025-04-18T18:58:25","date_gmt":"2025-04-18T10:58:25","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/11749.html"},"modified":"2025-04-18T18:58:25","modified_gmt":"2025-04-18T10:58:25","slug":"%e5%9f%9f%e5%90%8d%e6%9c%8d%e5%8a%a1%e5%99%a8nginx%e5%ae%9d%e5%a1%94%e4%bd%bf%e7%94%a8ssl%e8%af%81%e4%b9%a6%e9%85%8d%e7%bd%aehttps","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/11749.html","title":{"rendered":"\u57df\u540d+\u670d\u52a1\u5668+Nginx+\u5b9d\u5854\u4f7f\u7528SSL\u8bc1\u4e66\u914d\u7f6eHTTPS"},"content":{"rendered":"<h2>\u524d\u8a00<\/h2>\n<p>\u5728\u6211\u7684\u524d\u9762\u6587\u7ae0\u91cc&#xff0c;\u6709\u5199\u8fc7\u4e00\u7bc7\u6587\u7ae0<\/p>\n<p>linux\u670d\u52a1\u5668&#043;\u5b9d\u5854\u4ece\u5934\u90e8\u7f72\u522b\u4eba\u53ef\u8bbf\u95ee\u7684\u7f51\u7ad9<\/p>\n<p>\u5728\u8fd9\u7bc7\u6587\u7ae0&#xff0c;\u6709\u6559\u5b66\u600e\u4e48\u4f7f\u7528\u5b9d\u5854\u548c\u4e70\u7684\u670d\u52a1\u5668\u7684\u516c\u7f51IP&#xff0c;\u4ee5\u53ca\u6559\u600e\u4e48\u6253\u5305vue\u548cspringboot\u53bb\u90e8\u7f72\u4e0d\u7528\u57df\u540d\u7684\u7f51\u7ad9\u8ba9\u522b\u4eba\u8bbf\u95ee<\/p>\n<p>\u90a3\u4e48&#xff0c;\u8fd9\u7bc7\u6587\u7ae0\u5c06\u5728\u8fd9\u4e2a\u57fa\u7840\u4e0a\u6765\u6559\u5927\u5bb6\u600e\u4e48\u53bb\u642d\u5efa\u901a\u8fc7\u57df\u540d\u8bbf\u95ee\u7684\u7f51\u7ad9<\/p>\n<h2>\u9879\u76ee\u5c55\u793a<\/h2>\n<p>\u5728\u6211\u7684\u9879\u76ee\u4e2d&#xff0c;\u6211\u5df2\u7ecf\u6210\u529f\u7684\u642d\u5efa\u51fa\u4e86https\u7684\u7f51\u7ad9<\/p>\n<p>HTTPS\u804a\u5929\u5ba4\u7f51\u7ad9<\/p>\n<p>\u70b9\u5f00\u4e4b\u540e\u6b63\u5e38\u7684\u8bbf\u95ee\u5230\u6211\u4eec\u7684\u9879\u76ee<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418105809-680230412d11f.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/> \u4ee5\u53ca\u80fd\u591f\u6210\u529f\u7684\u8c03\u7528\u540e\u7aef <img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418105811-6802304383369.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/> <img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418105812-6802304443c4e.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><\/p>\n<p>\u8fd9\u4e2a\u9879\u76ee\u5728\u5f88\u957f\u65f6\u95f4\u5185\u6211\u90fd\u4f1a\u6302\u8f7d\u90e8\u7f72,\u6211\u4e70\u7684\u963f\u91cc\u4e91\u7684\u57df\u540d\u548c\u670d\u52a1\u5668&#xff0c;\u6211\u53ef\u4ee5\u901a\u8fc7\u7535\u8111\u7aef\u6b63\u5e38\u7684\u8bbf\u95ee\u8be5\u94fe\u63a5&#xff0c;\u4f46\u662f\u624b\u673a\u7aef\u4e0d\u884c&#xff0c;\u95ee\u4e86\u963f\u91cc\u7684\u5ba2\u670d\u8bf4\u662f\u56e0\u4e3a\u7f51\u7ad9\u6ca1\u6709\u3010\u5907\u6848\u3011\u5bfc\u81f4<\/p>\n<h2>\u51c6\u5907\u5de5\u4f5c<\/h2>\n<p>\u4e3a\u4e86\u53ef\u4ee5\u6b63\u5e38\u7684\u642d\u5efa\u51fa\u53ef\u4ee5\u8bbf\u95ee\u57df\u540d\u7684https\u534f\u8bae\u7684\u7f51\u7ad9&#xff0c;\u6211\u4eec\u5728\u6b63\u5f0f\u5f00\u59cb\u524d\u9700\u8981\u505a\u4e00\u4e9b\u51c6\u5907\u5de5\u4f5c<\/p>\n<h4>\u670d\u52a1\u5668<\/h4>\n<p>\u8981\u90e8\u7f72\u57df\u540d\u7684\u5f53\u7136\u9700\u8981\u670d\u52a1\u5668&#xff0c;\u53ef\u4ee5\u6839\u636e\u81ea\u5df1\u9700\u8981\u8fdb\u884c\u8d2d\u4e70\u5373\u53ef<\/p>\n<h4>\u57df\u540d<\/h4>\n<p>\u9996\u5148\u4f60\u9700\u8981\u4e70\u4e00\u4e2a\u57df\u540d&#xff0c;\u7531\u4e8e\u6211\u7684\u670d\u52a1\u5668\u548c\u57df\u540d\u90fd\u662f\u5728\u963f\u91cc\u4e91\u4e70\u7684&#xff0c;\u56e0\u6b64\u7528\u963f\u91cc\u4e91\u8fdb\u884c\u6f14\u793a<\/p>\n<p>\u9996\u5148\u6839\u636e\u81ea\u5df1\u9700\u8981\u7533\u8bf7\u4e00\u4e2a\u57df\u540d<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418105812-68023044a6e51.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><\/p>\n<p>\u8d2d\u4e70\u5b8c\u4e4b\u540e&#xff0c;\u9700\u8981\u5b9e\u540d\u8ba4\u8bc1,\u70b9\u51fb\u3010\u4fe1\u606f\u6a21\u677f\u3011\u8fdb\u884c\u767b\u8bb0\u4fe1\u606f<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418105813-68023045ae6d8.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/> <img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418105814-680230461f874.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><\/p>\n<p>\u6309\u7167\u81ea\u5df1\u5b9e\u9645\u4fe1\u606f\u586b\u5199\u63d0\u4ea4\u5373\u53ef<\/p>\n<p>\u7b49\u5f85\u8ba4\u8bc1\u6210\u529f<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418105814-68023046bc355.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><\/p>\n<p>\u5c06\u4f60\u7684\u3010\u4fe1\u606f\u6a21\u677f\u3011\u5173\u8054\u5230\u4f60\u7684\u57df\u540d\u5373\u53ef<\/p>\n<h4>\u57df\u540d\u89e3\u6790<\/h4>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418105815-680230471d63f.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><\/p>\n<p>\u9009\u62e9\u4f60\u7684\u57df\u540d&#xff0c;\u53f3\u8fb9\u6709\u4e00\u4e2a\u89e3\u6790\u6309\u94ae,\u70b9\u51fb\u4e4b\u540e\u9ed8\u8ba4\u4f1a\u6709\u4e00\u4e2a_dnsauth\u7684\u89e3\u6790&#xff0c;\u8fd9\u4e2a\u4e0d\u7528\u52a8<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418105815-6802304774ba7.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><\/p>\n<p>\u7136\u540e\u6211\u4eec\u65b0\u589e\u4e00\u4e2a\u6cdb\u89e3\u6790<\/p>\n<p>\u4ee5\u6211\u7533\u8bf7\u7684\u57df\u540dspringsso.top\u4e3a\u4f8b&#xff0c;\u6cdb\u89e3\u6790\u7684\u610f\u601d\u662f\u4f60\u53ef\u4ee5\u6dfb\u52a0\u4efb\u610f\u524d\u7f00\u89e3\u6790\u5230\u4f60\u7684\u57df\u540d&#xff0c;\u5982<\/p>\n<p>chat.springsso.top student.springsso.top hotel.springsso.top \u2026<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418105816-6802304871b32.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><\/p>\n<p>\u6cdb\u89e3\u6790 \u8bb0\u5f55\u7c7b\u578b: A \u4e3b\u673a\u8bb0\u5f55: * \u8bb0\u5f55\u503c: \u4f60\u670d\u52a1\u5668\u7684\u516c\u7f51IP TTL:\u9ed8\u8ba410<\/p>\n<p>\u6dfb\u52a0\u4e00\u4e2a\u516c\u7f51IP\u89e3\u6790<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418105817-680230490c275.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><\/p>\n<p>\u8bb0\u5f55\u7c7b\u578b: &#064; \u4e3b\u673a\u8bb0\u5f55: * \u8bb0\u5f55\u503c: \u4f60\u670d\u52a1\u5668\u7684\u516c\u7f51IP TTL:\u9ed8\u8ba410<\/p>\n<h4>DNS\u62e8\u6d4b<\/h4>\n<p>\u540c\u6837\u662f\u8fd9\u4e2a\u754c\u9762&#xff0c;\u6709\u4e00\u4e2a\u751f\u6548\u68c0\u6d4b \u70b9\u51fb\u53ef\u4ee5\u8df3\u8f6c\u5230DNS\u62e8\u6d4b\u4e2d\u5fc3\u9a8c\u8bc1\u4f60\u7684\u57df\u540d\u89e3\u6790\u6709\u6ca1\u6709\u751f\u6548<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418105817-680230499b1a5.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/> <img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418105818-6802304a035f3.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><\/p>\n<p>\u5f53\u4f60\u80fd\u770b\u5230\u4f60\u7684\u57df\u540d\u53ef\u4ee5\u89e3\u6790\u5230\u4f60\u7684\u516c\u7f51IP\u503c&#xff0c;\u5373\u4ee3\u8868\u4f60\u7684\u57df\u540d\u89e3\u6790\u6210\u529f!\u60ac\u505c\u5728\u89e3\u6790\u7ed3\u679cIP\u53ef\u4ee5\u67e5\u770b\u89e3\u6790\u7684IP<\/p>\n<h4>SSL<\/h4>\n<p>\u521d\u671f\u6211\u4eec\u53ef\u4ee5\u7533\u8bf7\u514d\u8d39\u7684SSL\u8bc1\u4e66&#xff0c;\u641c\u7d22\u6570\u5b57\u8bc1\u4e66\u7ba1\u7406\u670d\u52a1<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418105818-6802304a9cb17.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/> \u627e\u5230\u3010SSL\u8bc1\u4e66\u7ba1\u7406\u3011\u4e0b\u7684\u3010\u4e2a\u4eba\u6d4b\u8bd5\u8bc1\u4e66&#xff08;\u539f\u514d\u8d39\u8bc1\u4e66&#xff09;\u3011&#xff0c;\u70b9\u51fb\u521b\u5efa\u8bc1\u4e66<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418105819-6802304be09e2.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><\/p>\n<p>\u8f93\u5165\u4f60\u7684\u57df\u540d,\u7136\u540e\u70b9\u51fb\u786e\u8ba4,\u4e00\u822c\u8bc1\u4e66\u521b\u5efa\u4e0b\u53d1\u7684\u8bdd&#xff0c;\u6162\u7684\u60c5\u51b5\u4e0b\u53ea\u9700\u8981\u5341\u591a\u5206\u949f \u5982\u679c\u4f60\u9694\u4e86\u5f88\u4e45\u6ca1\u6709\u751f\u6548&#xff0c;\u8bf7\u5728\u53f3\u8fb9\u89e3\u6790\u4e00\u4e0b&#xff08;\u521a\u521a\u5f00\u59cb\u9700\u8981\u89e3\u6790\u5230\u81ea\u5df1\u7684\u57df\u540d&#xff09;<\/p>\n<p>\u5f53\u751f\u6548\u4e4b\u540e&#xff0c;\u6211\u4eec\u70b9\u51fb\u66f4\u591a&#xff0c;\u627e\u5230\u3010\u4e0b\u8f7d\u3011<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418105820-6802304c98bfa.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><\/p>\n<p>\u6211\u4eec\u9700\u8981\u83b7\u53d6\u5230\u4e24\u4e2a\u8bc1\u4e66 Nginx: \u7528\u4e8eNginx\u90e8\u7f72\u4f7f\u7528 JKS: \u7528\u4e8e\u540e\u7aefspringboot\u5f00\u542fHTTPS\u4f7f\u7528<\/p>\n<h4>\u5b89\u5168\u7ec4\u548c\u7aef\u53e3<\/h4>\n<p>\u5b89\u5168\u7ec4\u662f\u6709\u9700\u8981\u6ce8\u610f\u7684\u4e8b\u9879\u7684&#xff0c;\u6211\u5728\u8fd9\u4e00\u6b65\u5361\u4e86\u5f88\u4e45&#xff0c;\u5b89\u5168\u7ec4\u9700\u8981\u548c\u6211\u4eec\u7684\u670d\u52a1\u5668\u5b9e\u4f8b\u8fdb\u884c\u5730\u57df\u7684\u5173\u8054&#xff0c;\u5982\u6211\u7684\u5b9e\u4f8b\u662f:<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418105821-6802304dd9e98.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><\/p>\n<p>\u4ed6\u7684\u5730\u57df\u662f\u534e\u53572&#xff08;\u6cb3\u6e90&#xff09;<\/p>\n<p>\u4f46\u662f\u5728\u6211\u6ca1\u6709\u521b\u5efa\u4efb\u4f55\u5b89\u5168\u7ec4\u7684\u60c5\u51b5\u4e0b&#xff0c;\u4e0d\u77e5\u9053\u4e3a\u4ec0\u4e48\u81ea\u52a8\u7ed9\u6211\u521b\u5efa\u4e863\u4e2a\u5b89\u5168\u7ec4<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418105822-6802304e21f8e.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><\/p>\n<p>\u4f60\u53ea\u6709\u914d\u7f6e\u5f00\u653e\u4e86\u5bf9\u5e94\u5730\u57df\u7684\u5b89\u5168\u7ec4\u7684\u51fa\u5165\u7ad9\u7aef\u53e3&#xff0c;\u624d\u80fd\u751f\u6548<\/p>\n<p>\u9488\u5bf9\u7aef\u53e3&#xff0c;\u6211\u4eec\u9700\u8981\u5f00\u653e\u8fd9\u4e48\u51e0\u4e2a\u7aef\u53e3 \u2764\ufe0f\u4f60\u9700\u8981\u90e8\u7f72\u7684\u540e\u7aef\u7684\u7aef\u53e3 \u2764\ufe0f\u5f00\u653e8080\u4ee5\u90e8\u7f72tomcat \u2764\ufe0f\u5f00\u653e80\u7aef\u53e3 \u2764\ufe0f\u5f00\u653e443\u7aef\u53e3 \u2764\ufe0f\u5982\u679c\u4f60\u7528\u7684\u662f\u5b9d\u5854\u8fdb\u884c\u90e8\u7f72&#xff0c;\u5b9d\u5854\u7684\u3010\u5b89\u5168\u3011\u7684\u3010\u7cfb\u7edf\u9632\u706b\u5899\u3011\u4e5f\u9700\u8981\u5f00\u653e\u5bf9\u5e94\u7aef\u53e3<\/p>\n<h4>\u5b9d\u5854<\/h4>\n<p>\u600e\u4e48\u6309\u7167\u5b9d\u5854\u4e0d\u9700\u8981\u591a\u8a00&#xff0c;\u53ef\u4ee5\u53c2\u8003\u6211\u6700\u4e0a\u9762\u7684\u6587\u7ae0\u94fe\u63a5&#xff0c;\u4e5f\u53ef\u4ee5\u767e\u5ea6<\/p>\n<h4>nginx<\/h4>\n<p>\u767b\u5f55\u5230\u5b9d\u5854\u4e4b\u540e,\u70b9\u51fb\u3010\u8f6f\u4ef6\u5546\u5e97\u3011&#xff0c;\u68c0\u7d22nginx\u8fdb\u884c\u4e0b\u8f7d<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418105823-6802304f1de6b.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><\/p>\n<h4>tomcat<\/h4>\n<p>\u540c\u6837\u5728\u3010\u8f6f\u4ef6\u5546\u5e97\u3011\u4e0b\u8f7dtomcat<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418105823-6802304fee4d0.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><\/p>\n<h2>SpringBoot\u9879\u76ee\u914d\u7f6e<\/h2>\n<p>\u6253\u5305\u65b9\u5f0f\u6211\u4eec\u540c\u6837\u53ef\u4ee5\u53c2\u8003\u6211\u7684\u4e0a\u7bc7\u6587\u7ae0&#xff0c;\u6216\u8005\u53c2\u8003\u767e\u5ea6\u5373\u53ef<\/p>\n<p>\u7136\u540e\u6211\u4eec\u9700\u8981\u62ff\u5230\u4e0b\u8f7d\u7684JKS\u7684\u8bc1\u4e66,\u653e\u5230\u4f60\u9879\u76ee\u7684resources\u6587\u4ef6\u5939\u4e0b<\/p>\n<p><img decoding=\"async\" src=\"2025-04-18hicvtcwqjnx.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><\/p>\n<p>\u7136\u540e\u5728application.yml\u65b0\u589e\u914d\u7f6e\u5982\u4e0b:<\/p>\n<p><span class=\"token key atrule\">server<\/span><span class=\"token punctuation\">:<\/span><br \/>\n  <span class=\"token key atrule\">port<\/span><span class=\"token punctuation\">:<\/span> <span class=\"token number\">8082<\/span> <span class=\"token comment\">#\u7aef\u53e3<\/span><br \/>\n  <span class=\"token key atrule\">servlet<\/span><span class=\"token punctuation\">:<\/span><br \/>\n    <span class=\"token key atrule\">context-path<\/span><span class=\"token punctuation\">:<\/span> \/chatEnd <span class=\"token comment\"># \u9879\u76ee\u4e3b\u8def\u7531<\/span><br \/>\n  <span class=\"token key atrule\">ssl<\/span><span class=\"token punctuation\">:<\/span> <span class=\"token comment\">#ssl\u914d\u7f6e<\/span><br \/>\n    <span class=\"token key atrule\">enabled<\/span><span class=\"token punctuation\">:<\/span> <span class=\"token boolean important\">true<\/span>  <span class=\"token comment\"># true\u4e3a\u5f00\u542fhttps<\/span><br \/>\n    <span class=\"token comment\">#key-alias: alias-key # \u522b\u540d(\u53ef\u4ee5\u4e0d\u8fdb\u884c\u914d\u7f6e)<\/span><br \/>\n    <span class=\"token comment\"># \u4fdd\u5b58SSL\u8bc1\u4e66\u7684\u79d8\u94a5\u5e93\u7684\u8def\u5f84<\/span><br \/>\n    <span class=\"token key atrule\">key-store<\/span><span class=\"token punctuation\">:<\/span> classpath<span class=\"token punctuation\">:<\/span>www.springsso.top.jks <span class=\"token comment\"># ssl\u8bc1\u4e66\u4f4d\u7f6e&#xff0c;\u5982\u679c\u653e\u5728resources\u6587\u4ef6\u5939\u4e0b\u5c31\u662f\u8fd9\u6837\u914d\u7f6e<\/span><br \/>\n    <span class=\"token key atrule\">key-password<\/span><span class=\"token punctuation\">:<\/span> \u79c1\u94a5\u5bc6\u7801<br \/>\n    <span class=\"token comment\">#key-store-password: \u8bc1\u4e66\u5bc6\u7801<\/span><br \/>\n    <span class=\"token key atrule\">key-store-type<\/span><span class=\"token punctuation\">:<\/span> JKS    <span class=\"token comment\"># \u8bc1\u4e66\u7c7b\u578b&#xff0c;\u9009\u62e9JKS<\/span><\/p>\n<p>\u4e0a\u8ff0\u914d\u7f6e\u4e2d key-password\u662f\u79c1\u94a5\u5bc6\u7801 key-store-password \u662f\u8bc1\u4e66\u5bc6\u7801\u3002 \u5982\u679c\u8fd9\u4e24\u4e2a\u5bc6\u7801\u76f8\u540c\u7684\u53ea\u914d\u7f6e\u4e00\u4e2a\u5373\u53ef&#xff0c;\u56e0\u4e3atomcat\u9ed8\u8ba4\u5148\u7528keyStore\u7684pass\u53bb\u89e3\u79c1\u94a5\u3002 &#xff08;PS&#xff1a;\u5982\u679c\u4f60\u4f7f\u7528\u963f\u91cc\u4e91\u4e0a\u7684\u514d\u8d39SSL\u8bc1\u4e66&#xff0c;\u4e0b\u8f7djks\u683c\u5f0f\u7684\u8bc1\u4e66\u7684\u65f6\u5019&#xff0c;\u53ea\u6709\u4e00\u4e2a\u5bc6\u7801&#xff0c;\u662f\u8bc1\u4e66\u7684\u5bc6\u7801&#xff09;<\/p>\n<p>\u6211\u7684\u9879\u76ee\u4e2d\u8bc1\u4e66\u914d\u7f6e\u5982\u4e0b&#xff08;\u5bc6\u7801\u770b\u5230\u65e0\u6240\u8c13&#xff0c;\u6bcf\u6b21\u8bc1\u4e66\u4e0b\u8f7d\u5bc6\u7801\u4f1a\u968f\u673a&#xff09;&#xff1a;<\/p>\n<p><img decoding=\"async\" src=\"2025-04-18uzct1kg31j5.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><\/p>\n<p>\u7136\u540e\u6253\u5305\u6210jar\u5305,\u4e0a\u4f20\u5230\u670d\u52a1\u5668&#xff0c;\u4efb\u610f\u4f4d\u7f6e&#xff0c;\u8bb0\u4f4f\u8def\u5f84\u5373\u53ef \u627e\u5230\u3010\u7f51\u7ad9\u3011\u7684\u3010java\u9879\u76ee\u3011&#xff0c;\u3010\u6dfb\u52a0Java\u9879\u76ee\u3011<\/p>\n<p><img decoding=\"async\" src=\"2025-04-18j2wbjtmhomz.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/> <img decoding=\"async\" src=\"2025-04-18pb4fm4le430.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><\/p>\n<p>jar\u8def\u5f84\u5373\u4f60\u6253\u5305\u4e4b\u540e\u7684\u9879\u76ee\u6587\u4ef6\u8def\u5f84,\u9879\u76eeJDK\u6839\u636e\u81ea\u5df1\u5b9e\u9645\u9879\u76ee\u8fdb\u884c\u8c03\u6574&#xff0c;\u5176\u4ed6\u9ed8\u8ba4\u5373\u53ef<\/p>\n<p>\u8fd9\u4e2a\u65f6\u5019\u4f60\u7684\u9879\u76ee\u8fd0\u884c\u662fhttps\u7684&#xff0c;\u53ea\u80fd\u7528https\u8fdb\u884c\u8c03\u7528\u63a5\u53e3<\/p>\n<h2>vue\u524d\u7aef\u914d\u7f6e<\/h2>\n<p>vue\u9879\u76ee&#xff0c;\u9700\u8981\u6620\u5c04\u5230\u6211\u4eec\u7684\u57df\u540d&#xff0c;\u4e5f\u5c31\u662f\u6211\u4eec\u6240\u6709\u6d89\u53ca\u5230ip\u7684&#xff0c;\u5168\u90e8\u8981\u66ff\u6362\u4e3a\u57df\u540d \u5982\u6211\u7684axios\u7684\u5c01\u88c5js<\/p>\n<p><span class=\"token keyword\">import<\/span> axios <span class=\"token keyword\">from<\/span> <span class=\"token string\">&#039;axios&#039;<\/span><\/p>\n<p>axios<span class=\"token punctuation\">.<\/span>defaults<span class=\"token punctuation\">.<\/span>headers<span class=\"token punctuation\">[<\/span><span class=\"token string\">&#039;Content-Type&#039;<\/span><span class=\"token punctuation\">]<\/span> <span class=\"token operator\">&#061;<\/span> <span class=\"token string\">&#039;application\/json;charset&#061;utf-8&#039;<\/span><\/p>\n<p><span class=\"token keyword\">const<\/span> service <span class=\"token operator\">&#061;<\/span> axios<span class=\"token punctuation\">.<\/span><span class=\"token function\">create<\/span><span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">{<\/span><br \/>\n  baseURL<span class=\"token operator\">:<\/span> <span class=\"token string\">&#039;https:\/\/springsso.top\/chatEnd&#039;<\/span><span class=\"token punctuation\">,<\/span><br \/>\n  timeout<span class=\"token operator\">:<\/span> <span class=\"token number\">30000<\/span><br \/>\n<span class=\"token punctuation\">}<\/span><span class=\"token punctuation\">)<\/span><\/p>\n<p>service<span class=\"token punctuation\">.<\/span>interceptors<span class=\"token punctuation\">.<\/span>request<span class=\"token punctuation\">.<\/span><span class=\"token function\">use<\/span><span class=\"token punctuation\">(<\/span><span class=\"token parameter\">config<\/span> <span class=\"token operator\">&#061;&gt;<\/span> <span class=\"token punctuation\">{<\/span><br \/>\n  <span class=\"token keyword\">return<\/span> config<br \/>\n<span class=\"token punctuation\">}<\/span><span class=\"token punctuation\">,<\/span><br \/>\n<span class=\"token parameter\">error<\/span> <span class=\"token operator\">&#061;&gt;<\/span> <span class=\"token punctuation\">{<\/span><br \/>\n  <span class=\"token keyword\">return<\/span> Promise<span class=\"token punctuation\">.<\/span><span class=\"token function\">reject<\/span><span class=\"token punctuation\">(<\/span>error<span class=\"token punctuation\">)<\/span><br \/>\n<span class=\"token punctuation\">}<\/span><br \/>\n<span class=\"token punctuation\">)<\/span><\/p>\n<p>service<span class=\"token punctuation\">.<\/span>interceptors<span class=\"token punctuation\">.<\/span>response<span class=\"token punctuation\">.<\/span><span class=\"token function\">use<\/span><span class=\"token punctuation\">(<\/span><br \/>\n  <span class=\"token parameter\">res<\/span> <span class=\"token operator\">&#061;&gt;<\/span> <span class=\"token punctuation\">{<\/span><br \/>\n    <span class=\"token keyword\">return<\/span> res<\/p>\n<p>  <span class=\"token punctuation\">}<\/span><br \/>\n<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><br \/>\n<span class=\"token keyword\">export<\/span> <span class=\"token keyword\">default<\/span> service<\/p>\n<p>config\u4e0b\u7684index.js<\/p>\n<p><span class=\"token string\">&#039;use strict&#039;<\/span><br \/>\n<span class=\"token comment\">\/\/ Template version: 1.3.1<\/span><br \/>\n<span class=\"token comment\">\/\/ see http:\/\/vuejs-templates.github.io\/webpack for documentation.<\/span><\/p>\n<p><span class=\"token keyword\">const<\/span> path <span class=\"token operator\">&#061;<\/span> <span class=\"token function\">require<\/span><span class=\"token punctuation\">(<\/span><span class=\"token string\">&#039;path&#039;<\/span><span class=\"token punctuation\">)<\/span><\/p>\n<p>module<span class=\"token punctuation\">.<\/span>exports <span class=\"token operator\">&#061;<\/span> <span class=\"token punctuation\">{<\/span><br \/>\n  dev<span class=\"token operator\">:<\/span> <span class=\"token punctuation\">{<\/span><br \/>\n    <span class=\"token comment\">\/\/ Paths<\/span><br \/>\n    assetsSubDirectory<span class=\"token operator\">:<\/span> <span class=\"token string\">&#039;static&#039;<\/span><span class=\"token punctuation\">,<\/span><br \/>\n    assetsPublicPath<span class=\"token operator\">:<\/span> <span class=\"token string\">&#039;\/&#039;<\/span><span class=\"token punctuation\">,<\/span><br \/>\n    proxyTable<span class=\"token operator\">:<\/span> <span class=\"token punctuation\">{<\/span><br \/>\n      <span class=\"token string\">&#039;\/&#039;<\/span><span class=\"token operator\">:<\/span> <span class=\"token punctuation\">{<\/span><br \/>\n        target<span class=\"token operator\">:<\/span> <span class=\"token string\">&#034;https:\/\/springsso.top\/chatEnd&#034;<\/span><span class=\"token punctuation\">,<\/span><br \/>\n        changeOrigin<span class=\"token operator\">:<\/span> <span class=\"token boolean\">true<\/span><span class=\"token punctuation\">,<\/span><br \/>\n        secure<span class=\"token operator\">:<\/span> <span class=\"token boolean\">false<\/span><span class=\"token punctuation\">,<\/span><br \/>\n        pathRewrite<span class=\"token operator\">:<\/span> <span class=\"token punctuation\">{<\/span><br \/>\n          <span class=\"token string\">&#039;^\/&#039;<\/span><span class=\"token operator\">:<\/span> <span class=\"token string\">&#039;&#039;<\/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<p>    <span class=\"token comment\">\/\/ Various Dev Server settings<\/span><br \/>\n    host<span class=\"token operator\">:<\/span> <span class=\"token string\">&#039;localhost&#039;<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token comment\">\/\/ can be overwritten by process.env.HOST<\/span><br \/>\n    port<span class=\"token operator\">:<\/span> <span class=\"token number\">8080<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token comment\">\/\/ can be overwritten by process.env.PORT, if port is in use, a free one will be determined<\/span><br \/>\n    autoOpenBrowser<span class=\"token operator\">:<\/span> <span class=\"token boolean\">false<\/span><span class=\"token punctuation\">,<\/span><br \/>\n    errorOverlay<span class=\"token operator\">:<\/span> <span class=\"token boolean\">true<\/span><span class=\"token punctuation\">,<\/span><br \/>\n    notifyOnErrors<span class=\"token operator\">:<\/span> <span class=\"token boolean\">true<\/span><span class=\"token punctuation\">,<\/span><br \/>\n    poll<span class=\"token operator\">:<\/span> <span class=\"token boolean\">false<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token comment\">\/\/ https:\/\/webpack.js.org\/configuration\/dev-server\/#devserver-watchoptions-<\/span><\/p>\n<p>    <span class=\"token comment\">\/**<br \/>\n     * Source Maps<br \/>\n     *\/<\/span><\/p>\n<p>    <span class=\"token comment\">\/\/ https:\/\/webpack.js.org\/configuration\/devtool\/#development<\/span><br \/>\n    devtool<span class=\"token operator\">:<\/span> <span class=\"token string\">&#039;cheap-module-eval-source-map&#039;<\/span><span class=\"token punctuation\">,<\/span><\/p>\n<p>    <span class=\"token comment\">\/\/ If you have problems debugging vue-files in devtools,<\/span><br \/>\n    <span class=\"token comment\">\/\/ set this to false &#8211; it *may* help<\/span><br \/>\n    <span class=\"token comment\">\/\/ https:\/\/vue-loader.vuejs.org\/en\/options.html#cachebusting<\/span><br \/>\n    cacheBusting<span class=\"token operator\">:<\/span> <span class=\"token boolean\">true<\/span><span class=\"token punctuation\">,<\/span><\/p>\n<p>    cssSourceMap<span class=\"token operator\">:<\/span> <span class=\"token boolean\">true<\/span><br \/>\n  <span class=\"token punctuation\">}<\/span><span class=\"token punctuation\">,<\/span><\/p>\n<p>  build<span class=\"token operator\">:<\/span> <span class=\"token punctuation\">{<\/span><br \/>\n    <span class=\"token comment\">\/\/ Template for index.html<\/span><br \/>\n    index<span class=\"token operator\">:<\/span> path<span class=\"token punctuation\">.<\/span><span class=\"token function\">resolve<\/span><span class=\"token punctuation\">(<\/span>__dirname<span class=\"token punctuation\">,<\/span> <span class=\"token string\">&#039;..\/dist\/index.html&#039;<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">,<\/span><\/p>\n<p>    <span class=\"token comment\">\/\/ Paths<\/span><br \/>\n    assetsRoot<span class=\"token operator\">:<\/span> path<span class=\"token punctuation\">.<\/span><span class=\"token function\">resolve<\/span><span class=\"token punctuation\">(<\/span>__dirname<span class=\"token punctuation\">,<\/span> <span class=\"token string\">&#039;..\/dist&#039;<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">,<\/span><br \/>\n    assetsSubDirectory<span class=\"token operator\">:<\/span> <span class=\"token string\">&#039;static&#039;<\/span><span class=\"token punctuation\">,<\/span><br \/>\n    assetsPublicPath<span class=\"token operator\">:<\/span> <span class=\"token string\">&#039;.\/&#039;<\/span><span class=\"token punctuation\">,<\/span><\/p>\n<p>    <span class=\"token comment\">\/**<br \/>\n     * Source Maps<br \/>\n     *\/<\/span><\/p>\n<p>    productionSourceMap<span class=\"token operator\">:<\/span> <span class=\"token boolean\">true<\/span><span class=\"token punctuation\">,<\/span><br \/>\n    <span class=\"token comment\">\/\/ https:\/\/webpack.js.org\/configuration\/devtool\/#production<\/span><br \/>\n    devtool<span class=\"token operator\">:<\/span> <span class=\"token string\">&#039;#source-map&#039;<\/span><span class=\"token punctuation\">,<\/span><\/p>\n<p>    <span class=\"token comment\">\/\/ Gzip off by default as many popular static hosts such as<\/span><br \/>\n    <span class=\"token comment\">\/\/ Surge or Netlify already gzip all static assets for you.<\/span><br \/>\n    <span class=\"token comment\">\/\/ Before setting to &#096;true&#096;, make sure to:<\/span><br \/>\n    <span class=\"token comment\">\/\/ npm install &#8211;save-dev compression-webpack-plugin<\/span><br \/>\n    productionGzip<span class=\"token operator\">:<\/span> <span class=\"token boolean\">false<\/span><span class=\"token punctuation\">,<\/span><br \/>\n    productionGzipExtensions<span class=\"token operator\">:<\/span> <span class=\"token punctuation\">[<\/span><span class=\"token string\">&#039;js&#039;<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token string\">&#039;css&#039;<\/span><span class=\"token punctuation\">]<\/span><span class=\"token punctuation\">,<\/span><\/p>\n<p>    <span class=\"token comment\">\/\/ Run the build command with an extra argument to<\/span><br \/>\n    <span class=\"token comment\">\/\/ View the bundle analyzer report after build finishes:<\/span><br \/>\n    <span class=\"token comment\">\/\/ &#096;npm run build &#8211;report&#096;<\/span><br \/>\n    <span class=\"token comment\">\/\/ Set to &#096;true&#096; or &#096;false&#096; to always turn it on or off<\/span><br \/>\n    bundleAnalyzerReport<span class=\"token operator\">:<\/span> process<span class=\"token punctuation\">.<\/span>env<span class=\"token punctuation\">.<\/span>npm_config_report<br \/>\n  <span class=\"token punctuation\">}<\/span><br \/>\n<span class=\"token punctuation\">}<\/span><\/p>\n<p>\u7136\u540e\u6267\u884cnpm run build\u6253\u5305,\u653e\u7f6e\u5230\u4f60tomcat\u7684webapps\u6587\u4ef6\u5939\u4e0b \u901a\u8fc7\u3010\u8f6f\u4ef6\u5546\u5e97\u3011\u7684\u3010\u5df2\u5b89\u88c5\u3011&#xff0c;\u53ef\u4ee5\u627e\u5230tomcat\u5b89\u88c5\u4f4d\u7f6e,\u5176\u4ed6\u8f6f\u4ef6\u540c\u7406<\/p>\n<p><img decoding=\"async\" src=\"2025-04-181xf0tzdzvqa.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/> <img decoding=\"async\" src=\"2025-04-181dxesr2ffn1.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><\/p>\n<p>\u6211\u8fd9\u91cc\u521b\u5efa\u4e86\u4e00\u4e2achat\u6587\u4ef6\u5939&#xff0c;\u91cc\u9762\u653e\u4e86\u524d\u7aef\u6253\u5305\u6587\u4ef6,\u8fd9\u4e2a\u65f6\u5019\u4f60\u5df2\u7ecf\u53ef\u4ee5\u901a\u8fc7tomcat\u8bbf\u95ee\u5230\u81ea\u5df1\u7684\u524d\u7aef\u9879\u76ee\u4e86&#xff0c;\u94fe\u63a5\u4e3a\u516c\u7f51ip:8080\/chat&#xff0c;\u4f46\u662f\u524d\u540e\u7aef\u65e0\u6cd5\u8054\u901a<\/p>\n<h2>\u6570\u636e\u5e93<\/h2>\n<p>\u627e\u5230\u3010\u6570\u636e\u5e93\u3011&#xff0c;\u6839\u636e\u81ea\u5df1\u5b9e\u9645\u7684\u9879\u76ee\u521b\u5efa\u5bf9\u5e94\u7684\u6570\u636e\u5e93<\/p>\n<p><img decoding=\"async\" src=\"2025-04-181cqnfwor51k.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/> \u6211\u4ee5MySQL\u4e3a\u4f8b,\u70b9\u51fb\u3010\u6dfb\u52a0\u6570\u636e\u5e93\u3011<\/p>\n<p><img decoding=\"async\" src=\"2025-04-18rqxo0i4kwe4.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><\/p>\n<p>\u6839\u636e\u81ea\u5df1\u5b9e\u9645\u9879\u76ee\u586b\u5199\u6570\u636e\u5e93\u540d\u548c\u7528\u6237\u540d\u5bc6\u7801 \u4fdd\u5b58\u4e4b\u540e&#xff0c;\u5728\u3010\u6743\u9650\u3011\u4fee\u6539\u6570\u636e\u5e93\u4e3a\u6240\u6709\u4eba&#xff0c;\u8fd9\u6837\u4f60\u4e5f\u53ef\u4ee5\u81ea\u5df1\u7684\u7535\u8111\u7528sql\u5de5\u5177\u8fde\u63a5\u4f60\u7684\u6570\u636e\u5e93\u7f16\u8f91\u5efa\u8868\u7b49<\/p>\n<p><img decoding=\"async\" src=\"2025-04-18yfmgxhh1two.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><\/p>\n<h2>nginx\u914d\u7f6e<\/h2>\n<p>\u5c06\u4e0b\u8f7d\u7684nginx\u7248\u672c\u7684SSL\u8bc1\u4e66\u4e0a\u4f20\u5230\u4f60\u7684\u670d\u52a1\u5668&#xff0c;\u53ef\u4ee5\u4efb\u610f\u4f4d\u7f6e&#xff0c;\u8bb0\u4f4f\u4f4d\u7f6e\u5373\u53ef \u540c\u6837\u5728\u3010\u8f6f\u4ef6\u5546\u5e97\u3011\u7684\u3010\u5df2\u5b89\u88c5\u3011,\u5b9a\u4f4d\u5230\u5df2\u7ecf\u6309\u7167\u7684nginx\u7684\u4f4d\u7f6e&#xff0c;\u627e\u5230conf\u6587\u4ef6\u5939\u4e0b\u7684nginx.conf\u6587\u4ef6 \u6211\u4eec\u9700\u8981\u5728\u91cc\u9762\u65b0\u589eserver\u914d\u7f6e \u5728http{}\u7684\u7ed3\u6784\u4e0b\u65b0\u589e\u5982\u4e0b\u914d\u7f6e<\/p>\n<p>    server <span class=\"token punctuation\">{<\/span><br \/>\n        listen       <span class=\"token number\">443<\/span> ssl<span class=\"token punctuation\">;<\/span><br \/>\n        server_name  springsso.top<span class=\"token punctuation\">;<\/span><br \/>\nroot \/home\/data<span class=\"token punctuation\">;<\/span><br \/>\n        ssl_certificate      \/www\/server\/nginx\/conf\/www.springsso.top.pem<span class=\"token punctuation\">;<\/span><span class=\"token comment\"># nginx\u7248\u672c\u7684ssl\u8bc1\u4e66\u4f4d\u7f6e&#xff0c;\u6839\u636e\u5b9e\u9645\u8c03\u6574<\/span><br \/>\n        ssl_certificate_key  \/www\/server\/nginx\/conf\/www.springsso.top.key<span class=\"token punctuation\">;<\/span><span class=\"token comment\"># nginx\u7248\u672c\u7684ssl\u8bc1\u4e66\u4f4d\u7f6e&#xff0c;\u6839\u636e\u5b9e\u9645\u8c03\u6574<\/span><\/p>\n<p>        ssl_session_cache    shared:SSL:1m<span class=\"token punctuation\">;<\/span><br \/>\n        ssl_session_timeout  5m<span class=\"token punctuation\">;<\/span><\/p>\n<p>        ssl_ciphers  HIGH:<span class=\"token operator\">!<\/span>aNULL:<span class=\"token operator\">!<\/span>MD5<span class=\"token punctuation\">;<\/span><br \/>\n        ssl_prefer_server_ciphers  on<span class=\"token punctuation\">;<\/span><\/p>\n<p>        location \/ <span class=\"token punctuation\">{<\/span><br \/>\n            root   html<span class=\"token punctuation\">;<\/span><br \/>\n            index  index.html index.htm<span class=\"token punctuation\">;<\/span><br \/>\n        <span class=\"token punctuation\">}<\/span><br \/>\nlocation \/chat\/  <span class=\"token punctuation\">{<\/span><br \/>\n            index index.html<span class=\"token punctuation\">;<\/span><br \/>\n            <span class=\"token comment\">#\u9700\u8981\u53cd\u4ee3\u7684\u91c7\u96c6\u670d\u52a1&#xff0c;\u5177\u4f53\u7684\u670d\u52a1\u5668\u914d\u7f6e\u5728nodes\u5bf9\u5e94\u7684ip\u670d\u52a1\u5668\u4e2d&#xff0c;\u5b9e\u9645\u516c\u7f51IP\u6839\u636e\u81ea\u5df1\u9879\u76ee\u8c03\u6574<\/span><br \/>\n            proxy_pass http:\/\/\u516c\u7f51ip:8080\/chat\/<span class=\"token punctuation\">;<\/span><br \/>\n            proxy_set_header X-Real-IP     <span class=\"token variable\">$remote_addr<\/span><span class=\"token punctuation\">;<\/span><br \/>\n            proxy_set_header X-Forwarded-For <span class=\"token variable\">$proxy_add_x_forwarded_for<\/span><span class=\"token punctuation\">;<\/span><br \/>\n            client_max_body_size     4g<span class=\"token punctuation\">;<\/span><br \/>\n            client_body_buffer_size  256k<span class=\"token punctuation\">;<\/span><br \/>\n        <span class=\"token punctuation\">}<\/span><br \/>\n    location \/chatEnd\/ <span class=\"token punctuation\">{<\/span><br \/>\n        proxy_pass https:\/\/\u516c\u7f51ip:8082\/chatEnd\/<span class=\"token punctuation\">;<\/span><br \/>\n        proxy_set_header X-Real-IP <span class=\"token variable\">$remote_addr<\/span><span class=\"token punctuation\">;<\/span><br \/>\n        proxy_set_header X-Forwarded-For <span class=\"token variable\">$proxy_add_x_forwarded_for<\/span><span class=\"token punctuation\">;<\/span><br \/>\n        proxy_set_header Host <span class=\"token variable\">$host<\/span><span class=\"token punctuation\">;<\/span><br \/>\n        proxy_set_header X-Forwarded-Proto <span class=\"token variable\">$scheme<\/span><span class=\"token punctuation\">;<\/span><br \/>\n        proxy_set_header X-NginX-Proxy <span class=\"token boolean\">true<\/span><span class=\"token punctuation\">;<\/span><br \/>\n        proxy_ssl_session_reuse off<span class=\"token punctuation\">;<\/span><br \/>\n        proxy_redirect off<span class=\"token punctuation\">;<\/span><br \/>\n        client_max_body_size     4g<span class=\"token punctuation\">;<\/span><br \/>\n        client_body_buffer_size  256k<span class=\"token punctuation\">;<\/span><br \/>\n        <span class=\"token comment\"># WebSocket \u76f8\u5173\u914d\u7f6e&#xff0c;\u5982\u679c\u4f60\u7684\u9879\u76ee\u6709webSocket&#xff0c;\u9700\u8981\u65b0\u589e\u8fd9\u4e2a<\/span><br \/>\n        proxy_http_version <span class=\"token number\">1.1<\/span><span class=\"token punctuation\">;<\/span><br \/>\n        proxy_set_header Upgrade <span class=\"token variable\">$http_upgrade<\/span><span class=\"token punctuation\">;<\/span><br \/>\n        proxy_set_header Connection <span class=\"token string\">&#034;upgrade&#034;<\/span><span class=\"token punctuation\">;<\/span><br \/>\n    <span class=\"token punctuation\">}<\/span><br \/>\n    <span class=\"token punctuation\">}<\/span><\/p>\n<p>\u8be5\u914d\u7f6e\u5b9e\u9645\u662f\u5229\u7528\u4e86\u53cd\u5411\u4ee3\u7406&#xff0c;\u5c06\u5728\u8bbf\u95ee\u57df\u540d\u53cd\u5411\u4ee3\u7406\u8bbf\u95ee\u5230\u542f\u52a8\u5728tomcat\u7684\u9879\u76ee \u7136\u540e\u627e\u5230\u3010\u8f6f\u4ef6\u5546\u5e97\u3011\u7684\u5b89\u88c5\u7684nginx\u8fdb\u884c\u91cd\u542f&#xff0c;\u4f60\u5c31\u53ef\u4ee5\u7528\u57df\u540d\u8bbf\u95ee\u5230\u9879\u76ee\u4e86 \u4ee5\u6211\u7684\u4e3a\u4f8b&#xff0c;\u6211\u53ef\u4ee5\u7528https:\/\/springsso.top\/chat\u8bbf\u95ee\u5230\u9879\u76ee<\/p>\n<p>\u5047\u5982\u4f60\u9700\u8981\u4f7f\u7528\u6cdb\u89e3\u6790&#xff0c;\u53ef\u4ee5\u4f7f\u7528\u5982\u4e0b\u914d\u7f6e:<\/p>\n<p>        server <span class=\"token punctuation\">{<\/span><br \/>\n        listen       <span class=\"token number\">443<\/span> ssl http2<span class=\"token punctuation\">;<\/span><br \/>\n        server_name  chat.springsso.top<span class=\"token punctuation\">;<\/span><br \/>\n        root \/home\/data<span class=\"token punctuation\">;<\/span><\/p>\n<p>        ssl_certificate      \/www\/server\/nginx\/conf\/www.springsso.top.pem<span class=\"token punctuation\">;<\/span><br \/>\n        ssl_certificate_key  \/www\/server\/nginx\/conf\/www.springsso.top.key<span class=\"token punctuation\">;<\/span><\/p>\n<p>        ssl_session_cache    shared:SSL:1m<span class=\"token punctuation\">;<\/span><br \/>\n        ssl_session_timeout  5m<span class=\"token punctuation\">;<\/span><\/p>\n<p>        ssl_ciphers  HIGH:<span class=\"token operator\">!<\/span>aNULL:<span class=\"token operator\">!<\/span>MD5<span class=\"token punctuation\">;<\/span><br \/>\n        ssl_prefer_server_ciphers  on<span class=\"token punctuation\">;<\/span><br \/>\n        ssl_protocols TLSv1.2 TLSv1.3<span class=\"token punctuation\">;<\/span><\/p>\n<p>        location \/ <span class=\"token punctuation\">{<\/span><br \/>\n            proxy_pass http:\/\/47.120.3.49:8080\/chat\/<span class=\"token punctuation\">;<\/span><br \/>\n            proxy_set_header X-Real-IP <span class=\"token variable\">$remote_addr<\/span><span class=\"token punctuation\">;<\/span><br \/>\n            proxy_set_header X-Forwarded-For <span class=\"token variable\">$proxy_add_x_forwarded_for<\/span><span class=\"token punctuation\">;<\/span><br \/>\n            client_max_body_size     4g<span class=\"token punctuation\">;<\/span><br \/>\n            client_body_buffer_size  256k<span class=\"token punctuation\">;<\/span><br \/>\n        <span class=\"token punctuation\">}<\/span><br \/>\n    <span class=\"token punctuation\">}<\/span><\/p>\n<p>\u90a3\u4e48\u8fd9\u4e2a\u914d\u7f6e\u4f60\u53ef\u4ee5\u4f7f\u7528\u57df\u540d: https:\/\/chat.springsso.top\u8fdb\u884c\u8bbf\u95ee\u9879\u76ee&#xff0c;\u9700\u8981\u6ce8\u610f\u7684\u662f&#xff0c;\u5982\u679c\u9700\u8981\u4f7f\u7528\u6cdb\u89e3\u6790&#xff0c;\u90a3\u4e48\u4f60\u7684SSL\u8bc1\u4e66\u9700\u8981\u914d\u7f6e\u89e3\u6790\u7684\u57df\u540d\u6709\u6cdb\u89e3\u6790\u7684\u57df\u540d, \u4f8b:*.springsso.top<\/p>\n<h2>\u7ed3\u8bed<\/h2>\n<p>\u4ee5\u4e0a\u5c31\u662f\u914d\u7f6e\u57df\u540d\u8bbf\u95ee\u548chttps\u53ef\u4fe1\u8bc1\u4e66\u7684\u6559\u7a0b,\u6709\u9057\u6f0f\u4f1a\u66f4\u65b0<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb2.8k\u6b21\uff0c\u70b9\u8d5e18\u6b21\uff0c\u6536\u85cf19\u6b21\u3002\u57df\u540d+\u670d\u52a1\u5668+nginx+tomcat+\u5b9d\u5854\u914d\u7f6e\u57df\u540d\u8bbf\u95ee\u9879\u76ee\uff0c\u4ee5\u53ca\u7ed9\u9879\u76ee\u914d\u7f6e\u53ef\u4fe1\u8bc1\u4e66https_\u5b9d\u5854nginx\u914d\u7f6essl<\/p>\n","protected":false},"author":2,"featured_media":11729,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[117,606,605,43],"topic":[],"class_list":["post-11749","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-server","tag-nginx","tag-ssl","tag-605","tag-43"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>\u57df\u540d+\u670d\u52a1\u5668+Nginx+\u5b9d\u5854\u4f7f\u7528SSL\u8bc1\u4e66\u914d\u7f6eHTTPS - \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\/11749.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u57df\u540d+\u670d\u52a1\u5668+Nginx+\u5b9d\u5854\u4f7f\u7528SSL\u8bc1\u4e66\u914d\u7f6eHTTPS - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb2.8k\u6b21\uff0c\u70b9\u8d5e18\u6b21\uff0c\u6536\u85cf19\u6b21\u3002\u57df\u540d+\u670d\u52a1\u5668+nginx+tomcat+\u5b9d\u5854\u914d\u7f6e\u57df\u540d\u8bbf\u95ee\u9879\u76ee\uff0c\u4ee5\u53ca\u7ed9\u9879\u76ee\u914d\u7f6e\u53ef\u4fe1\u8bc1\u4e66https_\u5b9d\u5854nginx\u914d\u7f6essl\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/11749.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-18T10:58:25+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418105809-680230412d11f.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=\"4 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/11749.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/11749.html\",\"name\":\"\u57df\u540d+\u670d\u52a1\u5668+Nginx+\u5b9d\u5854\u4f7f\u7528SSL\u8bc1\u4e66\u914d\u7f6eHTTPS - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2025-04-18T10:58:25+00:00\",\"dateModified\":\"2025-04-18T10:58:25+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/11749.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/11749.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/11749.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u57df\u540d+\u670d\u52a1\u5668+Nginx+\u5b9d\u5854\u4f7f\u7528SSL\u8bc1\u4e66\u914d\u7f6eHTTPS\"}]},{\"@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":"\u57df\u540d+\u670d\u52a1\u5668+Nginx+\u5b9d\u5854\u4f7f\u7528SSL\u8bc1\u4e66\u914d\u7f6eHTTPS - \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\/11749.html","og_locale":"zh_CN","og_type":"article","og_title":"\u57df\u540d+\u670d\u52a1\u5668+Nginx+\u5b9d\u5854\u4f7f\u7528SSL\u8bc1\u4e66\u914d\u7f6eHTTPS - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb2.8k\u6b21\uff0c\u70b9\u8d5e18\u6b21\uff0c\u6536\u85cf19\u6b21\u3002\u57df\u540d+\u670d\u52a1\u5668+nginx+tomcat+\u5b9d\u5854\u914d\u7f6e\u57df\u540d\u8bbf\u95ee\u9879\u76ee\uff0c\u4ee5\u53ca\u7ed9\u9879\u76ee\u914d\u7f6e\u53ef\u4fe1\u8bc1\u4e66https_\u5b9d\u5854nginx\u914d\u7f6essl","og_url":"https:\/\/www.wsisp.com\/helps\/11749.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2025-04-18T10:58:25+00:00","og_image":[{"url":"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418105809-680230412d11f.png"}],"author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"4 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/11749.html","url":"https:\/\/www.wsisp.com\/helps\/11749.html","name":"\u57df\u540d+\u670d\u52a1\u5668+Nginx+\u5b9d\u5854\u4f7f\u7528SSL\u8bc1\u4e66\u914d\u7f6eHTTPS - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2025-04-18T10:58:25+00:00","dateModified":"2025-04-18T10:58:25+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/11749.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/11749.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/11749.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"\u57df\u540d+\u670d\u52a1\u5668+Nginx+\u5b9d\u5854\u4f7f\u7528SSL\u8bc1\u4e66\u914d\u7f6eHTTPS"}]},{"@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\/11749","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=11749"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/11749\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media\/11729"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=11749"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=11749"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=11749"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=11749"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}