{"id":258,"date":"2020-07-18T15:45:33","date_gmt":"2020-07-18T07:45:33","guid":{"rendered":"http:\/\/blog.xtaa.cn\/?p=42"},"modified":"2020-07-18T15:45:33","modified_gmt":"2020-07-18T07:45:33","slug":"%e7%bd%91%e7%ab%99%e6%90%ad%e5%bb%ba%e8%ae%b0%e5%bd%95","status":"publish","type":"post","link":"http:\/\/blog.xtaa.cn\/index.php\/2020\/07\/18\/%e7%bd%91%e7%ab%99%e6%90%ad%e5%bb%ba%e8%ae%b0%e5%bd%95\/","title":{"rendered":"WP\u642d\u5efa\u8bb0\u5f55"},"content":{"rendered":"\n<p><\/p>\n\n\n\n<p>\u4e00\u3001\u628a\u591a\u4e2a\u4e8c\u7ea7\u57df\u540d\u6307\u5411\u7a7a\u95f4IP<\/p>\n\n\n\n<p>\u4e8c\u3001\u7a7a\u95f4\u4e0a\u5b89\u88c5XAMPP\uff0c\uff08\u9009\u62e9\u5176\u4e2d\u7684PHP\uff0cMYSQL\uff0cPHPMYADMIN\u6a21\u5757\uff09<\/p>\n\n\n\n<p>\u4e09\u3001\u914d\u7f6eapache\u591a\u7ad9\u70b9<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>\u5148\u6253\u5f00Apache\u7684\u914d\u7f6e\u6587\u4ef6httpd.conf\uff0c\u5728\u8fd9\u4e2a\u6587\u4ef6\uff0c<\/li>\n<\/ol>\n\n\n\n<p>\u627e\u5230\u8fd9\u53e5\uff1a\u201c#Include \u2026\u2026..\/extra\/httpd-vhosts.conf\u201d<\/p>\n\n\n\n<p>\uff08\u6839\u636e\u5b89\u88c5\u8def\u5f84\u4e0d\u540c\uff0c\u4e0a\u9762\u7684\u8def\u5f84\u4f1a\u6709\u4e0d\u540c\uff09<\/p>\n\n\n\n<p>\u628a\u524d\u9762\u7684#\u53bb\u6389\uff0c\u5373\u5f00\u542f\u4e86\u4f7f\u7528\u865a\u62df\u4e3b\u673a\u7684\u529f\u80fd\uff1b<\/p>\n\n\n\n<p>\u540c\u6837\u5728httpd.conf\u4e2d\u627e\u5230<\/p>\n\n\n\n<h1 class=\"wp-block-heading\">LoadModule vhost_alias_module modules\/mod_vhost_alias.so<\/h1>\n\n\n\n<p>\u53bb\u6389\u524d\u9762\u7684#\u53f7<\/p>\n\n\n\n<ol class=\"wp-block-list\" start=\"2\">\n<li>\u5728httpd-vhosts.conf\u4e2d\u8fdb\u884c\u865a\u62df\u4e3b\u673a\u7684\u914d\u7f6e\u64cd\u4f5c\uff1b\u4e5f\u53ef\u4ee5\u5728httpd.conf\u76f4\u63a5\u5199\u5165\u914d\u7f6e\uff0c\u4f46\u662f\u4e0d\u5efa\u8bae\u8fd9\u4e48\u505a\uff1b<\/li>\n\n\n\n<li>\u6253\u5f00httpd-vhosts.conf\u6587\u4ef6\uff0c\u627e\u5230NameVirutalHost *:80\uff0c\u8fd9\u53e5\u8bdd\u7684\u542b\u4e49\u662f\u5236\u5b9a\u8fd9\u4e2a\u4e3b\u673a\u7684IP\u5730\u5740\u548c\u7aef\u53e3\u53f7\uff1b<\/li>\n<\/ol>\n\n\n\n<p>DocmentRoot\uff1a\u8bbe\u7f6e\u9879\u76ee\u7684\u6839\u76ee\u5f55\uff0c\u5982\uff1a\/var\/www\/project1\/\u3001\/Library\/Webserver\/Documents\/project1\/\u7b49\u3002 ServerName\uff1a\u8bbe\u7f6e\u8bbf\u95ee\u9879\u76ee\u7684\u57df\u540d\uff0c\u5982\uff1awww.project1.com\u3002\u8fd9\u6837\u8bbe\u7f6e\u4e4b\u540e\uff0c\u5c31\u4e0d\u9700\u8981\u7528\u201clocalhost\/project1\/admin\u201d\u8bbf\u95ee\uff0c\u800c\u53ef\u4ee5\u7528\u201cwww.project1.com\/admin\u201d\u8bbf\u95ee\u672c\u5730\u9879\u76ee\u4e86\u3002 \u53e6\u5916\u5982\u679c\u4f60\u7528\u7684\u4e0d\u662f80\u7aef\u53e3\u53f7\uff0c\u5219\u9700\u8981\u6539\u4e00\u4e0b\u8fd9\u91cc\u7b2c\u4e00\u884c &lt;VirtualHost *:\u4f60\u7684\u7aef\u53e3\u53f7&gt;<\/p>\n\n\n\n<p>4\u3001\u5168\u90e8\u8bbe\u7f6e\u597d\u540e\u8981\u91cd\u542fapache\u624d\u80fd\u751f\u6548\u679c<br><\/p>\n\n\n\n<p><\/p>\n\n\n\n<p>\u56db\u3001\u5728\u670d\u52a1\u5668\u4e0a\u53bbhttp:\/\/127.0.0.1\/phpmyadmin,\u8fdb\u884c\u6570\u636e\u5e93\u7684\u8bbe\u7f6e<\/p>\n\n\n\n<p>\u8fdb\u53bb\u540e\u5148\u70b9\u5de6\u4e0a\u89d2\u65b0\u5efa\u6765\u5efa\u4e00\u4e2a\u65b0\u6570\u636e\u5e93\u4e00\u89e3\uff0c\u5728\u65b0\u7684\u6570\u636e\u5e93\u7684\u201c\u6743\u9650\u201d\u9009\u9879\u5361\u65b0\u5efa\u4e00\u4e2a\u7528\u6237\u7ed9\u8fd9\u4e2a\u6570\u636e\u5e93\u7684\u5168\u90e8\u6743\u9650\uff0c<\/p>\n\n\n\n<p>\u4e94\u3001\u628a\u670d\u52a1\u5668\u9632\u706b\u5899\u5148\u5173\u4e86\uff0c\u770b\u662f\u5426\u80fd\u901a\u8fc7\u57df\u540d\u8bbf\u95ee\u5230\u7ad9\u70b9\uff0c\u53ef\u4ee5\u540e\u518d\u6253\u5f00\u9632\u706b\u5899\u8fdb\u884c\u8be6\u7ec6\u7684\u5b89\u5168\u8bbe\u7f6e\uff0c(\u4e00\u822c\u4e91\u670d\u52a1\u5668\u8fd8\u8981\u770b\u5b9e\u4f8b\u7684\u5b89\u5168\u7ec4\uff0c\u628a\u5165\u89c4\u5219\u548c\u51fa\u89c4\u5219\u768480\u7aef\u53e3\u548c443\u6253\u5f00)<\/p>\n\n\n\n<p>Windows\u9632\u706b\u5899\u4e2d \u5de6\u4fa7\u70b9\u51fb \u9ad8\u7ea7\u8bbe\u7f6e<br>\u70b9\u51fb\u5de6\u4fa7 \u5165\u7ad9\u89c4\u5219\uff0c\u7136\u540e\u70b9\u51fb\u53f3\u4fa7\u7684 \u65b0\u5efa\u89c4\u5219\uff0c\u7136\u540e\u5728\u5f39\u51fa\u7684\u5165\u7ad9\u89c4\u5219\u5411\u5bfc\u4e2d\u4f9d\u6b21\u662f<br>\u89c4\u5219\u7c7b\u578b\uff1a\u7aef\u53e3<br>\u534f\u8bae\u548c\u7aef\u53e3\u6211\u4eec\u9009\u7684\u662f TCP \u534f\u8bae\u548c \u7279\u5b9a\u672c\u5730\u7aef\u53e3\uff08\u4f8b:80\uff09<br>\u64cd\u4f5c\uff1a\u5141\u8bb8\u8fde\u63a5<br>\u4f55\u65f6\u5e94\u7528\u89c4\u5219\u4e2d\u9009\u4e2d\u6240\u6709\uff08\u57df\u3001\u516c\u7528\u3001\u4e13\u7528\uff09<br>\u8f93\u5165\u540d\u79f0\u548c\u63cf\u8ff0<br>\u70b9\u51fb\u5b8c\u6210\uff0c\u5c31OK\u4e86\u3002<\/p>\n\n\n\n<p><\/p>\n\n\n\n<p>\u516d\u3001\u4e0b\u8f7dWP\uff0c\u653e\u5230\u4e8c\u7ea7\u57df\u540d\u6307\u5411\u7684\u8fd9\u4e2a\u6587\u4ef6\u5939\u4e0b\uff0c\u7136\u540e\u901a\u8fc7\u57df\u540d\u8bbf\u95ee\uff0c\u6309\u63d0\u793a\u5b89\u88c5<\/p>\n\n\n\n<p><\/p>\n\n\n\n<p>\u4e03\u3001\u6253\u5f00https<\/p>\n\n\n\n<p>\u6211\u4eec\u4f7f\u7528<strong>Cloudflare<\/strong>\u7684\u514d\u8d39HTTPS\u670d\u52a1\uff0c\u5728<strong>Cloudflare<\/strong>\u6ce8\u518c\u5e10\u53f7\uff0c\u628a\u57df\u540dDNS\u653e\u5728\u4e0a\u9762\uff0c\u8fdb\u81ea\u5df1\u7684\u57df\u540d\u91cc\u8bbe\u7f6eSSL\u53ef\u4ee5\u9009\u62e9\u7075\u6d3b\uff08\u4e5f\u53ef\u8bbe\u7f6e\u4e3a\u5b8c\u5168\uff0c\u4f7f\u7528\u670d\u52a1\u5668\u7684\u81ea\u7b7e\u540d\u8bc1\u4e66\uff09\uff0c\u5728WP\u5b89\u88c5<strong>Cloudflare<\/strong>\u7684\u63d2\u4ef6\uff0c\u5e76\u8bbe\u7f6e\u597d\uff0c\u5176\u4e2d\u7684API\u53ef\u4ee5\u767b\u5f55<strong>Cloudflare<\/strong>\u83b7\u53d6\uff0c\u7136\u540e\u5728WP\u7684\u8bbe\u7f6e-\u5e38\u89c4\u91cc\u628aURL\u4ecehttp\u6539\u6210https,\u73b0\u5728\u7528https\u8bbf\u95ee\u4e86<\/p>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u4e00\u3001\u628a\u591a\u4e2a\u4e8c\u7ea7\u57df\u540d\u6307\u5411\u7a7a\u95f4IP \u4e8c\u3001\u7a7a\u95f4\u4e0a\u5b89\u88c5XAMPP\uff0c\uff08\u9009\u62e9\u5176\u4e2d\u7684PHP\uff0cMYSQL\uff0cPHPMYADMIN [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[24],"tags":[],"class_list":["post-258","post","type-post","status-publish","format-standard","hentry","category-24"],"_links":{"self":[{"href":"http:\/\/blog.xtaa.cn\/index.php\/wp-json\/wp\/v2\/posts\/258","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/blog.xtaa.cn\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/blog.xtaa.cn\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/blog.xtaa.cn\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/blog.xtaa.cn\/index.php\/wp-json\/wp\/v2\/comments?post=258"}],"version-history":[{"count":0,"href":"http:\/\/blog.xtaa.cn\/index.php\/wp-json\/wp\/v2\/posts\/258\/revisions"}],"wp:attachment":[{"href":"http:\/\/blog.xtaa.cn\/index.php\/wp-json\/wp\/v2\/media?parent=258"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/blog.xtaa.cn\/index.php\/wp-json\/wp\/v2\/categories?post=258"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/blog.xtaa.cn\/index.php\/wp-json\/wp\/v2\/tags?post=258"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}