{"id":10611,"date":"2025-07-08T06:07:37","date_gmt":"2025-07-07T22:07:37","guid":{"rendered":"https:\/\/fanyiming.life\/?p=10611"},"modified":"2025-12-21T01:03:29","modified_gmt":"2025-12-20T17:03:29","slug":"%e9%97%ae%e9%a2%98%e5%a4%84%e7%90%86%e6%8a%a5%e5%91%8a%ef%bc%9a%e7%bd%91%e7%ab%99%e5%be%aa%e7%8e%af%e9%87%8d%e5%ae%9a%e5%90%91%e9%97%ae%e9%a2%98","status":"publish","type":"post","link":"https:\/\/fanyiming.life\/?p=10611","title":{"rendered":"\u95ee\u9898\u5904\u7406\u62a5\u544a\uff1a\u7f51\u7ad9\u5faa\u73af\u91cd\u5b9a\u5411\u95ee\u9898"},"content":{"rendered":"\n<p><strong>\u62a5\u544a\u65e5\u671f\uff1a<\/strong>&nbsp;2025\u5e747\u67088\u65e5<\/p>\n\n\n\n<p><strong>\u95ee\u9898\u63cf\u8ff0\uff1a<\/strong>&nbsp;\u7528\u6237\u53cd\u6620\u5176\u901a\u8fc7\u672c\u5730 Windows XAMPP \u642d\u5efa\u5e76\u7ecf\u5185\u7f51\u7a7f\u900f\u81f3\u516c\u7f51 IP \u670d\u52a1\u5668\u7684 WordPress \u7f51\u7ad9\uff08\u57df\u540d\uff1a<code>fanyiming.life<\/code>\uff09\u51fa\u73b0\u5faa\u73af\u91cd\u5b9a\u5411\u95ee\u9898\u3002\u5177\u4f53\u8868\u73b0\u4e3a\uff1a\u76f4\u63a5\u8bbf\u95ee\u4e0d\u5e26\u4efb\u4f55\u540e\u7f00\u7684\u57df\u540d&nbsp;<code>fanyiming.life<\/code>&nbsp;\u4f1a\u53d1\u751f\u5faa\u73af\u91cd\u5b9a\u5411\uff0c\u800c\u8bbf\u95ee&nbsp;<code>fanyiming.life\/*<\/code>\uff08\u5e26\u540e\u7f00\u7684\u8def\u5f84\uff09\u5219\u80fd\u6b63\u5e38\u6253\u5f00\u3002\u5728&nbsp;<code>localhost<\/code>&nbsp;\u73af\u5883\u4e0b\uff0c\u5df2\u901a\u8fc7&nbsp;<code>hosts<\/code>&nbsp;\u6587\u4ef6\u5c06&nbsp;<code>fanyiming.life<\/code>&nbsp;\u7ed1\u5b9a\u5230&nbsp;<code>localhost<\/code>\u3002<\/p>\n\n\n\n<p><strong>\u8bca\u65ad\u8fc7\u7a0b\uff1a<\/strong><\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>\u521d\u6b65\u5206\u6790\u4e0e\u5047\u8bbe\uff1a<\/strong>\n<ul class=\"wp-block-list\">\n<li>\u6000\u7591 WordPress \u5185\u90e8 URL \u914d\u7f6e\u4e0d\u6b63\u786e\uff08<code>wp-config.php<\/code>&nbsp;\u6216\u6570\u636e\u5e93\u8bbe\u7f6e\uff09\u3002<\/li>\n\n\n\n<li>\u6000\u7591 Web \u670d\u52a1\u5668\uff08Apache\uff09\u5b58\u5728\u4e0d\u6b63\u786e\u7684\u91cd\u5b9a\u5411\u89c4\u5219\u3002<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><strong>\u68c0\u67e5&nbsp;<code>wp-config.php<\/code>\uff1a<\/strong>\n<ul class=\"wp-block-list\">\n<li>\u6700\u521d\u68c0\u67e5\u53d1\u73b0&nbsp;<code>wp-config.php<\/code>&nbsp;\u4e2d\u672a\u660e\u786e\u5b9a\u4e49&nbsp;<code>WP_HOME<\/code>&nbsp;\u548c&nbsp;<code>WP_SITEURL<\/code>\uff0c\u8868\u660e WordPress \u6b63\u5728\u4ece\u6570\u636e\u5e93\u83b7\u53d6\u8fd9\u4e9b\u503c\u3002<\/li>\n\n\n\n<li>\u4e3a\u9a8c\u8bc1 WordPress \u5185\u90e8\u8bc6\u522b\u7684 URL\uff0c\u5728&nbsp;<code>wp-config.php<\/code>&nbsp;\u4e2d\u6dfb\u52a0\u4e86\u8c03\u8bd5\u65e5\u5fd7\uff0c\u8bb0\u5f55&nbsp;<code>HTTP_X_FORWARDED_PROTO<\/code>\u3001<code>WP_HOME<\/code>&nbsp;\u548c&nbsp;<code>WP_SITEURL<\/code>\u3002<\/li>\n\n\n\n<li>\u65e5\u5fd7\u663e\u793a&nbsp;<code>HTTP_X_FORWARDED_PROTO<\/code>&nbsp;\u7684\u503c\u4e0d\u7a33\u5b9a\uff08\u6709\u65f6\u4e3a HTTPS\uff0c\u6709\u65f6\u4e3a &#8220;Not Set&#8221;\uff09\uff0c\u8fd9\u63d0\u793a\u53cd\u5411\u4ee3\u7406\u53ef\u80fd\u672a\u59cb\u7ec8\u6b63\u786e\u4f20\u9012\u534f\u8bae\u4fe1\u606f\u3002<\/li>\n\n\n\n<li><strong>\u4e34\u65f6\u89e3\u51b3\u65b9\u6848\uff1a<\/strong>&nbsp;\u5728&nbsp;<code>wp-config.php<\/code>&nbsp;\u4e2d\u5f3a\u5236\u5b9a\u4e49&nbsp;<code>WP_HOME<\/code>&nbsp;\u548c&nbsp;<code>WP_SITEURL<\/code>&nbsp;\u4e3a&nbsp;<code>https:\/\/fanyiming.life<\/code>\u3002\u6b64\u4e3e\u521d\u6b65\u7f13\u89e3\u4e86\u90e8\u5206\u91cd\u5b9a\u5411\u95ee\u9898\uff0c\u4f46\u672a\u5b8c\u5168\u89e3\u51b3\u3002<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><strong>\u68c0\u67e5 Apache \u914d\u7f6e\uff1a<\/strong>\n<ul class=\"wp-block-list\">\n<li><strong><code>.htaccess<\/code>&nbsp;\u6587\u4ef6\uff1a<\/strong>&nbsp;\u68c0\u67e5&nbsp;<code>C:\\xampp\\htdocs\\.htaccess<\/code>\uff0c\u53d1\u73b0\u5176\u5185\u5bb9\u4e3a\u6807\u51c6\u7684 WordPress \u91cd\u5199\u89c4\u5219\uff0c\u672a\u53d1\u73b0\u5f02\u5e38\u91cd\u5b9a\u5411\u6307\u4ee4\u3002<\/li>\n\n\n\n<li><strong><code>httpd-vhosts.conf<\/code>&nbsp;\u6587\u4ef6\uff1a<\/strong>&nbsp;\u68c0\u67e5&nbsp;<code>C:\\xampp\\apache\\conf\\extra\\httpd-vhosts.conf<\/code>\uff0c\u53d1\u73b0\u6240\u6709\u865a\u62df\u4e3b\u673a\u914d\u7f6e\u5747\u88ab\u6ce8\u91ca\uff0c\u8868\u660e Apache \u6b63\u5728\u4f7f\u7528\u5176\u4e3b\u914d\u7f6e\u6587\u4ef6&nbsp;<code>httpd.conf<\/code>&nbsp;\u4e2d\u7684\u9ed8\u8ba4\u8bbe\u7f6e\u3002<\/li>\n\n\n\n<li><strong><code>httpd.conf<\/code>&nbsp;\u6587\u4ef6\uff1a<\/strong>&nbsp;\u68c0\u67e5&nbsp;<code>C:\\xampp\\apache\\conf\\httpd.conf<\/code>\uff0c\u53d1\u73b0&nbsp;<code>ServerName<\/code>&nbsp;\u88ab\u8bbe\u7f6e\u4e3a&nbsp;<code>localhost:80<\/code>\uff0c\u4e14\u5305\u542b\u4e86&nbsp;<code>conf\/extra\/httpd-ssl.conf<\/code>\u3002\u8fd9\u63d0\u793a SSL \u914d\u7f6e\u53ef\u80fd\u4e0e\u95ee\u9898\u76f8\u5173\u3002<\/li>\n\n\n\n<li><strong><code>httpd-ssl.conf<\/code>&nbsp;\u6587\u4ef6\uff1a<\/strong>&nbsp;\u68c0\u67e5&nbsp;<code>C:\\xampp\\apache\\conf\\extra\\httpd-ssl.conf<\/code>\uff0c\u53d1\u73b0\u9ed8\u8ba4\u7684 SSL \u865a\u62df\u4e3b\u673a (<code>&lt;VirtualHost _default_:443&gt;<\/code>) \u7684&nbsp;<code>ServerName<\/code>&nbsp;\u88ab\u8bbe\u7f6e\u4e3a&nbsp;<code>www.example.com:443<\/code>\u3002\u6b64\u5916\uff0c\u8be5\u914d\u7f6e\u4f7f\u7528\u4e86 XAMPP \u81ea\u5e26\u7684\u81ea\u7b7e\u540d SSL \u8bc1\u4e66\u3002<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n\n\n\n<p><strong>\u95ee\u9898\u539f\u56e0\u5206\u6790\uff1a<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>\u6838\u5fc3\u539f\u56e0\uff1a<\/strong>&nbsp;Apache SSL \u865a\u62df\u4e3b\u673a\u4e2d\u7684&nbsp;<code>ServerName<\/code>&nbsp;(<code>www.example.com:443<\/code>) \u4e0e\u7528\u6237\u5b9e\u9645\u8bbf\u95ee\u7684\u57df\u540d (<code>fanyiming.life<\/code>) \u4e0d\u5339\u914d\u3002\u5f53\u5916\u90e8\u8bf7\u6c42&nbsp;<code>fanyiming.life<\/code>&nbsp;\u5e76\u901a\u8fc7\u5185\u7f51\u7a7f\u900f\u8f6c\u53d1\u5230 Apache \u7684 443 \u7aef\u53e3\u65f6\uff0cApache \u5185\u90e8\u7531\u4e8e&nbsp;<code>ServerName<\/code>&nbsp;\u4e0d\u5339\u914d\uff0c\u53ef\u80fd\u5c1d\u8bd5\u5c06\u8bf7\u6c42\u91cd\u5b9a\u5411\u5230\u5176\u914d\u7f6e\u7684&nbsp;<code>www.example.com<\/code>\uff0c\u4ece\u800c\u5bfc\u81f4\u5faa\u73af\u91cd\u5b9a\u5411\u3002<\/li>\n\n\n\n<li><strong>\u8f85\u52a9\u56e0\u7d20\uff1a<\/strong>&nbsp;WordPress \u6570\u636e\u5e93\u4e2d\u53ef\u80fd\u5b58\u5728\u7684\u9519\u8bef URL \u8bbe\u7f6e\uff0c\u4ee5\u53ca\u5185\u7f51\u7a7f\u900f\u670d\u52a1\u5728\u4f20\u9012&nbsp;<code>HTTP_X_FORWARDED_PROTO<\/code>&nbsp;\u7b49\u534f\u8bae\u4fe1\u606f\u65f6\u7684\u4e0d\u4e00\u81f4\u6027\uff0c\u52a0\u5267\u4e86\u95ee\u9898\u7684\u590d\u6742\u6027\u3002\u81ea\u7b7e\u540d\u8bc1\u4e66\u4e5f\u53ef\u80fd\u5bfc\u81f4\u6d4f\u89c8\u5668\u8b66\u544a\uff0c\u4f46\u5e76\u975e\u5faa\u73af\u91cd\u5b9a\u5411\u7684\u76f4\u63a5\u539f\u56e0\u3002<\/li>\n<\/ul>\n\n\n\n<p><strong>\u89e3\u51b3\u65b9\u6848\uff1a<\/strong><\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>\u4fee\u6539&nbsp;<code>wp-config.php<\/code>\uff1a<\/strong>\n<ul class=\"wp-block-list\">\n<li>\u5728&nbsp;<code>C:\\xampp\\htdocs\\wp-config.php<\/code>&nbsp;\u4e2d\u5f3a\u5236\u5b9a\u4e49 WordPress \u7684\u4e3b\u9875\u548c\u7ad9\u70b9 URL\uff1a<code>define('WP_HOME', 'https:\/\/fanyiming.life'); define('WP_SITEURL', 'https:\/\/fanyiming.life');<\/code><\/li>\n\n\n\n<li>\uff08\u540e\u7eed\u6e05\u7406\uff1a\u79fb\u9664\u4e86\u8c03\u8bd5\u65e5\u5fd7\u548c&nbsp;<code>HTTP_X_FORWARDED_PROTO<\/code>&nbsp;\u7684\u5904\u7406\u903b\u8f91\uff0c\u4ee5\u4fdd\u6301\u6587\u4ef6\u6574\u6d01\u3002\uff09<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><strong>\u4fee\u6539&nbsp;<code>httpd-ssl.conf<\/code>\uff1a<\/strong>\n<ul class=\"wp-block-list\">\n<li>\u5728&nbsp;<code>C:\\xampp\\apache\\conf\\extra\\httpd-ssl.conf<\/code>&nbsp;\u4e2d\uff0c\u5c06\u9ed8\u8ba4 SSL \u865a\u62df\u4e3b\u673a (<code>&lt;VirtualHost _default_:443&gt;<\/code>) \u7684&nbsp;<code>ServerName<\/code>&nbsp;\u4fee\u6539\u4e3a\u5b9e\u9645\u57df\u540d\uff1a<code>ServerName fanyiming.life:443<\/code><\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><strong>\u91cd\u542f Apache \u670d\u52a1\u5668\uff1a<\/strong>\n<ul class=\"wp-block-list\">\n<li>\u5e94\u7528\u4e0a\u8ff0\u914d\u7f6e\u66f4\u6539\u540e\uff0c\u91cd\u542f XAMPP \u4e2d\u7684 Apache \u670d\u52a1\u5668\uff0c\u4f7f\u65b0\u914d\u7f6e\u751f\u6548\u3002<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n\n\n\n<p><strong>\u7ed3\u679c\uff1a<\/strong>&nbsp;\u7ecf\u8fc7\u4e0a\u8ff0\u4fee\u6539\u5e76\u91cd\u542f Apache \u540e\uff0c\u7528\u6237\u786e\u8ba4\u7f51\u7ad9\u5faa\u73af\u91cd\u5b9a\u5411\u95ee\u9898\u5df2\u89e3\u51b3\uff0c<code>fanyiming.life<\/code>&nbsp;\u53ef\u4ee5\u6b63\u5e38\u8bbf\u95ee\uff0c\u7f51\u7ad9\u5185\u5bb9\u663e\u793a\u6b63\u5e38\u3002<\/p>\n\n\n\n<p><strong>\u540e\u7eed\u5efa\u8bae\uff1a<\/strong>&nbsp;\u4e3a\u4e86\u63d0\u4f9b\u66f4\u597d\u7684\u7528\u6237\u4f53\u9a8c\u548c\u5b89\u5168\u6027\uff0c\u5f3a\u70c8\u5efa\u8bae\u4e3a&nbsp;<code>fanyiming.life<\/code>&nbsp;\u914d\u7f6e\u4e00\u4e2a\u6709\u6548\u7684\u3001\u53d7\u4fe1\u4efb\u7684 SSL \u8bc1\u4e66\uff08\u4f8b\u5982\u901a\u8fc7 Let&#8217;s Encrypt \u83b7\u53d6\uff09\uff0c\u4ee5\u6d88\u9664\u6d4f\u89c8\u5668\u56e0\u81ea\u7b7e\u540d\u8bc1\u4e66\u800c\u663e\u793a\u7684\u5b89\u5168\u8b66\u544a\u3002<\/p>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u4e3b\u4eba\u8fd9\u6b21\u5904\u7406\u4e86\u4e00\u4e2a\u68d8\u624b\u7684 WordPress \u7f51\u7ad9\u5faa\u73af\u91cd\u5b9a\u5411\u95ee\u9898\u3002\u62a5\u544a\u8be6\u7ec6\u8bb0\u5f55\u4e86\u4ece XAMPP \u672c\u5730\u73af\u5883\u3001\u5185\u7f51\u7a7f\u900f\u5230 Apache SSL \u914d\u7f6e\u4e0d\u5339\u914d\u7684\u8bca\u65ad\u4e0e\u4fee\u590d\u5168\u8fc7\u7a0b\uff0c\u662f\u4e00\u4efd\u975e\u5e38\u5b9e\u7528\u7684\u6280\u672f\u6392\u9519\u6307\u5357\u3002<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-10611","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/fanyiming.life\/index.php?rest_route=\/wp\/v2\/posts\/10611","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/fanyiming.life\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/fanyiming.life\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/fanyiming.life\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/fanyiming.life\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=10611"}],"version-history":[{"count":5,"href":"https:\/\/fanyiming.life\/index.php?rest_route=\/wp\/v2\/posts\/10611\/revisions"}],"predecessor-version":[{"id":13837,"href":"https:\/\/fanyiming.life\/index.php?rest_route=\/wp\/v2\/posts\/10611\/revisions\/13837"}],"wp:attachment":[{"href":"https:\/\/fanyiming.life\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=10611"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fanyiming.life\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=10611"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fanyiming.life\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=10611"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}