{"id":85658,"date":"2026-07-27T19:49:47","date_gmt":"2026-07-27T11:49:47","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/85658.html"},"modified":"2026-07-27T19:49:47","modified_gmt":"2026-07-27T11:49:47","slug":"windows-64%e4%bd%8d%e7%8e%af%e5%a2%83%e4%b8%8bapache-2-4-29%e6%9c%8d%e5%8a%a1%e5%99%a8%e5%ae%89%e8%a3%85%e4%b8%8e%e9%85%8d%e7%bd%ae%e5%ae%9e%e6%88%98%e5%8c%85","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/85658.html","title":{"rendered":"Windows 64\u4f4d\u73af\u5883\u4e0bApache 2.4.29\u670d\u52a1\u5668\u5b89\u88c5\u4e0e\u914d\u7f6e\u5b9e\u6218\u5305"},"content":{"rendered":"<p>  \u672c\u6587\u8fd8\u6709\u914d\u5957\u7684\u7cbe\u54c1\u8d44\u6e90&#xff0c;\u70b9\u51fb\u83b7\u53d6  <img decoding=\"async\" alt=\"menu-r.4af5f7ec.gif\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/07\/20260727114946-6a6745da2bf18.gif\" style=\"width:16px;margin-left:4px;vertical-align:text-bottom;cursor:text\" \/> <\/p>\n<p> \u7b80\u4ecb&#xff1a;Apache HTTP Server\u662f\u5168\u7403\u6700\u6d41\u884c\u7684Web\u670d\u52a1\u5668\u4e4b\u4e00&#xff0c;\u672c\u8d44\u6e90\u4e3a\u9002\u7528\u4e8e64\u4f4dWindows\u7cfb\u7edf\u7684Apache 2.4.29\u7a33\u5b9a\u7248\u672c\u5b89\u88c5\u5305&#xff0c;\u5305\u542b  readme_first.html  \u8bf4\u660e\u6587\u4ef6\u548c\u6838\u5fc3\u76ee\u5f55  Apache24  \u3002\u901a\u8fc7\u8be6\u7ec6\u7684\u5b89\u88c5\u6307\u5357\u3001\u914d\u7f6e\u6b65\u9aa4\u548c\u5e38\u89c1\u95ee\u9898\u89e3\u7b54&#xff0c;\u5e2e\u52a9\u7528\u6237\u5feb\u901f\u90e8\u7f72\u5e76\u8fd0\u884cApache\u670d\u52a1\u3002\u5185\u5bb9\u6db5\u76d6\u7cfb\u7edf\u9700\u6c42\u3001\u670d\u52a1\u542f\u505c\u3001httpd.conf\u914d\u7f6e\u3001\u9632\u706b\u5899\u8bbe\u7f6e\u53ca\u670d\u52a1\u6ce8\u518c\u7b49\u5173\u952e\u73af\u8282&#xff0c;\u9002\u5408\u521d\u5b66\u8005\u548c\u5f00\u53d1\u8005\u5728\u672c\u5730\u642d\u5efaWeb\u8fd0\u884c\u73af\u5883&#xff0c;\u652f\u6301\u540e\u7eed\u7f51\u7ad9\u4e0e\u5e94\u7528\u5f00\u53d1\u3002 <\/p>\n<h2> 1. Apache HTTP Server\u7b80\u4ecb\u4e0e\u5e94\u7528\u573a\u666f <\/h2>\n<h3> Apache HTTP Server\u6838\u5fc3\u7279\u6027\u4e0e\u5e94\u7528\u5b9a\u4f4d <\/h3>\n<p> Apache HTTP Server&#xff08;\u7b80\u79f0Apache&#xff09;\u81ea1995\u5e74\u7531Apache\u8f6f\u4ef6\u57fa\u91d1\u4f1a\u53d1\u5e03\u4ee5\u6765&#xff0c;\u51ed\u501f\u5176\u5f00\u6e90\u3001\u8de8\u5e73\u53f0\u3001\u6a21\u5757\u5316\u8bbe\u8ba1\u548c\u9ad8\u5ea6\u53ef\u5b9a\u5236\u6027&#xff0c;\u957f\u671f\u5360\u636e\u5168\u7403Web\u670d\u52a1\u5668\u5e02\u573a\u4efd\u989d\u524d\u5217\u3002\u5176\u6838\u5fc3\u91c7\u7528\u4e8b\u4ef6\u9a71\u52a8\u6216\u591a\u8fdb\u7a0b\u6df7\u5408\u6a21\u578b&#xff08;\u53d6\u51b3\u4e8eMPM\u6a21\u5757\u914d\u7f6e&#xff09;&#xff0c;\u652f\u6301\u9759\u6001\u8d44\u6e90\u9ad8\u6548\u5206\u53d1&#xff0c;\u5e76\u53ef\u901a\u8fc7  mod_php  \u3001  mod_wsgi  \u7b49\u6a21\u5757\u76f4\u63a5\u96c6\u6210\u52a8\u6001\u8bed\u8a00\u8fd0\u884c\u73af\u5883\u3002\u5728\u73b0\u4ee3IT\u67b6\u6784\u4e2d&#xff0c;Apache\u4e0d\u4ec5\u7528\u4e8e\u6258\u7ba1\u4f20\u7edf\u7f51\u7ad9&#xff0c;\u66f4\u5e7f\u6cdb\u5e94\u7528\u4e8e\u53cd\u5411\u4ee3\u7406&#xff08;\u7ed3\u5408  mod_proxy  &#xff09;\u3001\u8d1f\u8f7d\u5747\u8861&#xff08;  mod_proxy_balancer  &#xff09;\u3001SSL\/TLS\u52a0\u5bc6\u670d\u52a1&#xff08;  mod_ssl  &#xff09;\u53caRESTful API\u7f51\u5173\u573a\u666f\u3002 <\/p>\n<h3> \u5728Windows\u5e73\u53f0\u90e8\u7f72Apache 2.4.29\u7684\u4ef7\u503c\u5206\u6790 <\/h3>\n<p> \u9009\u62e9Apache 2.4.29\u7248\u672c\u5728Windows\u7cfb\u7edf\u4e0a\u90e8\u7f72&#xff0c;\u6e90\u4e8e\u5176\u7ecf\u8fc7\u5145\u5206\u9a8c\u8bc1\u7684\u7a33\u5b9a\u6027\u4e0e\u517c\u5bb9\u6027\u3002\u8be5\u7248\u672c\u53d1\u5e03\u4e8e2017\u5e74&#xff0c;\u96c6\u6210\u4e86\u5173\u952e\u5b89\u5168\u8865\u4e01\u4e0e\u6027\u80fd\u4f18\u5316&#xff0c;\u652f\u6301HTTP\/2&#xff08;\u9700\u542f\u7528  mod_http2  &#xff09;\u3001\u589e\u5f3a\u7684ACL\u63a7\u5236\u53ca\u66f4\u7cbe\u7ec6\u7684\u65e5\u5fd7\u683c\u5f0f\u5b9a\u4e49&#xff0c;\u9002\u7528\u4e8e\u4f01\u4e1a\u5185\u7f51\u670d\u52a1\u3001\u5f00\u53d1\u6d4b\u8bd5\u73af\u5883\u4e43\u81f3\u4e2d\u5c0f\u578b\u751f\u4ea7\u7cfb\u7edf\u3002\u5c24\u5176\u5728Windows\u73af\u5883\u4e0b&#xff0c;Apache\u53ef\u65e0\u7f1d\u4e0eIIS\u5171\u5b58&#xff0c;\u901a\u8fc7\u7aef\u53e3\u9694\u79bb\u5b9e\u73b0\u591aWeb\u670d\u52a1\u5668\u534f\u540c&#xff0c;\u6216\u4f5c\u4e3a\u524d\u7aef\u4ee3\u7406\u5904\u7406PHP\u5e94\u7528&#xff08;\u5982WordPress\u3001Drupal&#xff09;&#xff0c;\u5f25\u8865IIS\u5bf9PHP\u539f\u751f\u652f\u6301\u8f83\u5f31\u7684\u77ed\u677f\u3002 <\/p>\n<p>graph LR<br \/>\n    A[\u5ba2\u6237\u7aef\u8bf7\u6c42] &#8211;&gt; B{Apache HTTP Server}<br \/>\n    B &#8211;&gt; C[\u9759\u6001\u6587\u4ef6: .html, .css, .js]<br \/>\n    B &#8211;&gt; D[\u52a8\u6001\u8bf7\u6c42\u4ee3\u7406]<br \/>\n    D &#8211;&gt; E[PHP via mod_php]<br \/>\n    D &#8211;&gt; F[Python via WSGI]<br \/>\n    D &#8211;&gt; G[\u53cd\u5411\u4ee3\u7406\u81f3Tomcat\/Node.js]<br \/>\n    B &#8211;&gt; H[\u65e5\u5fd7\u8bb0\u5f55\u4e0e\u8bbf\u95ee\u63a7\u5236]<\/p>\n<p> \u8be5\u67b6\u6784\u56fe\u5c55\u793a\u4e86Apache\u5728\u5178\u578b\u90e8\u7f72\u4e2d\u7684\u89d2\u8272\u5206\u6d41&#xff1a;\u65e2\u80fd\u72ec\u7acb\u63d0\u4f9b\u9759\u6001\u5185\u5bb9\u670d\u52a1&#xff0c;\u4e5f\u53ef\u4f5c\u4e3a\u5e94\u7528\u7f51\u5173\u7edf\u4e00\u5165\u53e3&#xff0c;\u5b9e\u73b0\u8bf7\u6c42\u8def\u7531\u3001\u5b89\u5168\u8fc7\u6ee4\u4e0e\u6027\u80fd\u4f18\u5316\u7684\u96c6\u4e2d\u7ba1\u7406\u3002 <\/p>\n<h2> 2. Apache 2.4.29\u5b89\u88c5\u5305\u7ed3\u6784\u89e3\u6790\u4e0e\u7cfb\u7edf\u51c6\u5907 <\/h2>\n<p> Apache HTTP Server\u7684\u90e8\u7f72\u8d28\u91cf&#xff0c;\u59cb\u4e8e\u5bf9\u5b89\u88c5\u5305\u7ed3\u6784\u7684\u6df1\u523b\u7406\u89e3\u4e0e\u7cfb\u7edf\u73af\u5883\u7684\u5145\u5206\u51c6\u5907\u3002\u5728Windows\u5e73\u53f0\u4e0a&#xff0c;Apache\u5e76\u672a\u63d0\u4f9b\u4f20\u7edf\u610f\u4e49\u4e0a\u7684\u201c\u5b89\u88c5\u7a0b\u5e8f\u201d&#xff08;\u5982  .msi  \u5b89\u88c5\u5411\u5bfc&#xff09;&#xff0c;\u800c\u662f\u4ee5\u538b\u7f29\u5f52\u6863\u5f62\u5f0f\u53d1\u5e03&#xff08;\u901a\u5e38\u4e3a  .zip  \u6587\u4ef6&#xff09;\u3002\u8fd9\u610f\u5473\u7740\u7528\u6237\u9700\u624b\u52a8\u89e3\u538b\u5e76\u914d\u7f6e\u670d\u52a1\u73af\u5883&#xff0c;\u8fd9\u4e00\u8fc7\u7a0b\u867d\u7136\u7075\u6d3b&#xff0c;\u4f46\u4e5f\u8981\u6c42\u8fd0\u7ef4\u4eba\u5458\u5177\u5907\u6e05\u6670\u7684\u6587\u4ef6\u7ed3\u6784\u8ba4\u77e5\u548c\u64cd\u4f5c\u7cfb\u7edf\u7ea7\u63a7\u5236\u80fd\u529b\u3002\u672c\u7ae0\u8282\u5c06\u6df1\u5165\u5256\u6790 Apache 2.4.29 \u7248\u672c\u7684\u5b89\u88c5\u5305\u7ec4\u6210&#xff0c;\u7ed3\u5408 Windows \u7cfb\u7edf\u7279\u6027&#xff0c;\u7cfb\u7edf\u6027\u5730\u68b3\u7406\u524d\u7f6e\u4f9d\u8d56\u3001\u8def\u5f84\u89c4\u8303\u3001\u6743\u9650\u7b56\u7565\u53ca\u5b8c\u6574\u6027\u6821\u9a8c\u673a\u5236&#xff0c;\u786e\u4fdd\u540e\u7eed\u5b89\u88c5\u6d41\u7a0b\u7a33\u5b9a\u53ef\u63a7\u3002 <\/p>\n<h3> 2.1 \u5b89\u88c5\u5305\u6838\u5fc3\u6587\u4ef6\u4e0e\u76ee\u5f55\u5256\u6790 <\/h3>\n<p> Apache \u7684 ZIP \u53d1\u884c\u7248\u7ed3\u6784\u9ad8\u5ea6\u6807\u51c6\u5316&#xff0c;\u5176\u5185\u90e8\u7ec4\u7ec7\u903b\u8f91\u4f53\u73b0\u4e86\u6a21\u5757\u5316\u8bbe\u8ba1\u601d\u60f3\u3002\u6b63\u786e\u8bc6\u522b\u5404\u5173\u952e\u7ec4\u4ef6\u7684\u529f\u80fd\u5b9a\u4f4d&#xff0c;\u662f\u5b9e\u73b0\u9ad8\u6548\u7ef4\u62a4\u548c\u6545\u969c\u6392\u67e5\u7684\u57fa\u7840\u3002 <\/p>\n<h4> 2.1.1 readme_first.html\u6587\u6863\u89e3\u8bfb&#xff1a;\u5b98\u65b9\u63d0\u793a\u4e0e\u524d\u7f6e\u8981\u6c42 <\/h4>\n<p> \u89e3\u538b Apache 2.4.29 \u7684 ZIP \u5305\u540e&#xff0c;\u6839\u76ee\u5f55\u4e2d\u4f1a\u5305\u542b\u4e00\u4e2a\u540d\u4e3a  readme_first.html  \u7684 HTML \u6587\u6863\u3002\u8be5\u6587\u4ef6\u867d\u5c0f&#xff0c;\u5374\u662f\u5b98\u65b9\u53d1\u5e03\u7684\u9996\u8981\u6307\u5f15&#xff0c;\u4e0d\u53ef\u5ffd\u89c6\u3002\u6253\u5f00\u8be5\u6587\u6863\u53ef\u53d1\u73b0\u5176\u5185\u5bb9\u4e3b\u8981\u5305\u62ec\u4ee5\u4e0b\u51e0\u70b9&#xff1a; <\/p>\n<ul>\n<li>  \u8fd0\u884c\u5e93\u4f9d\u8d56\u8bf4\u660e  &#xff1a;\u660e\u786e\u6307\u51fa Apache \u9700\u8981 Microsoft Visual C&#043;&#043; Redistributable for Visual Studio 2015\u20132019&#xff08;\u5373 VC&#043;&#043; 14.x&#xff09;\u652f\u6301\u3002 <\/li>\n<li>  \u670d\u52a1\u6ce8\u518c\u5efa\u8bae  &#xff1a;\u63a8\u8350\u4f7f\u7528  httpd.exe -k install  \u547d\u4ee4\u5c06 Apache \u6ce8\u518c\u4e3a Windows \u670d\u52a1&#xff0c;\u800c\u975e\u624b\u52a8\u542f\u52a8\u3002 <\/li>\n<li>  \u7aef\u53e3\u51b2\u7a81\u63d0\u9192  &#xff1a;\u82e5\u7cfb\u7edf\u5df2\u8fd0\u884c IIS \u6216 Skype \u7b49\u76d1\u542c 80\/443 \u7aef\u53e3\u7684\u670d\u52a1&#xff0c;Apache \u542f\u52a8\u5c06\u5931\u8d25&#xff0c;\u9700\u63d0\u524d\u505c\u6b62\u6216\u66f4\u6539\u76d1\u542c\u7aef\u53e3\u3002 <\/li>\n<li>  \u7ba1\u7406\u5458\u6743\u9650\u5f3a\u8c03  &#xff1a;\u7ed1\u5b9a\u4f4e\u4e8e 1024 \u7684\u7aef\u53e3&#xff08;\u5982 80&#xff09;\u5fc5\u987b\u4ee5\u7ba1\u7406\u5458\u8eab\u4efd\u8fd0\u884c\u547d\u4ee4\u884c\u5de5\u5177\u3002 <\/li>\n<\/ul>\n<p>&lt;!&#8211; \u793a\u4f8b&#xff1a;readme_first.html \u4e2d\u7684\u5173\u952e\u6bb5\u843d &#8211;&gt;<br \/>\n&lt;p&gt;<br \/>\n    This version of Apache requires the &lt;strong&gt;Microsoft Visual C&#043;&#043; 2015-2019 Redistributable Package (x64)&lt;\/strong&gt;<br \/>\n    to be installed on your system. Please download it from the Microsoft website if not already present.<br \/>\n&lt;\/p&gt;<\/p>\n<p>  \u903b\u8f91\u5206\u6790  &#xff1a;\u6b64 HTML \u6587\u4ef6\u672c\u8d28\u4e0a\u662f\u4e00\u4e2a\u9759\u6001\u5e2e\u52a9\u9875&#xff0c;\u4e0d\u53c2\u4e0e\u8fd0\u884c\u65f6\u903b\u8f91\u3002\u4f46\u5b83\u627f\u8f7d\u4e86\u7248\u672c\u7279\u5b9a\u7684\u91cd\u8981\u4fe1\u606f&#xff0c;\u5c24\u5176\u662f\u5173\u4e8e\u7f16\u8bd1\u5668\u8fd0\u884c\u65f6\u5e93\u7684\u4f9d\u8d56\u5173\u7cfb\u3002\u5ffd\u7565\u8be5\u63d0\u793a\u53ef\u80fd\u5bfc\u81f4  httpd.exe  \u542f\u52a8\u65f6\u62a5\u9519 \u201cThe program can\u2019t start because VCRUNTIME140.dll is missing\u201d\u3002 <\/p>\n<p>  \u53c2\u6570\u8bf4\u660e  &#xff1a;  &#8211;  VCRUNTIME140.dll  &#xff1a;Visual Studio 2015 \u53ca\u4ee5\u540e\u7248\u672c\u4f7f\u7528\u7684 C \u8fd0\u884c\u65f6\u52a8\u6001\u94fe\u63a5\u5e93\u3002  &#8211;  x64 vs x86  &#xff1a;\u6839\u636e\u4e0b\u8f7d\u7684 Apache \u67b6\u6784\u9009\u62e9\u5bf9\u5e94\u4f4d\u6570\u7684 VC&#043;&#043; \u5305\u3002Apache 2.4.29 \u63d0\u4f9b x86 \u548c x64 \u4e24\u79cd\u6784\u5efa\u7248\u672c&#xff0c;\u52a1\u5fc5\u5339\u914d\u7cfb\u7edf\u67b6\u6784\u3002 <\/p>\n<h5> \u63a8\u8350\u64cd\u4f5c\u6b65\u9aa4&#xff1a; <\/h5>\n<li> \u8bbf\u95ee\u5fae\u8f6f\u5b98\u7f51  https:\/\/support.microsoft.com\/en-us\/help\/2977003\/the-latest-supported-visual-c-downloads  <\/li>\n<li> \u4e0b\u8f7d\u5e76\u5b89\u88c5 \u201cVC_redist.x64.exe\u201d&#xff08;\u9002\u7528\u4e8e 64 \u4f4d Apache&#xff09; <\/li>\n<li> \u5b89\u88c5\u5b8c\u6210\u540e\u91cd\u542f\u547d\u4ee4\u884c\u7ec8\u7aef&#xff0c;\u907f\u514d\u7f13\u5b58\u5f71\u54cd <\/li>\n<h4> 2.1.2 Apache24\u4e3b\u76ee\u5f55\u7ed3\u6784\u8be6\u89e3&#xff08;bin\u3001conf\u3001htdocs\u3001logs\u3001modules&#xff09; <\/h4>\n<p> Apache \u89e3\u538b\u540e\u7684\u4e3b\u76ee\u5f55\u547d\u540d\u4e3a  Apache24  &#xff0c;\u5176\u6807\u51c6\u5b50\u76ee\u5f55\u5982\u4e0b\u8868\u6240\u793a&#xff1a; <\/p>\n<table>\n<tr> \u76ee\u5f55\u540d  \u529f\u80fd\u63cf\u8ff0 <\/tr>\n<tbody>\n<tr>\n<td>  bin  <\/td>\n<td> \u5b58\u653e\u53ef\u6267\u884c\u6587\u4ef6&#xff0c;\u5305\u62ec  httpd.exe  &#xff08;\u6838\u5fc3\u670d\u52a1\u5668\u8fdb\u7a0b&#xff09;\u3001  ab.exe  &#xff08;\u538b\u529b\u6d4b\u8bd5\u5de5\u5177&#xff09;\u3001  htpasswd.exe  &#xff08;\u5bc6\u7801\u751f\u6210\u5de5\u5177&#xff09;\u7b49 <\/td>\n<\/tr>\n<tr>\n<td>  conf  <\/td>\n<td> \u914d\u7f6e\u6587\u4ef6\u76ee\u5f55&#xff0c;\u6838\u5fc3\u4e3a  httpd.conf  &#xff0c;\u8fd8\u5305\u62ec mime.types\u3001extra \u5b50\u76ee\u5f55\u4e2d\u7684\u6269\u5c55\u914d\u7f6e\u7247\u6bb5 <\/td>\n<\/tr>\n<tr>\n<td>  htdocs  <\/td>\n<td> \u9ed8\u8ba4 Web \u5185\u5bb9\u6839\u76ee\u5f55&#xff0c;\u5b58\u653e HTML\u3001CSS\u3001JS \u7b49\u9759\u6001\u8d44\u6e90 <\/td>\n<\/tr>\n<tr>\n<td>  logs  <\/td>\n<td> \u65e5\u5fd7\u8f93\u51fa\u76ee\u5f55&#xff0c;\u9ed8\u8ba4\u5199\u5165  access.log  \u548c  error.log  <\/td>\n<\/tr>\n<tr>\n<td>  modules  <\/td>\n<td> \u52a8\u6001\u52a0\u8f7d\u6a21\u5757\u76ee\u5f55&#xff0c;\u5305\u542b  .so  \u6587\u4ef6&#xff08;\u5982 mod_rewrite.so\u3001mod_ssl.so&#xff09; <\/td>\n<\/tr>\n<tr>\n<td>  cgi-bin  <\/td>\n<td> &#xff08;\u53ef\u9009&#xff09;CGI \u811a\u672c\u5b58\u653e\u76ee\u5f55&#xff0c;\u9ed8\u8ba4\u672a\u542f\u7528 <\/td>\n<\/tr>\n<tr>\n<td>  manual  <\/td>\n<td> &#xff08;\u53ef\u9009&#xff09;\u672c\u5730\u6587\u6863\u624b\u518c&#xff0c;\u53ef\u7528\u4e8e\u79bb\u7ebf\u67e5\u9605 Apache \u5b98\u65b9\u6307\u5357 <\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>graph TD<br \/>\n    A[Apache24] &#8211;&gt; B[bin]<br \/>\n    A &#8211;&gt; C[conf]<br \/>\n    A &#8211;&gt; D[htdocs]<br \/>\n    A &#8211;&gt; E[logs]<br \/>\n    A &#8211;&gt; F[modules]<br \/>\n    B &#8211;&gt; B1[httpd.exe]<br \/>\n    B &#8211;&gt; B2[ab.exe]<br \/>\n    B &#8211;&gt; B3[htpasswd.exe]<\/p>\n<p>    C &#8211;&gt; C1[httpd.conf]<br \/>\n    C &#8211;&gt; C2[mime.types]<br \/>\n    C &#8211;&gt; C3[extra\/]<\/p>\n<p>    D &#8211;&gt; D1[index.html]<\/p>\n<p>    E &#8211;&gt; E1[access.log]<br \/>\n    E &#8211;&gt; E2[error.log]<\/p>\n<p>    F &#8211;&gt; F1[mod_rewrite.so]<br \/>\n    F &#8211;&gt; F2[mod_deflate.so]<br \/>\n    F &#8211;&gt; F3[mod_ssl.so]<\/p>\n<p>  \u903b\u8f91\u5206\u6790  &#xff1a;\u8fd9\u79cd\u5206\u5c42\u7ed3\u6784\u9075\u5faa Unix \u98ce\u683c\u7684\u5e03\u5c40\u60ef\u4f8b&#xff0c;\u4fbf\u4e8e\u8de8\u5e73\u53f0\u8fc1\u79fb\u3002\u5176\u4e2d  conf\/httpd.conf  \u662f\u5168\u5c40\u5165\u53e3\u914d\u7f6e\u6587\u4ef6&#xff0c;\u6240\u6709\u5176\u4ed6\u6a21\u5757\u548c\u8def\u5f84\u8bbe\u7f6e\u5747\u7531\u6b64\u5f15\u7528\u3002  htdocs  \u4f5c\u4e3a\u9ed8\u8ba4 DocumentRoot&#xff0c;\u5728\u672a\u4fee\u6539\u914d\u7f6e\u524d\u5373\u5bf9\u5916\u63d0\u4f9b\u670d\u52a1\u5185\u5bb9\u3002 <\/p>\n<p>  \u6269\u5c55\u8bf4\u660e  &#xff1a;\u53ef\u901a\u8fc7  ServerRoot  \u6307\u4ee4\u5728\u914d\u7f6e\u4e2d\u91cd\u65b0\u5b9a\u4e49\u8fd9\u4e9b\u8def\u5f84\u7684\u4f4d\u7f6e\u3002\u4f8b\u5982&#xff1a; <\/p>\n<p>ServerRoot &#034;D:\/Servers\/Apache&#034;<\/p>\n<p> \u6b64\u65f6&#xff0c;Apache \u5c06\u4ece\u65b0\u8def\u5f84\u4e0b\u5bfb\u627e  conf  \u3001  logs  \u7b49\u5b50\u76ee\u5f55\u3002 <\/p>\n<h4> 2.1.3 \u53ef\u6267\u884c\u6587\u4ef6httpd.exe\u4e0e\u670d\u52a1\u63a7\u5236\u811a\u672c\u7684\u4f5c\u7528\u673a\u5236 <\/h4>\n<p>  httpd.exe  \u662f Apache \u5728 Windows \u4e0a\u7684\u6838\u5fc3\u5b88\u62a4\u8fdb\u7a0b&#xff0c;\u8d1f\u8d23\u76d1\u542c\u7f51\u7edc\u8bf7\u6c42\u3001\u8c03\u5ea6\u6a21\u5757\u5904\u7406\u3001\u8fd4\u56de\u54cd\u5e94\u6570\u636e\u3002\u5b83\u652f\u6301\u591a\u79cd\u547d\u4ee4\u884c\u53c2\u6570\u6765\u63a7\u5236\u8fd0\u884c\u6a21\u5f0f&#xff1a; <\/p>\n<p># \u542f\u52a8 Apache \u4f5c\u4e3a\u524d\u53f0\u8fdb\u7a0b&#xff08;\u7528\u4e8e\u8c03\u8bd5&#xff09;<br \/>\nhttpd.exe<\/p>\n<p># \u6ce8\u518c\u4e3a Windows \u670d\u52a1<br \/>\nhttpd.exe -k install<\/p>\n<p># \u542f\u52a8\u5df2\u6ce8\u518c\u7684\u670d\u52a1<br \/>\nhttpd.exe -k start<\/p>\n<p># \u505c\u6b62\u6b63\u5728\u8fd0\u884c\u7684\u670d\u52a1<br \/>\nhttpd.exe -k stop<\/p>\n<p># \u91cd\u65b0\u52a0\u8f7d\u914d\u7f6e&#xff08;\u5e73\u6ed1\u91cd\u542f&#xff09;<br \/>\nhttpd.exe -k restart<\/p>\n<p># \u6307\u5b9a\u914d\u7f6e\u6587\u4ef6\u8def\u5f84&#xff08;\u975e\u9ed8\u8ba4 conf\/httpd.conf&#xff09;<br \/>\nhttpd.exe -f &#034;C:\\\\custom\\\\config.conf&#034;<\/p>\n<p># \u6d4b\u8bd5\u914d\u7f6e\u8bed\u6cd5\u662f\u5426\u6b63\u786e<br \/>\nhttpd.exe -t<\/p>\n<p>  \u4ee3\u7801\u903b\u8f91\u9010\u884c\u89e3\u8bfb  &#xff1a;  &#8211;  httpd.exe  &#xff1a;\u65e0\u53c2\u6570\u8fd0\u884c\u65f6&#xff0c;\u8bfb\u53d6\u9ed8\u8ba4  conf\/httpd.conf  \u5e76\u4ee5\u524d\u53f0\u65b9\u5f0f\u542f\u52a8&#xff0c;\u4fbf\u4e8e\u89c2\u5bdf\u63a7\u5236\u53f0\u8f93\u51fa\u65e5\u5fd7\u3002  &#8211;  -k install  &#xff1a;\u8c03\u7528 Windows Service Control Manager (SCM)&#xff0c;\u521b\u5efa\u540d\u4e3a \u201cApache2.4\u201d \u7684\u670d\u52a1\u9879&#xff0c;\u6307\u5411\u5f53\u524d  httpd.exe  \u8def\u5f84\u3002  &#8211;  -k start  &#xff1a;\u901a\u77e5 SCM \u542f\u52a8\u670d\u52a1&#xff0c;\u7531\u7cfb\u7edf\u540e\u53f0\u8fd0\u884c  httpd.exe  \u5b9e\u4f8b\u3002  &#8211;  -k restart  &#xff1a;\u5148\u53d1\u9001 STOP \u4fe1\u53f7\u518d START&#xff0c;\u5b9e\u73b0\u914d\u7f6e\u91cd\u8f7d&#xff1b;\u6bd4  stop &#043; start  \u66f4\u5b89\u5168&#xff0c;\u9632\u6b62\u4e2d\u95f4\u72b6\u6001\u4e2d\u65ad\u3002  &#8211;  -t  &#xff1a;\u4ec5\u89e3\u6790\u914d\u7f6e\u6587\u4ef6\u8bed\u6cd5&#xff0c;\u4e0d\u5b9e\u9645\u542f\u52a8\u670d\u52a1&#xff0c;\u5e38\u7528\u4e8e\u53d8\u66f4\u914d\u7f6e\u524d\u9a8c\u8bc1\u3002 <\/p>\n<p>  \u53c2\u6570\u8bf4\u660e\u8865\u5145  &#xff1a;  &#8211;  -k  \u53c2\u6570\u6765\u6e90\u4e8e \u201ckill signal\u201d \u7684\u7c7b Unix \u8bed\u4e49&#xff0c;\u8868\u793a\u5411\u670d\u52a1\u5668\u53d1\u9001\u63a7\u5236\u4fe1\u53f7\u3002  &#8211; \u82e5\u672a\u6ce8\u518c\u670d\u52a1\u800c\u76f4\u63a5\u4f7f\u7528  -k start  &#xff0c;\u5c06\u62a5\u9519&#xff1a;\u201cAH00436: No running server configured\u201d\u3002 <\/p>\n<p> \u6b64\u5916&#xff0c;Apache \u4e0d\u81ea\u5e26\u6279\u5904\u7406\u811a\u672c&#xff08;\u5982  startup.bat  &#xff09;&#xff0c;\u4f46\u53ef\u81ea\u884c\u7f16\u5199\u7ba1\u7406\u811a\u672c\u63d0\u5347\u6548\u7387&#xff1a; <\/p>\n<p>:: manage_apache.bat<br \/>\n&#064;echo off<br \/>\nset APACHE_HOME&#061;C:\\\\Apache24<\/p>\n<p>cd \/d %APACHE_HOME%\\\\bin<\/p>\n<p>echo Starting Apache&#8230;<br \/>\nhttpd.exe -k start<br \/>\npause<\/p>\n<p>  \u4f18\u5316\u5efa\u8bae  &#xff1a;\u53ef\u5728\u811a\u672c\u4e2d\u52a0\u5165\u9519\u8bef\u68c0\u6d4b\u903b\u8f91&#xff1a; <\/p>\n<p>if %errorlevel% neq 0 (<br \/>\n    echo Failed to start Apache. Check error.log for details.<br \/>\n    exit \/b 1<br \/>\n)<\/p>\n<h3> 2.2 Windows\u7cfb\u7edf\u517c\u5bb9\u6027\u4e0e\u4f9d\u8d56\u68c0\u67e5 <\/h3>\n<p> \u5c3d\u7ba1 Apache \u662f\u8de8\u5e73\u53f0\u8f6f\u4ef6&#xff0c;\u4f46\u5728 Windows \u4e0a\u7684\u8fd0\u884c\u4ecd\u53d7\u9650\u4e8e OS \u7248\u672c\u3001\u8fd0\u884c\u65f6\u73af\u5883\u548c\u6743\u9650\u6a21\u578b\u3002\u90e8\u7f72\u524d\u5fc5\u987b\u5b8c\u6210\u7cfb\u7edf\u517c\u5bb9\u6027\u8bc4\u4f30\u3002 <\/p>\n<h4> 2.2.1 \u64cd\u4f5c\u7cfb\u7edf\u7248\u672c\u652f\u6301\u8303\u56f4&#xff08;Windows 7\/8\/10\/Server 2008\u53ca\u4ee5\u4e0a&#xff09; <\/h4>\n<p> Apache 2.4.29 \u652f\u6301\u4ee5\u4e0b Windows \u7cfb\u7edf&#xff1a; <\/p>\n<table>\n<tr> \u64cd\u4f5c\u7cfb\u7edf  \u662f\u5426\u652f\u6301  \u5907\u6ce8 <\/tr>\n<tbody>\n<tr>\n<td> Windows 7 SP1 <\/td>\n<td> \u2705 <\/td>\n<td> \u9700\u5b89\u88c5 KB2533623 \u8865\u4e01\u4ee5\u652f\u6301 TLS 1.1&#043; <\/td>\n<\/tr>\n<tr>\n<td> Windows 8 <\/td>\n<td> \u2705 <\/td>\n<td> \u5df2\u5185\u7f6e\u5fc5\u8981\u7ec4\u4ef6 <\/td>\n<\/tr>\n<tr>\n<td> Windows 10 <\/td>\n<td> \u2705 <\/td>\n<td> \u63a8\u8350\u4f7f\u7528\u957f\u671f\u7ef4\u62a4\u7248\u672c&#xff08;LTSC&#xff09; <\/td>\n<\/tr>\n<tr>\n<td> Windows Server 2008 R2 SP1 <\/td>\n<td> \u2705 <\/td>\n<td> \u751f\u4ea7\u73af\u5883\u5e38\u89c1\u9009\u62e9 <\/td>\n<\/tr>\n<tr>\n<td> Windows Server 2012\/R2 <\/td>\n<td> \u2705 <\/td>\n<td> \u652f\u6301\u5b8c\u6574\u529f\u80fd\u96c6 <\/td>\n<\/tr>\n<tr>\n<td> Windows Server 2016&#043; <\/td>\n<td> \u2705 <\/td>\n<td> \u63a8\u8350\u7528\u4e8e\u73b0\u4ee3\u90e8\u7f72 <\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>  \u6ce8\u610f\u4e8b\u9879  &#xff1a;  &#8211; \u4e0d\u652f\u6301 Windows XP \u548c Vista&#xff1b;  &#8211; Windows Home \u7248\u672c\u4e5f\u53ef\u8fd0\u884c&#xff0c;\u4f46\u7f3a\u5c11\u7ec4\u7b56\u7565\u548c\u9ad8\u7ea7\u5b89\u5168\u5ba1\u8ba1\u529f\u80fd&#xff1b;  &#8211; \u5bf9\u4e8e\u4e91\u670d\u52a1\u5668\u5b9e\u4f8b&#xff08;\u5982 AWS EC2\u3001Azure VM&#xff09;&#xff0c;\u5efa\u8bae\u4f7f\u7528 Server Core \u7248\u672c\u4ee5\u51cf\u5c11\u653b\u51fb\u9762\u3002 <\/p>\n<p> \u53ef\u901a\u8fc7 PowerShell \u67e5\u8be2\u7cfb\u7edf\u7248\u672c\u4fe1\u606f&#xff1a; <\/p>\n<p>Get-WmiObject -Class Win32_OperatingSystem | Select Caption, Version, ServicePackMajorVersion<\/p>\n<p> \u8f93\u51fa\u793a\u4f8b&#xff1a; <\/p>\n<p>Caption                                   Version    ServicePackMajorVersion<br \/>\n&#8212;&#8212;-                                   &#8212;&#8212;-    &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br \/>\nMicrosoft Windows 10 Pro                  10.0.19045  0<\/p>\n<h4> 2.2.2 Visual C&#043;&#043; Redistributable\u8fd0\u884c\u5e93\u4f9d\u8d56\u9a8c\u8bc1\u4e0e\u5b89\u88c5 <\/h4>\n<p> Apache \u4f7f\u7528 MSVC \u7f16\u8bd1&#xff0c;\u56e0\u6b64\u4f9d\u8d56\u5bf9\u5e94\u7684\u8fd0\u884c\u65f6\u5e93\u3002\u7f3a\u5931\u65f6\u5178\u578b\u9519\u8bef\u5305\u62ec&#xff1a; <\/p>\n<ul>\n<li> \u201c\u65e0\u6cd5\u542f\u52a8\u6b64\u7a0b\u5e8f&#xff0c;\u56e0\u4e3a\u8ba1\u7b97\u673a\u4e2d\u4e22\u5931 VCRUNTIME140.dll\u201d <\/li>\n<li> \u201c\u7531\u4e8e\u5e94\u7528\u7a0b\u5e8f\u914d\u7f6e\u4e0d\u6b63\u786e&#xff0c;\u5e94\u7528\u7a0b\u5e8f\u672a\u80fd\u542f\u52a8\u201d <\/li>\n<\/ul>\n<h5> \u9a8c\u8bc1\u65b9\u6cd5&#xff1a; <\/h5>\n<li>  \u547d\u4ee4\u884c\u68c0\u6d4b\u662f\u5426\u5b58\u5728\u6a21\u5757  &#xff1a; <\/li>\n<p>where vcruntime140.dll<\/p>\n<p> \u82e5\u8fd4\u56de\u8def\u5f84&#xff08;\u5982  C:\\\\Windows\\\\System32\\\\vcruntime140.dll  &#xff09;&#xff0c;\u5219\u8868\u793a\u5df2\u5b89\u88c5\u3002 <\/p>\n<li>  \u901a\u8fc7\u6ce8\u518c\u8868\u67e5\u770b\u5b89\u88c5\u72b6\u6001  &#xff1a; <\/li>\n<p>HKEY_LOCAL_MACHINE\\\\SOFTWARE\\\\Microsoft\\\\VisualStudio\\\\14.0\\\\VC\\\\Runtimes\\\\x64<\/p>\n<p> \u952e\u503c  Installed  \u5e94\u4e3a  1  \u3002 <\/p>\n<li>  \u4f7f\u7528 Dependency Walker&#xff08;depends.exe&#xff09;\u5206\u6790 httpd.exe \u4f9d\u8d56\u94fe  <\/li>\n<h5> \u5b89\u88c5\u6b65\u9aa4&#xff1a; <\/h5>\n<li> \u4e0b\u8f7d\u5730\u5740&#xff1a;  https:\/\/aka.ms\/vs\/16\/release\/vc_redist.x64.exe  <\/li>\n<li> \u4ee5\u7ba1\u7406\u5458\u8eab\u4efd\u8fd0\u884c\u5b89\u88c5\u5305 <\/li>\n<li> \u5b89\u88c5\u5b8c\u6210\u540e\u91cd\u542f\u7cfb\u7edf&#xff08;\u67d0\u4e9b\u65e7\u7248\u672c\u9700\u8981&#xff09; <\/li>\n<p>  \u6700\u4f73\u5b9e\u8df5  &#xff1a;\u5728\u81ea\u52a8\u5316\u90e8\u7f72\u4e2d&#xff0c;\u53ef\u96c6\u6210\u9759\u9ed8\u5b89\u88c5\u547d\u4ee4&#xff1a; <\/p>\n<p>vc_redist.x64.exe \/install \/quiet \/norestart<\/p>\n<table>\n<tr> \u53c2\u6570  \u4f5c\u7528 <\/tr>\n<tbody>\n<tr>\n<td>  \/install  <\/td>\n<td> \u6267\u884c\u5b89\u88c5\u64cd\u4f5c <\/td>\n<\/tr>\n<tr>\n<td>  \/quiet  <\/td>\n<td> \u9759\u9ed8\u6a21\u5f0f&#xff0c;\u65e0 UI \u5f39\u7a97 <\/td>\n<\/tr>\n<tr>\n<td>  \/norestart  <\/td>\n<td> \u7981\u6b62\u81ea\u52a8\u91cd\u542f <\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h4> 2.2.3 \u7ba1\u7406\u5458\u6743\u9650\u5fc5\u8981\u6027\u4e0eUAC\u8bbe\u7f6e\u8c03\u6574\u5efa\u8bae <\/h4>\n<p> Apache \u82e5\u8981\u76d1\u542c 80 \u6216 443 \u7aef\u53e3&#xff0c;\u5fc5\u987b\u62e5\u6709\u7ed1\u5b9a\u7279\u6743\u7aef\u53e3\u7684\u6743\u9650&#xff0c;\u8fd9\u5728 Windows \u4e2d\u5c5e\u4e8e\u9ad8\u6743\u9650\u64cd\u4f5c\u3002 <\/p>\n<h5> \u6743\u9650\u9700\u6c42\u573a\u666f&#xff1a; <\/h5>\n<table>\n<tr> \u64cd\u4f5c  \u662f\u5426\u9700\u8981\u7ba1\u7406\u5458\u6743\u9650 <\/tr>\n<tbody>\n<tr>\n<td> \u89e3\u538b\u5230  C:\\\\Apache24  <\/td>\n<td> \u2705&#xff08;\u76ee\u6807\u8def\u5f84\u53d7\u4fdd\u62a4&#xff09; <\/td>\n<\/tr>\n<tr>\n<td> \u6ce8\u518c\u7cfb\u7edf\u670d\u52a1 <\/td>\n<td> \u2705 <\/td>\n<\/tr>\n<tr>\n<td> \u542f\u52a8\u670d\u52a1&#xff08;\u7531 SCM \u6258\u7ba1&#xff09; <\/td>\n<td> \u274c&#xff08;\u670d\u52a1\u81ea\u8eab\u8fd0\u884c&#xff09; <\/td>\n<\/tr>\n<tr>\n<td> \u4fee\u6539  conf\/httpd.conf  <\/td>\n<td> \u26a0\ufe0f&#xff08;\u53d6\u51b3\u4e8e\u6587\u4ef6\u6743\u9650&#xff09; <\/td>\n<\/tr>\n<tr>\n<td> \u76d1\u542c 80\/443 \u7aef\u53e3 <\/td>\n<td> \u2705&#xff08;\u9996\u6b21\u542f\u52a8\u9a8c\u8bc1&#xff09; <\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h5> UAC \u8bbe\u7f6e\u5efa\u8bae&#xff1a; <\/h5>\n<ul>\n<li> \u5f00\u53d1\u73af\u5883&#xff1a;\u53ef\u6682\u65f6\u5173\u95ed UAC \u4ee5\u7b80\u5316\u8c03\u8bd5&#xff1b; <\/li>\n<li> \u751f\u4ea7\u73af\u5883&#xff1a;\u4fdd\u6301 UAC \u5f00\u542f&#xff0c;\u4f46\u4e3a Apache \u5b89\u88c5\u8d26\u6237\u5206\u914d\u9002\u5f53\u6743\u9650&#xff1b; <\/li>\n<li> \u63a8\u8350\u505a\u6cd5&#xff1a;\u4f7f\u7528\u4e13\u7528\u670d\u52a1\u8d26\u6237\u8fd0\u884c Apache&#xff0c;\u800c\u975e SYSTEM \u6216 Administrator\u3002 <\/li>\n<\/ul>\n<p> \u53ef\u901a\u8fc7\u4ee5\u4e0b\u65b9\u5f0f\u63d0\u5347\u547d\u4ee4\u884c\u6743\u9650&#xff1a; <\/p>\n<p># \u521b\u5efa\u5feb\u6377\u65b9\u5f0f\u5e76\u8bbe\u7f6e\u201c\u4ee5\u7ba1\u7406\u5458\u8eab\u4efd\u8fd0\u884c\u201d<br \/>\n$ShortcutPath &#061; &#034;$env:USERPROFILE\\\\Desktop\\\\Apache Admin.lnk&#034;<br \/>\n$WScriptShell &#061; New-Object -ComObject WScript.Shell<br \/>\n$Shortcut &#061; $WScriptShell.CreateShortcut($ShortcutPath)<br \/>\n$Shortcut.TargetPath &#061; &#034;C:\\\\Windows\\\\System32\\\\cmd.exe&#034;<br \/>\n$Shortcut.RunAsUser &#061; $true<br \/>\n$Shortcut.Save()<\/p>\n<p>  \u5b89\u5168\u8b66\u793a  &#xff1a;\u5207\u52ff\u957f\u671f\u4ee5\u5b8c\u5168\u7981\u7528 UAC \u7684\u65b9\u5f0f\u8fd0\u884c\u751f\u4ea7\u7cfb\u7edf&#xff0c;\u5426\u5219\u6613\u906d\u63d0\u6743\u653b\u51fb\u3002 <\/p>\n<h3> 2.3 \u5b89\u88c5\u8def\u5f84\u89c4\u5212\u4e0e\u547d\u540d\u89c4\u8303 <\/h3>\n<p> \u5408\u7406\u7684\u8def\u5f84\u8bbe\u8ba1\u4e0d\u4ec5\u80fd\u907f\u514d\u8fd0\u884c\u65f6\u9519\u8bef&#xff0c;\u8fd8\u80fd\u63d0\u5347\u540e\u671f\u7ef4\u62a4\u6548\u7387\u3002 <\/p>\n<h4> 2.3.1 \u907f\u514d\u4e2d\u6587\u4e0e\u7a7a\u683c\u8def\u5f84\u7684\u5b89\u5168\u5b9e\u8df5 <\/h4>\n<p> Windows \u867d\u7136\u652f\u6301 Unicode \u8def\u5f84&#xff0c;\u4f46 Apache \u7684\u67d0\u4e9b\u6a21\u5757&#xff08;\u5c24\u5176\u662f\u7b2c\u4e09\u65b9\u6a21\u5757&#xff09;\u53ef\u80fd\u56e0\u7f16\u7801\u95ee\u9898\u5bfc\u81f4\u52a0\u8f7d\u5931\u8d25\u3002 <\/p>\n<p>  \u53cd\u4f8b\u8def\u5f84  &#xff1a; <\/p>\n<p>C:\\\\\u6211\u7684\u670d\u52a1\u5668\\\\Apache 2.4\\\\<\/p>\n<p> \u53ef\u80fd\u5bfc\u81f4\u7684\u95ee\u9898&#xff1a;  &#8211;  httpd.exe -t  \u62a5\u9519&#xff1a;  Syntax error on line XX of C:\/&#8230;\/httpd.conf: Cannot load modules\/mod_rewrite.so into server   &#8211; \u65e5\u5fd7\u8def\u5f84\u5199\u5165\u5931\u8d25  &#8211; CGI \u811a\u672c\u6267\u884c\u5f02\u5e38 <\/p>\n<p>  \u6b63\u4f8b\u8def\u5f84  &#xff1a; <\/p>\n<p>C:\\\\Apache24\\\\<br \/>\nD:\\\\webserver\\\\apache\\\\<\/p>\n<p>  \u5efa\u8bae\u89c4\u5219  &#xff1a;  &#8211; \u4f7f\u7528\u5168\u82f1\u6587\u5b57\u7b26  &#8211; \u7981\u6b62\u7a7a\u683c&#xff08;\u53ef\u7528\u77ed\u6a2a\u7ebf\u6216\u4e0b\u5212\u7ebf\u66ff\u4ee3&#xff09;  &#8211; \u4e0d\u4f7f\u7528\u7279\u6b8a\u7b26\u53f7&#xff08;\u5982  #  ,  &amp;  ,  %  &#xff09;  &#8211; \u8def\u5f84\u5c42\u7ea7\u5c3d\u91cf\u6241\u5e73&#xff08;\u4e0d\u8d85\u8fc7\u4e09\u5c42&#xff09; <\/p>\n<h4> 2.3.2 \u63a8\u8350\u5b89\u88c5\u4f4d\u7f6e&#xff08;C:\\\\Apache24&#xff09;\u4e0e\u591a\u5b9e\u4f8b\u90e8\u7f72\u8003\u91cf <\/h4>\n<p>  \u5355\u5b9e\u4f8b\u63a8\u8350\u8def\u5f84  &#xff1a;  C:\\\\Apache24  <\/p>\n<p> \u4f18\u70b9&#xff1a;  &#8211; \u6613\u8bb0\u4e14\u7b26\u5408\u793e\u533a\u60ef\u4f8b  &#8211; \u4fbf\u4e8e\u4e0e\u5176\u4ed6\u5de5\u5177&#xff08;\u5982 PHP\u3001MySQL&#xff09;\u5f62\u6210\u7edf\u4e00\u7ed3\u6784&#xff08;\u5982  C:\\\\PHP  ,  C:\\\\MySQL  &#xff09;  &#8211; \u65b9\u4fbf\u811a\u672c\u5f15\u7528&#xff08;\u8def\u5f84\u56fa\u5b9a&#xff09; <\/p>\n<p>  \u591a\u5b9e\u4f8b\u90e8\u7f72\u573a\u666f  &#xff1a; <\/p>\n<p> \u5f53\u9700\u5728\u540c\u4e00\u673a\u5668\u4e0a\u8fd0\u884c\u591a\u4e2a\u72ec\u7acb Apache \u5b9e\u4f8b&#xff08;\u5982\u5f00\u53d1\u3001\u6d4b\u8bd5\u3001\u9884\u53d1\u5e03\u73af\u5883&#xff09;&#xff0c;\u5e94\u91c7\u7528\u7f16\u53f7\u9694\u79bb\u6cd5&#xff1a; <\/p>\n<p>C:\\\\Apache24_dev\\\\<br \/>\nC:\\\\Apache24_test\\\\<br \/>\nC:\\\\Apache24_stage\\\\<\/p>\n<p> \u6bcf\u4e2a\u5b9e\u4f8b\u5e94\u6709\u72ec\u7acb\u7684&#xff1a;  &#8211;  conf\/httpd.conf  &#xff08;\u4fee\u6539  ServerName  ,  Listen  ,  DocumentRoot  &#xff09;  &#8211;  logs\/  \u76ee\u5f55  &#8211; \u670d\u52a1\u540d\u79f0&#xff08;\u901a\u8fc7  -n  \u53c2\u6570\u6307\u5b9a&#xff09; <\/p>\n<p> \u6ce8\u518c\u591a\u5b9e\u4f8b\u670d\u52a1\u547d\u4ee4\u793a\u4f8b&#xff1a; <\/p>\n<p>httpd.exe -k install -n &#034;ApacheDev&#034; -f &#034;C:\\\\Apache24_dev\\\\conf\\\\httpd.conf&#034;<br \/>\nhttpd.exe -k install -n &#034;ApacheTest&#034; -f &#034;C:\\\\Apache24_test\\\\conf\\\\httpd.conf&#034;<\/p>\n<p>  \u53c2\u6570\u8bf4\u660e  &#xff1a;  &#8211;  -n &#034;ApacheDev&#034;  &#xff1a;\u6307\u5b9a\u670d\u52a1\u540d\u79f0&#xff0c;\u907f\u514d\u51b2\u7a81  &#8211;  -f  &#xff1a;\u6307\u5b9a\u914d\u7f6e\u6587\u4ef6\u8def\u5f84&#xff0c;\u5b9e\u73b0\u914d\u7f6e\u9694\u79bb <\/p>\n<h4> 2.3.3 \u6587\u4ef6\u5939\u6743\u9650\u9884\u914d\u7f6e\u539f\u5219&#xff08;SYSTEM\u4e0eAdministrators\u8bbf\u95ee\u63a7\u5236&#xff09; <\/h4>\n<p> \u5373\u4f7f\u4ee5\u7ba1\u7406\u5458\u8eab\u4efd\u5b89\u88c5&#xff0c;\u4e5f\u9700\u663e\u5f0f\u8bbe\u7f6e\u76ee\u5f55\u6743\u9650\u4ee5\u4fdd\u969c\u957f\u671f\u8fd0\u884c\u7a33\u5b9a\u6027\u3002 <\/p>\n<h5> NTFS \u6743\u9650\u8bbe\u7f6e\u5efa\u8bae&#xff1a; <\/h5>\n<table>\n<tr> \u8def\u5f84  \u6388\u4e88\u5bf9\u8c61  \u6743\u9650\u7c7b\u578b <\/tr>\n<tbody>\n<tr>\n<td>  C:\\\\Apache24  <\/td>\n<td> SYSTEM <\/td>\n<td> \u5b8c\u5168\u63a7\u5236 <\/td>\n<\/tr>\n<tr>\n<td> <\/td>\n<td> Administrators <\/td>\n<td> \u5b8c\u5168\u63a7\u5236 <\/td>\n<\/tr>\n<tr>\n<td> <\/td>\n<td> Users <\/td>\n<td> \u8bfb\u53d6\u548c\u6267\u884c <\/td>\n<\/tr>\n<tr>\n<td>  logs  <\/td>\n<td> Apache \u670d\u52a1\u8d26\u6237 <\/td>\n<td> \u4fee\u6539\u3001\u5199\u5165 <\/td>\n<\/tr>\n<tr>\n<td>  htdocs  <\/td>\n<td> IUSR&#xff08;\u82e5\u542f\u7528 CGI&#xff09; <\/td>\n<td> \u8bfb\u53d6 <\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h5> \u8bbe\u7f6e\u65b9\u6cd5&#xff08;PowerShell&#xff09;&#xff1a; <\/h5>\n<p>$path &#061; &#034;C:\\\\Apache24&#034;<br \/>\n$acl &#061; Get-Acl $path<\/p>\n<p># \u6dfb\u52a0 SYSTEM \u5b8c\u5168\u63a7\u5236<br \/>\n$rule &#061; New-Object System.Security.AccessControl.FileSystemAccessRule(&#034;SYSTEM&#034;,&#034;FullControl&#034;,&#034;ContainerInherit,ObjectInherit&#034;,&#034;None&#034;,&#034;Allow&#034;)<br \/>\n$acl.SetAccessRule($rule)<\/p>\n<p># \u6dfb\u52a0 Administrators<br \/>\n$rule &#061; New-Object System.Security.AccessControl.FileSystemAccessRule(&#034;Administrators&#034;,&#034;FullControl&#034;,&#034;ContainerInherit,ObjectInherit&#034;,&#034;None&#034;,&#034;Allow&#034;)<br \/>\n$acl.SetAccessRule($rule)<\/p>\n<p>Set-Acl $path $acl<\/p>\n<p>  \u903b\u8f91\u5206\u6790  &#xff1a;Apache \u670d\u52a1\u9ed8\u8ba4\u4ee5  Local System  \u8eab\u4efd\u8fd0\u884c&#xff0c;\u56e0\u6b64\u5fc5\u987b\u786e\u4fdd  SYSTEM  \u8d26\u6237\u5bf9\u5b89\u88c5\u76ee\u5f55\u5177\u6709\u5b8c\u5168\u63a7\u5236\u6743&#xff0c;\u5426\u5219\u65e0\u6cd5\u5199\u5165\u65e5\u5fd7\u6216\u52a0\u8f7d\u6a21\u5757\u3002 <\/p>\n<p>  \u98ce\u9669\u63d0\u793a  &#xff1a;\u7981\u6b62\u6388\u4e88  Everyone  \u6216  Users  \u5199\u6743\u9650&#xff0c;\u9632\u6b62\u6076\u610f\u7be1\u6539\u914d\u7f6e\u6587\u4ef6\u3002 <\/p>\n<h3> 2.4 \u51c6\u5907\u9636\u6bb5\u7684\u5b8c\u6574\u6027\u6821\u9a8c <\/h3>\n<p> \u5728\u6b63\u5f0f\u90e8\u7f72\u524d&#xff0c;\u5fc5\u987b\u9a8c\u8bc1\u5b89\u88c5\u5305\u6765\u6e90\u53ef\u4fe1\u4e14\u672a\u88ab\u7be1\u6539\u3002 <\/p>\n<h4> 2.4.1 \u4e0b\u8f7d\u6e90\u53ef\u4fe1\u5ea6\u786e\u8ba4&#xff08;Apache\u5b98\u7f51\u4e0ePGP\u7b7e\u540d\u9a8c\u8bc1&#xff09; <\/h4>\n<p> Apache \u5b98\u65b9\u53d1\u5e03\u7ad9\u70b9\u4e3a&#xff1a;  https:\/\/httpd.apache.org\/download.cgi  <\/p>\n<p> \u63a8\u8350\u955c\u50cf\u7ad9&#xff1a;  https:\/\/mirrors.tuna.tsinghua.edu.cn\/apache\/\/httpd\/  &#xff08;\u56fd\u5185\u52a0\u901f&#xff09; <\/p>\n<p> \u6bcf\u4e2a\u7248\u672c\u5747\u9644\u5e26\u4e24\u4e2a\u6821\u9a8c\u6587\u4ef6&#xff1a;  &#8211;  .md5  &#xff1a;MD5 \u6821\u9a8c\u7801  &#8211;  .sha1  \u6216  .sha256  &#xff1a;SHA \u6563\u5217\u503c  &#8211;  .asc  &#xff1a;PGP \u6570\u5b57\u7b7e\u540d <\/p>\n<h5> \u9a8c\u8bc1\u6b65\u9aa4&#xff1a; <\/h5>\n<li>\n<p> \u4e0b\u8f7d\u6587\u4ef6&#xff1a;  &#8211;  httpd-2.4.29-win64-VS14.zip   &#8211;  httpd-2.4.29-win64-VS14.zip.sha256   &#8211;  httpd-2.4.29-win64-VS14.zip.asc  <\/p>\n<\/li>\n<li>\n<p> \u8ba1\u7b97\u672c\u5730 SHA256 \u503c&#xff1a; <\/p>\n<\/li>\n<p>Get-FileHash .\\\\httpd-2.4.29-win64-VS14.zip -Algorithm SHA256<\/p>\n<li>\n<p> \u5bf9\u6bd4\u8f93\u51fa\u662f\u5426\u4e0e  .sha256  \u6587\u4ef6\u4e00\u81f4 <\/p>\n<\/li>\n<li>\n<p> \u5bfc\u5165 Apache \u53d1\u5e03\u8005\u516c\u94a5\u5e76\u9a8c\u8bc1 PGP \u7b7e\u540d&#xff1a; <\/p>\n<\/li>\n<p>gpg &#8211;import apache-http-key.asc<br \/>\ngpg &#8211;verify httpd-2.4.29-win64-VS14.zip.asc<\/p>\n<p>  \u8f93\u51fa\u793a\u4f8b  &#xff1a; <\/p>\n<p>gpg: Good signature from &#034;Yann Ylavic (Release Signing Key) &lt;ylavic.dev&#064;gmail.com&gt;&#034;<\/p>\n<p>  \u5b89\u5168\u610f\u4e49  &#xff1a;PGP \u9a8c\u8bc1\u53ef\u9632\u6b62\u4e2d\u95f4\u4eba\u653b\u51fb\u66ff\u6362\u6076\u610f\u4e8c\u8fdb\u5236\u6587\u4ef6&#xff0c;\u662f\u4f01\u4e1a\u7ea7\u90e8\u7f72\u7684\u5fc5\u5907\u73af\u8282\u3002 <\/p>\n<h4> 2.4.2 \u89e3\u538b\u5de5\u5177\u9009\u62e9&#xff08;7-Zip\u3001WinRAR&#xff09;\u4e0e\u89e3\u538b\u8fc7\u7a0b\u6ce8\u610f\u4e8b\u9879 <\/h4>\n<p> Apache ZIP \u5305\u91c7\u7528\u6807\u51c6\u538b\u7f29\u683c\u5f0f&#xff0c;\u4f46\u90e8\u5206\u5de5\u5177\u53ef\u80fd\u5904\u7406\u957f\u8def\u5f84\u5931\u8d25\u3002 <\/p>\n<h5> \u63a8\u8350\u5de5\u5177\u5bf9\u6bd4&#xff1a; <\/h5>\n<table>\n<tr> \u5de5\u5177  \u662f\u5426\u652f\u6301\u957f\u8def\u5f84  \u662f\u5426\u4fdd\u7559\u6743\u9650  \u662f\u5426\u514d\u8d39 <\/tr>\n<tbody>\n<tr>\n<td> 7-Zip <\/td>\n<td> \u2705 <\/td>\n<td> \u274c <\/td>\n<td> \u2705 <\/td>\n<\/tr>\n<tr>\n<td> WinRAR <\/td>\n<td> \u2705 <\/td>\n<td> \u274c <\/td>\n<td> \u274c&#xff08;\u8bd5\u7528&#xff09; <\/td>\n<\/tr>\n<tr>\n<td> Windows \u5185\u5efa\u89e3\u538b <\/td>\n<td> \u26a0\ufe0f&#xff08;\u8def\u5f84 &gt; 260 \u5b57\u7b26\u5931\u8d25&#xff09; <\/td>\n<td> \u274c <\/td>\n<td> \u2705 <\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>  \u5efa\u8bae  &#xff1a;\u4f7f\u7528 7-Zip \u8fdb\u884c\u89e3\u538b&#xff0c;\u56e0\u5176\u5f00\u6e90\u3001\u8f7b\u91cf\u4e14\u652f\u6301\u8d85\u957f\u8def\u5f84\u3002 <\/p>\n<h5> \u6b63\u786e\u89e3\u538b\u547d\u4ee4&#xff08;7z \u547d\u4ee4\u884c&#xff09;&#xff1a; <\/h5>\n<p>7z x httpd-2.4.29-win64-VS14.zip -oC:\\\\Apache24<\/p>\n<p>  \u53c2\u6570\u8bf4\u660e  &#xff1a;  &#8211;  x  &#xff1a;\u5b8c\u6574\u89e3\u538b&#xff08;\u4fdd\u7559\u76ee\u5f55\u7ed3\u6784&#xff09;  &#8211;  -o  &#xff1a;\u6307\u5b9a\u8f93\u51fa\u76ee\u5f55&#xff08;\u6ce8\u610f\u65e0\u7a7a\u683c&#xff09; <\/p>\n<h5> \u6ce8\u610f\u4e8b\u9879&#xff1a; <\/h5>\n<ul>\n<li> \u7981\u6b62\u76f4\u63a5\u53cc\u51fb\u89e3\u538b\u5230\u684c\u9762\u518d\u526a\u5207\u2014\u2014\u6613\u9020\u6210\u6743\u9650\u4e22\u5931 <\/li>\n<li> \u89e3\u538b\u540e\u7acb\u5373\u68c0\u67e5  bin\/httpd.exe  \u662f\u5426\u5b58\u5728 <\/li>\n<li> \u82e5\u51fa\u73b0\u201c\u62d2\u7edd\u8bbf\u95ee\u201d&#xff0c;\u8bf4\u660e\u9632\u75c5\u6bd2\u8f6f\u4ef6\u62e6\u622a&#xff0c;\u9700\u4e34\u65f6\u5173\u95ed\u6216\u6dfb\u52a0\u767d\u540d\u5355 <\/li>\n<\/ul>\n<p> \u6700\u7ec8\u76ee\u5f55\u7ed3\u6784\u5e94\u5982\u4e0b\u56fe\u6240\u793a&#xff1a; <\/p>\n<p>C:\\\\Apache24\/<br \/>\n\u251c\u2500\u2500 bin\/<br \/>\n\u2502   \u251c\u2500\u2500 httpd.exe<br \/>\n\u2502   \u2514\u2500\u2500 &#8230;<br \/>\n\u251c\u2500\u2500 conf\/<br \/>\n\u2502   \u251c\u2500\u2500 httpd.conf<br \/>\n\u2502   \u2514\u2500\u2500 &#8230;<br \/>\n\u251c\u2500\u2500 htdocs\/<br \/>\n\u2502   \u2514\u2500\u2500 index.html<br \/>\n\u251c\u2500\u2500 logs\/<br \/>\n\u251c\u2500\u2500 modules\/<br \/>\n\u2514\u2500\u2500 &#8230;<\/p>\n<p> \u81f3\u6b64&#xff0c;\u7cfb\u7edf\u51c6\u5907\u5de5\u4f5c\u5168\u90e8\u5b8c\u6210&#xff0c;\u53ef\u8fdb\u5165\u4e0b\u4e00\u7ae0\u8fdb\u884c\u5b9e\u9645\u5b89\u88c5\u4e0e\u670d\u52a1\u6ce8\u518c\u3002 <\/p>\n<h2> 3. Windows\u4e0bApache\u7684\u5b89\u88c5\u914d\u7f6e\u4e0e\u670d\u52a1\u6ce8\u518c\u6d41\u7a0b <\/h2>\n<p> \u5728\u73b0\u4ee3\u4f01\u4e1aIT\u67b6\u6784\u4e2d&#xff0c;Web\u670d\u52a1\u5668\u4f5c\u4e3a\u524d\u7aef\u6d41\u91cf\u5165\u53e3\u548c\u5e94\u7528\u627f\u8f7d\u5e73\u53f0&#xff0c;\u5176\u90e8\u7f72\u8d28\u91cf\u76f4\u63a5\u5f71\u54cd\u7cfb\u7edf\u7684\u53ef\u7528\u6027\u4e0e\u5b89\u5168\u6027\u3002Windows\u64cd\u4f5c\u7cfb\u7edf\u56e0\u5176\u5e7f\u6cdb\u7684\u7528\u6237\u57fa\u7840\u548c\u826f\u597d\u7684\u56fe\u5f62\u5316\u7ba1\u7406\u80fd\u529b&#xff0c;\u5728\u5f00\u53d1\u6d4b\u8bd5\u73af\u5883\u3001\u5185\u7f51\u670d\u52a1\u90e8\u7f72\u4ee5\u53ca\u4e2d\u5c0f\u578b\u751f\u4ea7\u7cfb\u7edf\u4e2d\u4ecd\u5360\u636e\u91cd\u8981\u5730\u4f4d\u3002\u5c06Apache HTTP Server\u6210\u529f\u90e8\u7f72\u4e8eWindows\u5e73\u53f0&#xff0c;\u4e0d\u4ec5\u662f\u5f00\u53d1\u8005\u638c\u63e1\u5168\u6808\u6280\u80fd\u7684\u5173\u952e\u4e00\u73af&#xff0c;\u4e5f\u662f\u8fd0\u7ef4\u4eba\u5458\u5b9e\u73b0\u8de8\u5e73\u53f0\u670d\u52a1\u80fd\u529b\u7684\u57fa\u7840\u4fdd\u969c\u3002 <\/p>\n<p> \u672c\u7ae0\u805a\u7126\u4e8e\u4ece\u96f6\u5f00\u59cb\u5b8c\u6210Apache 2.4.29\u5728Windows\u7cfb\u7edf\u4e0a\u7684\u5b8c\u6574\u5b89\u88c5\u4e0e\u670d\u52a1\u5316\u914d\u7f6e\u6d41\u7a0b\u3002\u4e0d\u540c\u4e8eLinux\u73af\u5883\u4e0b\u901a\u8fc7\u5305\u7ba1\u7406\u5668&#xff08;\u5982yum\u6216apt&#xff09;\u4e00\u952e\u5b89\u88c5\u7684\u65b9\u5f0f&#xff0c;Windows\u7248\u672c\u7684Apache\u4ee5\u538b\u7f29\u5305\u5f62\u5f0f\u63d0\u4f9b&#xff0c;\u8981\u6c42\u64cd\u4f5c\u8005\u624b\u52a8\u89e3\u538b\u3001\u914d\u7f6e\u5e76\u5c06\u5176\u6ce8\u518c\u4e3a\u7cfb\u7edf\u670d\u52a1\u3002\u8fd9\u4e00\u8fc7\u7a0b\u867d\u7136\u589e\u52a0\u4e86\u521d\u59cb\u590d\u6742\u5ea6&#xff0c;\u4f46\u4e5f\u8d4b\u4e88\u4e86\u66f4\u9ad8\u7684\u7075\u6d3b\u6027\u548c\u63a7\u5236\u7c92\u5ea6&#xff0c;\u5c24\u5176\u9002\u5408\u591a\u5b9e\u4f8b\u9694\u79bb\u90e8\u7f72\u3001\u5b9a\u5236\u5316\u8def\u5f84\u89c4\u5212\u7b49\u9ad8\u7ea7\u573a\u666f\u3002 <\/p>\n<p> \u6211\u4eec\u5c06\u6309\u7167\u201c\u89e3\u538b \u2192 \u914d\u7f6e \u2192 \u6ce8\u518c \u2192 \u9632\u706b\u5899\u653e\u884c\u201d\u7684\u903b\u8f91\u94fe\u6761\u9010\u6b65\u63a8\u8fdb&#xff0c;\u6df1\u5165\u5256\u6790\u6bcf\u4e2a\u6b65\u9aa4\u80cc\u540e\u7684\u6280\u672f\u539f\u7406\u4e0e\u5e38\u89c1\u9677\u9631\u3002\u91cd\u70b9\u89e3\u51b3\u6743\u9650\u95ee\u9898\u3001\u7aef\u53e3\u51b2\u7a81\u3001\u670d\u52a1\u6ce8\u518c\u5931\u8d25\u7b49\u9ad8\u9891\u6545\u969c\u70b9&#xff0c;\u5e76\u7ed3\u5408\u5b9e\u9645\u547d\u4ee4\u884c\u64cd\u4f5c\u3001\u914d\u7f6e\u6587\u4ef6\u4fee\u6539\u4e0e\u7cfb\u7edf\u7b56\u7565\u8c03\u6574&#xff0c;\u6784\u5efa\u4e00\u5957\u53ef\u590d\u7528\u3001\u53ef\u5ba1\u8ba1\u3001\u53ef\u7ef4\u62a4\u7684\u6807\u51c6\u5316\u90e8\u7f72\u6d41\u7a0b\u3002\u6574\u4e2a\u8fc7\u7a0b\u4e2d&#xff0c;\u4e0d\u4ec5\u5173\u6ce8\u201c\u600e\u4e48\u505a\u201d&#xff0c;\u66f4\u5f3a\u8c03\u201c\u4e3a\u4ec0\u4e48\u8fd9\u4e48\u505a\u201d&#xff0c;\u5e2e\u52a9\u8bfb\u8005\u5efa\u7acb\u5bf9Apache\u8fd0\u884c\u673a\u5236\u548c\u670d\u52a1\u751f\u547d\u5468\u671f\u7684\u6df1\u523b\u7406\u89e3\u3002 <\/p>\n<h3> 3.1 \u624b\u52a8\u89e3\u538b\u4e0e\u521d\u59cb\u73af\u5883\u642d\u5efa <\/h3>\n<p> Apache\u5b98\u65b9\u53d1\u5e03\u7684Windows\u7248\u672c\u901a\u5e38\u4ee5  .zip  \u683c\u5f0f\u6253\u5305&#xff0c;\u4e0d\u5305\u542b\u5b89\u88c5\u7a0b\u5e8f&#xff0c;\u5c5e\u4e8e\u201c\u4fbf\u643a\u5f0f\u201d\u90e8\u7f72\u65b9\u5f0f\u3002\u8fd9\u610f\u5473\u7740\u6240\u6709\u7ec4\u4ef6\u5747\u4ee5\u6587\u4ef6\u5f62\u5f0f\u5b58\u5728&#xff0c;\u65e0\u9700\u8fd0\u884csetup.exe\u5373\u53ef\u4f7f\u7528&#xff0c;\u4f46\u540c\u65f6\u4e5f\u8981\u6c42\u7ba1\u7406\u5458\u81ea\u884c\u5b8c\u6210\u76ee\u5f55\u7ed3\u6784\u521d\u59cb\u5316\u3001\u73af\u5883\u53d8\u91cf\u8bbe\u7f6e\u53ca\u670d\u52a1\u6ce8\u518c\u7b49\u5de5\u4f5c\u3002\u8fd9\u79cd\u8bbe\u8ba1\u4fdd\u7559\u4e86\u6700\u5927\u7a0b\u5ea6\u7684\u7075\u6d3b\u6027&#xff0c;\u9002\u7528\u4e8e\u9700\u8981\u7cbe\u7ec6\u63a7\u5236\u90e8\u7f72\u7ec6\u8282\u7684\u4f01\u4e1a\u7ea7\u5e94\u7528\u573a\u666f\u3002 <\/p>\n<h4> 3.1.1 \u5c06\u538b\u7f29\u5305\u89e3\u538b\u81f3\u76ee\u6807\u76ee\u5f55\u5e76\u6821\u9a8c\u6587\u4ef6\u5b8c\u6574\u6027 <\/h4>\n<p> \u9996\u5148\u5e94\u4ece  Apache\u5b98\u7f51  \u6216\u5176\u955c\u50cf\u7ad9\u70b9\u4e0b\u8f7d\u9002\u7528\u4e8eWindows\u7684Apache 2.4.29\u7248\u672c&#xff08;\u63a8\u8350\u9009\u62e9\u7531Apache Lounge\u63d0\u4f9b\u7684VC15\u7f16\u8bd1\u7248\u672c&#xff09;\u3002\u4e0b\u8f7d\u5b8c\u6210\u540e&#xff0c;\u5efa\u8bae\u4f7f\u7528\u652f\u6301\u6821\u9a8c\u529f\u80fd\u7684\u89e3\u538b\u5de5\u5177&#xff08;\u59827-Zip&#xff09;\u8fdb\u884c\u89e3\u538b\u524d\u9a8c\u8bc1\u3002 <\/p>\n<p># \u4f7f\u7528sha256sum\u6821\u9a8c\u6587\u4ef6\u5b8c\u6574\u6027&#xff08;\u9700\u5b89\u88c5Git Bash\u6216WSL&#xff09;<br \/>\nsha256sum httpd-2.4.29-win64-VS15.zip<\/p>\n<p> \u5bf9\u6bd4\u8f93\u51fa\u54c8\u5e0c\u503c\u4e0e\u5b98\u65b9\u53d1\u5e03\u9875\u9762\u516c\u5e03\u7684SHA256\u503c\u662f\u5426\u4e00\u81f4&#xff0c;\u786e\u4fdd\u672a\u88ab\u7be1\u6539\u6216\u4e0b\u8f7d\u4e0d\u5b8c\u6574\u3002\u968f\u540e\u9009\u62e9\u4e00\u4e2a\u5408\u9002\u7684\u8def\u5f84\u8fdb\u884c\u89e3\u538b&#xff0c;\u4f8b\u5982&#xff1a; <\/p>\n<p>C:\\\\Apache24<\/p>\n<p> \u8be5\u8def\u5f84\u5c06\u6210\u4e3aApache\u7684  ServerRoot  &#xff0c;\u5373\u4e3b\u5b89\u88c5\u76ee\u5f55\u3002\u89e3\u538b\u540e\u5e94\u770b\u5230\u5982\u4e0b\u6838\u5fc3\u5b50\u76ee\u5f55&#xff1a; <\/p>\n<table>\n<tr> \u76ee\u5f55\u540d  \u4f5c\u7528\u8bf4\u660e <\/tr>\n<tbody>\n<tr>\n<td>  bin\/  <\/td>\n<td> \u5b58\u653e\u53ef\u6267\u884c\u6587\u4ef6&#xff08;httpd.exe\u3001ab.exe\u7b49&#xff09; <\/td>\n<\/tr>\n<tr>\n<td>  conf\/  <\/td>\n<td> \u4e3b\u8981\u914d\u7f6e\u6587\u4ef6\u5b58\u653e\u5730&#xff08;httpd.conf\u4e3a\u6838\u5fc3&#xff09; <\/td>\n<\/tr>\n<tr>\n<td>  htdocs\/  <\/td>\n<td> \u9ed8\u8ba4\u7f51\u7ad9\u6839\u76ee\u5f55&#xff0c;\u5b58\u653eHTML\u9875\u9762 <\/td>\n<\/tr>\n<tr>\n<td>  logs\/  <\/td>\n<td> \u65e5\u5fd7\u8f93\u51fa\u76ee\u5f55&#xff08;\u9519\u8bef\u65e5\u5fd7\u3001\u8bbf\u95ee\u65e5\u5fd7&#xff09; <\/td>\n<\/tr>\n<tr>\n<td>  modules\/  <\/td>\n<td> \u52a8\u6001\u52a0\u8f7d\u6a21\u5757&#xff08;.so\u6587\u4ef6&#xff09;&#xff0c;\u652f\u6301\u6269\u5c55\u529f\u80fd <\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>  \u6ce8\u610f  &#xff1a;\u52a1\u5fc5\u907f\u514d\u5c06Apache\u89e3\u538b\u5230\u542b\u6709\u4e2d\u6587\u5b57\u7b26\u6216\u7a7a\u683c\u7684\u8def\u5f84\u4e2d&#xff08;\u5982\u201cC:\\\\Program Files\\\\Apache\u201d&#xff09;&#xff0c;\u5426\u5219\u53ef\u80fd\u5bfc\u81f4  httpd.exe  \u542f\u52a8\u65f6\u62a5\u9519\u201cCannot load modules\/mod_so.so\u201d\u3002 <\/p>\n<h5> \u6587\u4ef6\u5b8c\u6574\u6027\u9a8c\u8bc1\u6d41\u7a0b\u56fe&#xff08;Mermaid&#xff09; <\/h5>\n<p>graph TD<br \/>\n    A[\u4e0b\u8f7d Apache \u538b\u7f29\u5305] &#8211;&gt; B{\u68c0\u67e5\u6765\u6e90\u53ef\u4fe1\u6027}<br \/>\n    B &#8211;&gt;|\u662f| C[\u83b7\u53d6\u5b98\u65b9 SHA256 \u6821\u9a8c\u7801]<br \/>\n    B &#8211;&gt;|\u5426| D[\u7ec8\u6b62\u5b89\u88c5]<br \/>\n    C &#8211;&gt; E[\u4f7f\u7528 sha256sum \u6216 PowerShell \u8ba1\u7b97\u672c\u5730\u54c8\u5e0c]<br \/>\n    E &#8211;&gt; F{\u54c8\u5e0c\u503c\u5339\u914d?}<br \/>\n    F &#8211;&gt;|\u662f| G[\u5b89\u5168\u89e3\u538b\u81f3\u76ee\u6807\u76ee\u5f55]<br \/>\n    F &#8211;&gt;|\u5426| H[\u91cd\u65b0\u4e0b\u8f7d]<br \/>\n    G &#8211;&gt; I[\u8fdb\u5165\u4e0b\u4e00\u6b65\u914d\u7f6e]<\/p>\n<p> \u6b64\u6d41\u7a0b\u56fe\u6e05\u6670\u5c55\u793a\u4e86\u4ece\u4e0b\u8f7d\u5230\u89e3\u538b\u524d\u7684\u5b89\u5168\u9a8c\u8bc1\u8def\u5f84&#xff0c;\u5f3a\u8c03\u4e86\u6570\u636e\u5b8c\u6574\u6027\u7684\u5173\u952e\u63a7\u5236\u8282\u70b9\u3002 <\/p>\n<h4> 3.1.2 \u8bbe\u7f6e\u73af\u5883\u53d8\u91cfPATH\u4ee5\u652f\u6301\u5168\u5c40\u8c03\u7528httpd\u547d\u4ee4 <\/h4>\n<p> \u4e3a\u4e86\u80fd\u591f\u5728\u4efb\u610f\u76ee\u5f55\u4e0b\u901a\u8fc7\u547d\u4ee4\u884c\u76f4\u63a5\u8c03\u7528  httpd.exe  &#xff0c;\u5efa\u8bae\u5c06Apache\u7684  bin  \u76ee\u5f55\u6dfb\u52a0\u5230\u7cfb\u7edf\u7684  PATH  \u73af\u5883\u53d8\u91cf\u4e2d\u3002 <\/p>\n<h5> \u64cd\u4f5c\u6b65\u9aa4\u5982\u4e0b&#xff1a; <\/h5>\n<li> \u53f3\u952e\u201c\u6b64\u7535\u8111\u201d \u2192 \u201c\u5c5e\u6027\u201d \u2192 \u201c\u9ad8\u7ea7\u7cfb\u7edf\u8bbe\u7f6e\u201d <\/li>\n<li> \u70b9\u51fb\u201c\u73af\u5883\u53d8\u91cf\u201d\u6309\u94ae <\/li>\n<li> \u5728\u201c\u7cfb\u7edf\u53d8\u91cf\u201d\u533a\u57df\u627e\u5230  Path  &#xff0c;\u70b9\u51fb\u201c\u7f16\u8f91\u201d <\/li>\n<li> \u65b0\u589e\u4e00\u6761\u8bb0\u5f55&#xff1a;  C:\\\\Apache24\\\\bin  <\/li>\n<li> \u4fdd\u5b58\u5e76\u5173\u95ed\u6240\u6709\u7a97\u53e3 <\/li>\n<p> \u9a8c\u8bc1\u662f\u5426\u751f\u6548&#xff1a; <\/p>\n<p>httpd -v<\/p>\n<p> \u9884\u671f\u8f93\u51fa&#xff1a; <\/p>\n<p>Server version: Apache\/2.4.29 (Win64)<br \/>\nServer built:   &#8230;<\/p>\n<p> \u82e5\u63d0\u793a\u201c\u2019httpd\u2019 \u4e0d\u662f\u5185\u90e8\u6216\u5916\u90e8\u547d\u4ee4\u201d&#xff0c;\u8bf7\u68c0\u67e5\u8def\u5f84\u62fc\u5199\u3001\u91cd\u542f\u7ec8\u7aef\u6216\u91cd\u65b0\u767b\u5f55\u7cfb\u7edf\u4ee5\u5237\u65b0\u73af\u5883\u53d8\u91cf\u3002 <\/p>\n<h5> \u53c2\u6570\u8bf4\u660e&#xff1a; <\/h5>\n<ul>\n<li>  -v  &#xff1a;\u663e\u793aApache\u7248\u672c\u4fe1\u606f <\/li>\n<li> \u82e5\u672a\u8bbe\u7f6ePATH&#xff0c;\u5219\u5fc5\u987b\u8fdb\u5165  C:\\\\Apache24\\\\bin  \u76ee\u5f55\u624d\u80fd\u6267\u884c  httpd.exe  <\/li>\n<\/ul>\n<p> \u6b64\u4e3e\u6781\u5927\u63d0\u5347\u4e86\u540e\u7eed\u8c03\u8bd5\u6548\u7387&#xff0c;\u5c24\u5176\u662f\u5728\u9891\u7e41\u542f\u505c\u670d\u52a1\u3001\u68c0\u67e5\u914d\u7f6e\u8bed\u6cd5\u65f6\u5c24\u4e3a\u5fc5\u8981\u3002 <\/p>\n<h4> 3.1.3 \u521d\u59cb\u914d\u7f6e\u524d\u7684\u5907\u4efd\u7b56\u7565&#xff08;conf\u76ee\u5f55\u526f\u672c\u521b\u5efa&#xff09; <\/h4>\n<p> \u5728\u9996\u6b21\u4fee\u6539\u4efb\u4f55\u914d\u7f6e\u6587\u4ef6\u4e4b\u524d&#xff0c;\u5f3a\u70c8\u5efa\u8bae\u5bf9  conf  \u76ee\u5f55\u8fdb\u884c\u5b8c\u6574\u5907\u4efd\u3002\u8fd9\u4e0d\u4ec5\u80fd\u9632\u6b62\u8bef\u64cd\u4f5c\u5bfc\u81f4\u670d\u52a1\u65e0\u6cd5\u542f\u52a8&#xff0c;\u4e5f\u4e3a\u540e\u671f\u56de\u6eda\u63d0\u4f9b\u4e86\u57fa\u7840\u4fdd\u969c\u3002 <\/p>\n<p> \u63a8\u8350\u505a\u6cd5&#xff1a; <\/p>\n<p># \u4f7f\u7528PowerShell\u521b\u5efa\u65f6\u95f4\u6233\u547d\u540d\u7684\u5907\u4efd<br \/>\n$timestamp &#061; Get-Date -Format &#034;yyyyMMdd_HHmmss&#034;<br \/>\nCopy-Item -Recurse -Path &#034;C:\\\\Apache24\\\\conf&#034; -Destination &#034;C:\\\\Apache24\\\\conf_backup_$timestamp&#034;<\/p>\n<p> \u6216\u8005\u624b\u52a8\u590d\u5236  conf  \u6587\u4ef6\u5939\u4e3a  conf_original  \u3002 <\/p>\n<h5> \u5907\u4efd\u5185\u5bb9\u5305\u62ec\u4f46\u4e0d\u9650\u4e8e&#xff1a; <\/h5>\n<table>\n<tr> \u6587\u4ef6\u540d  \u7528\u9014\u8bf4\u660e <\/tr>\n<tbody>\n<tr>\n<td>  httpd.conf  <\/td>\n<td> \u4e3b\u914d\u7f6e\u6587\u4ef6&#xff0c;\u63a7\u5236\u6574\u4f53\u884c\u4e3a <\/td>\n<\/tr>\n<tr>\n<td>  magic  <\/td>\n<td> MIME\u7c7b\u578b\u8bc6\u522b\u89c4\u5219 <\/td>\n<\/tr>\n<tr>\n<td>  mime.types  <\/td>\n<td> \u6587\u4ef6\u6269\u5c55\u540d\u4e0eMIME\u7c7b\u578b\u7684\u6620\u5c04\u8868 <\/td>\n<\/tr>\n<tr>\n<td>  extra\/*.conf  <\/td>\n<td> \u53ef\u9009\u6a21\u5757\u5316\u914d\u7f6e\u7247\u6bb5&#xff08;\u5982\u865a\u62df\u4e3b\u673a&#xff09; <\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p> \u4e00\u65e6\u540e\u7eed\u4fee\u6539\u5f15\u53d1\u542f\u52a8\u5931\u8d25&#xff0c;\u53ef\u901a\u8fc7\u6062\u590d\u6b64\u5907\u4efd\u5feb\u901f\u8fd8\u539f\u81f3\u521d\u59cb\u72b6\u6001&#xff0c;\u907f\u514d\u9677\u5165\u6392\u67e5\u56f0\u5883\u3002 <\/p>\n<h3> 3.2 \u4e3b\u914d\u7f6e\u6587\u4ef6httpd.conf\u57fa\u7840\u4fee\u6539 <\/h3>\n<p> Apache\u7684\u6838\u5fc3\u884c\u4e3a\u7531  conf\/httpd.conf  \u6587\u4ef6\u5b9a\u4e49\u3002\u8be5\u6587\u4ef6\u91c7\u7528\u6307\u4ee4&#043;\u53c2\u6570\u7684\u5f62\u5f0f\u7ec4\u7ec7&#xff0c;\u6bcf\u4e00\u884c\u4ee3\u8868\u4e00\u4e2a\u914d\u7f6e\u9879&#xff0c;\u6ce8\u91ca\u4ee5  #  \u5f00\u5934\u3002\u6b63\u786e\u4fee\u6539\u5173\u952e\u53c2\u6570\u662f\u786e\u4fddApache\u6b63\u5e38\u542f\u52a8\u7684\u524d\u63d0\u6761\u4ef6\u3002 <\/p>\n<h4> 3.2.1 ServerRoot\u6307\u4ee4\u5b9a\u4f4d\u5b89\u88c5\u6839\u76ee\u5f55 <\/h4>\n<p>  ServerRoot  \u7528\u4e8e\u6307\u5b9aApache\u7684\u5b89\u88c5\u6839\u76ee\u5f55&#xff0c;\u6240\u6709\u76f8\u5bf9\u8def\u5f84\u90fd\u5c06\u57fa\u4e8e\u6b64\u76ee\u5f55\u8ba1\u7b97\u3002 <\/p>\n<p> \u539f\u59cb\u914d\u7f6e&#xff08;\u9ed8\u8ba4&#xff09;&#xff1a; <\/p>\n<p># ServerRoot: The top of the directory tree under which the server&#039;s<br \/>\n# configuration, error, and log files are kept.<br \/>\n#<br \/>\n# Do not add a slash at the end of the directory path.  If you point<br \/>\n# ServerRoot at a non-local disk, be sure to use a fully qualified<br \/>\n# domain name for ServerName.<br \/>\n#<br \/>\nServerRoot &#034;c:\/Apache24&#034;<\/p>\n<p> \u2705 \u6b63\u786e\u5199\u6cd5&#xff1a;\u4f7f\u7528\u6b63\u659c\u6760  \/  \u5206\u9694\u8def\u5f84&#xff0c;\u5373\u4f7f\u5728Windows\u7cfb\u7edf\u4e2d\u4e5f\u662f\u5982\u6b64\u3002Apache\u5185\u90e8\u7edf\u4e00\u5904\u7406\u4e3aPOSIX\u98ce\u683c\u8def\u5f84\u3002 <\/p>\n<p> \u5982\u679c\u5b9e\u9645\u89e3\u538b\u8def\u5f84\u4e3a  D:\\\\webserver\\\\Apache24  &#xff0c;\u5219\u9700\u4fee\u6539\u4e3a&#xff1a; <\/p>\n<p>ServerRoot &#034;D:\/webserver\/Apache24&#034;<\/p>\n<h5> \u4ee3\u7801\u903b\u8f91\u5206\u6790&#xff1a; <\/h5>\n<ul>\n<li>  &#034;c:\/Apache24&#034;  \u662f\u5b57\u7b26\u4e32\u7c7b\u578b\u7684\u8def\u5f84\u53c2\u6570 <\/li>\n<li> \u8def\u5f84\u672b\u5c3e\u4e0d\u80fd\u52a0\u659c\u6760  \/  &#xff0c;\u5426\u5219\u53ef\u80fd\u5f15\u53d1\u89e3\u6790\u9519\u8bef <\/li>\n<li> \u4fee\u6539\u540e\u5f71\u54cd  conf  ,  logs  ,  modules  \u7b49\u5b50\u76ee\u5f55\u7684\u67e5\u627e\u4f4d\u7f6e <\/li>\n<\/ul>\n<p> \u82e5\u672a\u6b63\u786e\u8bbe\u7f6e&#xff0c;\u542f\u52a8\u65f6\u4f1a\u62a5\u9519&#xff1a; <\/p>\n<p>AH00014: Configuration check failed: Could not open configuration file conf\/httpd.conf: The system cannot find the path specified.<\/p>\n<h4> 3.2.2 Listen\u6307\u4ee4\u8bbe\u7f6e\u76d1\u542c\u7aef\u53e3&#xff08;\u9ed8\u8ba480\u6216\u89c4\u907f\u51b2\u7a81\u6539\u75288080&#xff09; <\/h4>\n<p>  Listen  \u6307\u4ee4\u51b3\u5b9aApache\u76d1\u542c\u54ea\u4e2aIP\u5730\u5740\u548c\u7aef\u53e3\u53f7\u3002 <\/p>\n<p> \u9ed8\u8ba4\u914d\u7f6e&#xff1a; <\/p>\n<p>Listen 80<\/p>\n<p> \u8868\u793a\u76d1\u542c\u6240\u6709\u7f51\u7edc\u63a5\u53e3\u768480\u7aef\u53e3\u3002\u4f46\u5728\u5f00\u53d1\u73af\u5883\u4e2d&#xff0c;IIS\u3001Nginx\u6216\u5176\u4ed6\u670d\u52a1\u5e38\u5360\u752880\u7aef\u53e3&#xff0c;\u5bfc\u81f4\u51b2\u7a81\u3002 <\/p>\n<p> \u89e3\u51b3\u65b9\u6848&#xff1a;\u6539\u4e3a\u76d1\u542c8080\u7aef\u53e3&#xff1a; <\/p>\n<p>Listen 8080<\/p>\n<p> \u4e5f\u53ef\u7ed1\u5b9a\u7279\u5b9aIP&#xff1a; <\/p>\n<p>Listen 127.0.0.1:8080<\/p>\n<h5> \u8868\u683c&#xff1a;\u5e38\u7528\u7aef\u53e3\u53ca\u5176\u5178\u578b\u5360\u7528\u7a0b\u5e8f <\/h5>\n<table>\n<tr> \u7aef\u53e3  \u5360\u7528\u7a0b\u5e8f  \u662f\u5426\u5efa\u8bae\u66f4\u6539 <\/tr>\n<tbody>\n<tr>\n<td> 80 <\/td>\n<td> IIS\u3001Skype\u3001SQL Server Reporting Services <\/td>\n<td> \u662f&#xff08;\u5f00\u53d1\u73af\u5883&#xff09; <\/td>\n<\/tr>\n<tr>\n<td> 443 <\/td>\n<td> IIS\u3001Oracle XE <\/td>\n<td> \u662f <\/td>\n<\/tr>\n<tr>\n<td> 8080 <\/td>\n<td> Tomcat\u3001Jenkins <\/td>\n<td> \u89c6\u60c5\u51b5\u800c\u5b9a <\/td>\n<\/tr>\n<tr>\n<td> 8009 <\/td>\n<td> Apache JServ Protocol (AJP) <\/td>\n<td> \u5426 <\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p> \u53ef\u901a\u8fc7\u4ee5\u4e0b\u547d\u4ee4\u68c0\u6d4b\u7aef\u53e3\u5360\u7528\u60c5\u51b5&#xff1a; <\/p>\n<p>netstat -ano | findstr :80<\/p>\n<p> \u8fd4\u56de\u7ed3\u679c\u793a\u4f8b&#xff1a; <\/p>\n<p>TCP    0.0.0.0:80           0.0.0.0:0              LISTENING       4<\/p>\n<p> PID\u4e3a4\u7684\u670d\u52a1\u901a\u5e38\u662fSystem\u8fdb\u7a0b&#xff08;\u5373HTTP.sys\u9a71\u52a8&#xff09;&#xff0c;\u610f\u5473\u7740\u5df2\u88ab\u7cfb\u7edf\u7ea7\u670d\u52a1\u5360\u7528\u3002 <\/p>\n<h4> 3.2.3 ServerName\u53c2\u6570\u5b9a\u4e49\u4e3b\u673a\u540d&#xff08;localhost:80&#xff09;\u907f\u514d\u542f\u52a8\u8b66\u544a <\/h4>\n<p> Apache\u542f\u52a8\u65f6\u82e5\u672a\u660e\u786e\u6307\u5b9a  ServerName  &#xff0c;\u4f1a\u53d1\u51fa\u5982\u4e0b\u8b66\u544a&#xff1a; <\/p>\n<p>AH00558: httpd.exe: Could not reliably determine the server&#039;s fully qualified domain name, using fe80::&#8230; Modify config!<\/p>\n<p> \u89e3\u51b3\u65b9\u6cd5\u662f\u5728  httpd.conf  \u4e2d\u53d6\u6d88\u6ce8\u91ca\u5e76\u8bbe\u7f6e&#xff1a; <\/p>\n<p>ServerName localhost:80<\/p>\n<p> \u6216\u6839\u636e\u5b9e\u9645\u7aef\u53e3\u8c03\u6574&#xff1a; <\/p>\n<p>ServerName localhost:8080<\/p>\n<h5> \u53c2\u6570\u8bf4\u660e&#xff1a; <\/h5>\n<ul>\n<li>  localhost  &#xff1a;\u4e3b\u673a\u540d&#xff0c;\u5bf9\u5e94DNS\u89e3\u6790\u6216hosts\u6587\u4ef6 <\/li>\n<li>  8080  &#xff1a;\u5fc5\u987b\u4e0e  Listen  \u6307\u4ee4\u4e00\u81f4 <\/li>\n<li> \u82e5\u542f\u7528SSL&#xff0c;\u5219\u8fd8\u9700\u8bbe\u7f6e  ServerName:443  <\/li>\n<\/ul>\n<p> \u6b64\u8bbe\u7f6e\u4e0d\u5f71\u54cd\u5916\u90e8\u8bbf\u95ee&#xff0c;\u4ec5\u7528\u4e8e\u5185\u90e8\u6807\u8bc6\u670d\u52a1\u5668\u8eab\u4efd&#xff0c;\u6d88\u9664\u542f\u52a8\u8b66\u544a\u3002 <\/p>\n<h3> 3.3 \u5c06Apache\u6ce8\u518c\u4e3aWindows\u7cfb\u7edf\u670d\u52a1 <\/h3>\n<p> \u4e3a\u4e86\u8ba9Apache\u968f\u7cfb\u7edf\u542f\u52a8\u81ea\u52a8\u8fd0\u884c&#xff0c;\u5e76\u80fd\u901a\u8fc7\u670d\u52a1\u7ba1\u7406\u5668\u7edf\u4e00\u63a7\u5236&#xff0c;\u5fc5\u987b\u5c06\u5176\u6ce8\u518c\u4e3aWindows\u670d\u52a1\u3002 <\/p>\n<h4> 3.3.1 \u4f7f\u7528httpd.exe -k install\u547d\u4ee4\u5b8c\u6210\u670d\u52a1\u6ce8\u518c <\/h4>\n<p> \u6253\u5f00  \u7ba1\u7406\u5458\u6743\u9650\u7684\u547d\u4ee4\u63d0\u793a\u7b26  &#xff0c;\u6267\u884c&#xff1a; <\/p>\n<p>httpd.exe -k install<\/p>\n<p> \u6210\u529f\u540e\u8f93\u51fa&#xff1a; <\/p>\n<p>The Apache2.4 service was successfully installed.<\/p>\n<p> \u6b64\u65f6\u53ef\u5728\u201c\u670d\u52a1\u201d\u7ba1\u7406\u5668\u4e2d\u770b\u5230\u540d\u4e3a  Apache2.4  \u7684\u670d\u52a1\u3002 <\/p>\n<h5> \u547d\u4ee4\u53c2\u6570\u8be6\u89e3&#xff1a; <\/h5>\n<table>\n<tr> \u53c2\u6570  \u542b\u4e49 <\/tr>\n<tbody>\n<tr>\n<td>  -k install  <\/td>\n<td> \u5b89\u88c5\u4e3aWindows\u670d\u52a1 <\/td>\n<\/tr>\n<tr>\n<td>  -k uninstall  <\/td>\n<td> \u5378\u8f7d\u5df2\u6ce8\u518c\u7684\u670d\u52a1 <\/td>\n<\/tr>\n<tr>\n<td>  -k start  <\/td>\n<td> \u542f\u52a8\u670d\u52a1&#xff08;\u524d\u63d0\u662f\u5df2\u5b89\u88c5&#xff09; <\/td>\n<\/tr>\n<tr>\n<td>  -k stop  <\/td>\n<td> \u505c\u6b62\u670d\u52a1 <\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p> \u26a0\ufe0f \u5fc5\u987b\u4ee5\u7ba1\u7406\u5458\u8eab\u4efd\u8fd0\u884cCMD&#xff0c;\u5426\u5219\u4f1a\u62a5\u9519&#xff1a;\u201cPermission denied\u201d \u6216 \u201cOS 5 Access is denied.\u201d <\/p>\n<h4> 3.3.2 \u81ea\u5b9a\u4e49\u670d\u52a1\u540d\u79f0\u4e0e\u63cf\u8ff0\u589e\u5f3a\u53ef\u7ba1\u7406\u6027 <\/h4>\n<p> \u9ed8\u8ba4\u670d\u52a1\u540d\u4e3a  Apache2.4  &#xff0c;\u5f53\u90e8\u7f72\u591a\u4e2aApache\u5b9e\u4f8b\u65f6\u6613\u6df7\u6dc6\u3002\u53ef\u901a\u8fc7\u4ee5\u4e0b\u65b9\u5f0f\u81ea\u5b9a\u4e49&#xff1a; <\/p>\n<p>httpd.exe -k install -n &#034;MyWebServer&#034;<\/p>\n<p> \u5176\u4e2d  -n &#034;MyWebServer&#034;  \u6307\u5b9a\u670d\u52a1\u540d\u79f0\u3002 <\/p>\n<p> \u8fdb\u4e00\u6b65\u6dfb\u52a0\u63cf\u8ff0&#xff1a; <\/p>\n<p>sc description &#034;MyWebServer&#034; &#034;Custom Apache Instance for Project X&#034;<\/p>\n<h5> \u67e5\u770b\u670d\u52a1\u5217\u8868\u9a8c\u8bc1&#xff1a; <\/h5>\n<p>sc queryex type&#061; service state&#061; all | findstr MyWebServer<\/p>\n<p> \u8f93\u51fa\u793a\u4f8b&#xff1a; <\/p>\n<p>SERVICE_NAME: MyWebServer<br \/>\n        TYPE               : 10  WIN32_OWN_PROCESS<br \/>\n        STATE              : 4  RUNNING<br \/>\n        DESCRIPTION        : Custom Apache Instance for Project X<\/p>\n<h5> Mermaid\u6d41\u7a0b\u56fe&#xff1a;\u670d\u52a1\u6ce8\u518c\u4e0e\u7ba1\u7406\u6d41\u7a0b <\/h5>\n<p>graph LR<br \/>\n    A[\u4ee5\u7ba1\u7406\u5458\u8eab\u4efd\u6253\u5f00CMD] &#8211;&gt; B[\u6267\u884c httpd -k install -n &#034;SvcName&#034;]<br \/>\n    B &#8211;&gt; C{\u6ce8\u518c\u6210\u529f?}<br \/>\n    C &#8211;&gt;|\u662f| D[\u4f7f\u7528 services.msc \u67e5\u770b\u670d\u52a1]<br \/>\n    C &#8211;&gt;|\u5426| E[\u68c0\u67e5\u6743\u9650\u3001\u8def\u5f84\u3001\u7aef\u53e3\u5360\u7528]<br \/>\n    D &#8211;&gt; F[\u542f\u52a8\u670d\u52a1: net start SvcName]<br \/>\n    F &#8211;&gt; G[\u8bbe\u7f6e\u5f00\u673a\u81ea\u542f: sc config SvcName start&#061; auto]<\/p>\n<p> \u8be5\u56fe\u76f4\u89c2\u5c55\u793a\u4e86\u4ece\u6ce8\u518c\u5230\u542f\u7528\u7684\u5168\u6d41\u7a0b&#xff0c;\u7a81\u51fa\u6743\u9650\u4e0e\u547d\u540d\u7684\u91cd\u8981\u6027\u3002 <\/p>\n<h4> 3.3.3 \u6ce8\u518c\u5931\u8d25\u5e38\u89c1\u539f\u56e0\u6392\u67e5&#xff08;\u6743\u9650\u4e0d\u8db3\u3001\u8def\u5f84\u9519\u8bef&#xff09; <\/h4>\n<p> \u6ce8\u518c\u5931\u8d25\u662f\u6700\u5e38\u89c1\u7684\u90e8\u7f72\u969c\u788d\u4e4b\u4e00&#xff0c;\u4e3b\u8981\u539f\u56e0\u5305\u62ec&#xff1a; <\/p>\n<table>\n<tr> \u6545\u969c\u73b0\u8c61  \u53ef\u80fd\u539f\u56e0  \u89e3\u51b3\u65b9\u6848 <\/tr>\n<tbody>\n<tr>\n<td>  OS 5 Access is denied.  <\/td>\n<td> \u672a\u4ee5\u7ba1\u7406\u5458\u8eab\u4efd\u8fd0\u884c <\/td>\n<td> \u53f3\u952eCMD \u2192 \u201c\u4ee5\u7ba1\u7406\u5458\u8eab\u4efd\u8fd0\u884c\u201d <\/td>\n<\/tr>\n<tr>\n<td>  Invalid command &#039;LoadModule&#039;  <\/td>\n<td> conf\/httpd.conf \u8def\u5f84\u9519\u8bef <\/td>\n<td> \u68c0\u67e5 ServerRoot \u8bbe\u7f6e <\/td>\n<\/tr>\n<tr>\n<td>  The requested operation depends on ES data being available  <\/td>\n<td> Windows Event Log \u670d\u52a1\u5f02\u5e38 <\/td>\n<td> \u91cd\u542f Event Log \u670d\u52a1 <\/td>\n<\/tr>\n<tr>\n<td>  Service already exists  <\/td>\n<td> \u540c\u540d\u670d\u52a1\u5df2\u5b58\u5728 <\/td>\n<td> \u5148\u5378\u8f7d\u518d\u91cd\u88c5&#xff1a;  httpd -k uninstall -n &#034;SvcName&#034;  <\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p> \u7279\u522b\u6ce8\u610f&#xff1a;\u82e5\u66fe\u5c1d\u8bd5\u5b89\u88c5\u4f46\u5931\u8d25&#xff0c;\u6b8b\u7559\u670d\u52a1\u53ef\u80fd\u4ecd\u5728\u7cfb\u7edf\u4e2d\u3002\u53ef\u7528\u4ee5\u4e0b\u547d\u4ee4\u6e05\u7406&#xff1a; <\/p>\n<p>sc delete Apache2.4<\/p>\n<p> \u7136\u540e\u91cd\u65b0\u5b89\u88c5\u3002 <\/p>\n<h3> 3.4 \u9632\u706b\u5899\u89c4\u5219\u914d\u7f6e\u786e\u4fdd\u5916\u90e8\u8bbf\u95ee\u53ef\u8fbe <\/h3>\n<p> \u5373\u4f7fApache\u6210\u529f\u542f\u52a8&#xff0c;\u82e5Windows\u9632\u706b\u5899\u963b\u6b62\u76f8\u5e94\u7aef\u53e3&#xff0c;\u5916\u90e8\u5ba2\u6237\u7aef\u4ecd\u65e0\u6cd5\u8bbf\u95ee\u3002 <\/p>\n<h4> 3.4.1 \u6dfb\u52a0\u5165\u7ad9\u89c4\u5219\u5f00\u653eHTTP\u7aef\u53e3&#xff08;TCP 80\/8080&#xff09; <\/h4>\n<h5> \u56fe\u5f62\u5316\u64cd\u4f5c\u6b65\u9aa4&#xff1a; <\/h5>\n<li> \u6253\u5f00\u201c\u63a7\u5236\u9762\u677f\u201d \u2192 \u201cWindows Defender \u9632\u706b\u5899\u201d \u2192 \u201c\u9ad8\u7ea7\u8bbe\u7f6e\u201d <\/li>\n<li> \u5de6\u4fa7\u9009\u62e9\u201c\u5165\u7ad9\u89c4\u5219\u201d&#xff0c;\u53f3\u4fa7\u70b9\u51fb\u201c\u65b0\u5efa\u89c4\u5219\u201d <\/li>\n<li> \u89c4\u5219\u7c7b\u578b\u9009\u62e9\u201c\u7aef\u53e3\u201d \u2192 \u4e0b\u4e00\u6b65 <\/li>\n<li> \u534f\u8bae\u7c7b\u578b&#xff1a;TCP&#xff1b;\u7279\u5b9a\u672c\u5730\u7aef\u53e3&#xff1a;  80,8080  \u2192 \u4e0b\u4e00\u6b65 <\/li>\n<li> \u64cd\u4f5c&#xff1a;\u5141\u8bb8\u8fde\u63a5 \u2192 \u4e0b\u4e00\u6b65 <\/li>\n<li> \u914d\u7f6e\u6587\u4ef6&#xff1a;\u52fe\u9009\u201c\u57df\u201d\u3001\u201c\u4e13\u7528\u201d\u3001\u201c\u516c\u7528\u201d \u2192 \u4e0b\u4e00\u6b65 <\/li>\n<li> \u540d\u79f0&#xff1a;  Apache HTTP Port 80\/8080  \u2192 \u5b8c\u6210 <\/li>\n<h5> \u547d\u4ee4\u884c\u65b9\u5f0f&#xff08;\u63a8\u8350\u811a\u672c\u5316&#xff09;&#xff1a; <\/h5>\n<p>netsh advfirewall firewall add rule name&#061;&#034;Apache HTTP&#034; dir&#061;in action&#061;allow protocol&#061;TCP localport&#061;80<br \/>\nnetsh advfirewall firewall add rule name&#061;&#034;Apache HTTP 8080&#034; dir&#061;in action&#061;allow protocol&#061;TCP localport&#061;8080<\/p>\n<h5> \u53c2\u6570\u8bf4\u660e&#xff1a; <\/h5>\n<ul>\n<li>  name  &#xff1a;\u89c4\u5219\u540d\u79f0&#xff0c;\u4fbf\u4e8e\u8bc6\u522b <\/li>\n<li>  dir&#061;in  &#xff1a;\u5165\u7ad9\u65b9\u5411 <\/li>\n<li>  action&#061;allow  &#xff1a;\u5141\u8bb8\u901a\u8fc7 <\/li>\n<li>  protocol&#061;TCP  &#xff1a;HTTP\u57fa\u4e8eTCP <\/li>\n<li>  localport&#061;80  &#xff1a;\u76d1\u542c\u672c\u573080\u7aef\u53e3 <\/li>\n<\/ul>\n<p> \u5220\u9664\u89c4\u5219\u547d\u4ee4&#xff1a; <\/p>\n<p>netsh advfirewall firewall delete rule name&#061;&#034;Apache HTTP&#034;<\/p>\n<h4> 3.4.2 \u533a\u5206\u57df\u7f51\u7edc\u7c7b\u578b&#xff08;\u4e13\u7528\/\u516c\u7528&#xff09;\u8fdb\u884c\u5b89\u5168\u7b56\u7565\u8bbe\u5b9a <\/h4>\n<p> Windows\u9632\u706b\u5899\u5141\u8bb8\u9488\u5bf9\u4e0d\u540c\u7f51\u7edc\u73af\u5883\u5e94\u7528\u4e0d\u540c\u7b56\u7565&#xff1a; <\/p>\n<table>\n<tr> \u7f51\u7edc\u7c7b\u578b  \u5b89\u5168\u7b49\u7ea7  \u63a8\u8350\u914d\u7f6e <\/tr>\n<tbody>\n<tr>\n<td> \u57df&#xff08;Domain&#xff09; <\/td>\n<td> \u9ad8\u4fe1\u4efb <\/td>\n<td> \u5f00\u653e\u7aef\u53e3&#xff0c;\u5141\u8bb8\u5c40\u57df\u7f51\u8bbf\u95ee <\/td>\n<\/tr>\n<tr>\n<td> \u4e13\u7528&#xff08;Private&#xff09; <\/td>\n<td> \u4e2d\u7b49\u4fe1\u4efb <\/td>\n<td> \u5f00\u653e\u7aef\u53e3&#xff0c;\u9650\u5236IP\u8303\u56f4 <\/td>\n<\/tr>\n<tr>\n<td> \u516c\u7528&#xff08;Public&#xff09; <\/td>\n<td> \u4f4e\u4fe1\u4efb <\/td>\n<td> \u5173\u95edHTTP\u7aef\u53e3&#xff0c;\u4ec5\u9650\u672c\u5730\u8bbf\u95ee <\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p> \u4f8b\u5982&#xff0c;\u4ec5\u5728\u4e13\u7528\u7f51\u7edc\u4e2d\u5f00\u653e8080\u7aef\u53e3&#xff1a; <\/p>\n<p>netsh advfirewall firewall add rule name&#061;&#034;Apache Dev Only Private&#034; dir&#061;in action&#061;allow protocol&#061;TCP localport&#061;8080 profile&#061;private<\/p>\n<p>  profile&#061;private  \u8868\u793a\u4ec5\u5728\u201c\u4e13\u7528\u7f51\u7edc\u201d\u751f\u6548&#xff0c;\u63d0\u5347\u516c\u7f51\u73af\u5883\u4e0b\u7684\u5b89\u5168\u6027\u3002 <\/p>\n<h5> \u9a8c\u8bc1\u9632\u706b\u5899\u89c4\u5219\u751f\u6548&#xff1a; <\/h5>\n<p>netsh advfirewall firewall show rule name&#061;&#034;Apache HTTP&#034;<\/p>\n<p> \u8f93\u51fa\u5e94\u5305\u542b\u72b6\u6001\u4e3a\u201c\u542f\u7528\u201d\u7684\u89c4\u5219\u6761\u76ee\u3002 <\/p>\n<p> \u81f3\u6b64&#xff0c;Apache\u5df2\u5b8c\u6210\u4ece\u89e3\u538b\u3001\u914d\u7f6e\u3001\u670d\u52a1\u6ce8\u518c\u5230\u9632\u706b\u5899\u653e\u884c\u7684\u5168\u8fc7\u7a0b&#xff0c;\u5177\u5907\u5bf9\u5916\u63d0\u4f9bWeb\u670d\u52a1\u7684\u80fd\u529b\u3002\u4e0b\u4e00\u7ae0\u5c06\u8fdb\u4e00\u6b65\u6df1\u5316\u914d\u7f6e&#xff0c;\u5b9e\u73b0\u5185\u5bb9\u6258\u7ba1\u3001\u65e5\u5fd7\u4f18\u5316\u4e0e\u6a21\u5757\u6269\u5c55\u3002 <\/p>\n<h2> 4. Apache\u6838\u5fc3\u914d\u7f6e\u6df1\u5316\u4e0eWeb\u8d44\u6e90\u7ba1\u7406 <\/h2>\n<p> Apache HTTP Server \u7684\u5f3a\u5927\u4e0d\u4ec5\u4f53\u73b0\u5728\u5176\u7a33\u5b9a\u7684\u670d\u52a1\u80fd\u529b&#xff0c;\u66f4\u5728\u4e8e\u5176\u9ad8\u5ea6\u53ef\u5b9a\u5236\u7684\u914d\u7f6e\u4f53\u7cfb\u3002\u968f\u7740\u57fa\u7840\u5b89\u88c5\u548c\u521d\u6b65\u8fd0\u884c\u7684\u5b8c\u6210&#xff0c;\u6df1\u5165\u7406\u89e3\u5e76\u638c\u63e1 Apache \u7684\u6838\u5fc3\u914d\u7f6e\u673a\u5236\u6210\u4e3a\u63d0\u5347\u7cfb\u7edf\u53ef\u7528\u6027\u3001\u5b89\u5168\u6027\u4e0e\u6027\u80fd\u7684\u5173\u952e\u6b65\u9aa4\u3002\u672c\u7ae0\u8282\u805a\u7126\u4e8e Web \u8d44\u6e90\u7684\u7ec4\u7ec7\u65b9\u5f0f\u3001\u8bbf\u95ee\u63a7\u5236\u7b56\u7565\u3001\u65e5\u5fd7\u7cfb\u7edf\u7684\u7cbe\u7ec6\u5316\u7ba1\u7406\u3001\u6a21\u5757\u5316\u6269\u5c55\u7684\u5e94\u7528\u5b9e\u8df5\u4ee5\u53ca\u591a\u7ad9\u70b9\u6258\u7ba1\u6240\u9700\u7684\u865a\u62df\u4e3b\u673a\u6280\u672f\u3002\u901a\u8fc7\u7ed3\u6784\u5316\u7684\u914d\u7f6e\u8c03\u6574&#xff0c;\u53ef\u4ee5\u5b9e\u73b0\u5bf9\u670d\u52a1\u5668\u884c\u4e3a\u7684\u7cbe\u786e\u63a7\u5236&#xff0c;\u6ee1\u8db3\u4ece\u5f00\u53d1\u6d4b\u8bd5\u5230\u751f\u4ea7\u90e8\u7f72\u7684\u591a\u6837\u5316\u9700\u6c42\u3002 <\/p>\n<h3> 4.1 Web\u5185\u5bb9\u76ee\u5f55\u4e0e\u8bbf\u95ee\u63a7\u5236\u5b9a\u5236 <\/h3>\n<p> Apache \u9ed8\u8ba4\u5c06  htdocs  \u76ee\u5f55\u4f5c\u4e3a\u7f51\u7ad9\u6839\u76ee\u5f55&#xff08;DocumentRoot&#xff09;&#xff0c;\u6240\u6709\u901a\u8fc7 HTTP \u8bf7\u6c42\u8bbf\u95ee\u7684\u9759\u6001\u8d44\u6e90\u5747\u4ece\u6b64\u8def\u5f84\u63d0\u4f9b\u670d\u52a1\u3002\u7136\u800c&#xff0c;\u5728\u5b9e\u9645\u5e94\u7528\u4e2d&#xff0c;\u5f80\u5f80\u9700\u8981\u6839\u636e\u9879\u76ee\u7ed3\u6784\u6216\u56e2\u961f\u534f\u4f5c\u89c4\u8303\u91cd\u65b0\u5b9a\u4e49\u5185\u5bb9\u5b58\u50a8\u4f4d\u7f6e&#xff0c;\u5e76\u5bf9\u4e0d\u540c\u76ee\u5f55\u65bd\u52a0\u5dee\u5f02\u5316\u7684\u8bbf\u95ee\u6743\u9650\u7b56\u7565&#xff0c;\u9632\u6b62\u672a\u6388\u6743\u8bbf\u95ee\u6216\u654f\u611f\u4fe1\u606f\u6cc4\u9732\u3002 <\/p>\n<h4> 4.1.1 DocumentRoot\u6307\u4ee4\u91cd\u5b9a\u5411htdocs\u8def\u5f84\u5b9e\u73b0\u4e2a\u6027\u5316\u90e8\u7f72 <\/h4>\n<p> \u9ed8\u8ba4\u60c5\u51b5\u4e0b&#xff0c;Apache \u914d\u7f6e\u6587\u4ef6\u4e2d\u7684  DocumentRoot  \u6307\u4ee4\u6307\u5411\u5b89\u88c5\u76ee\u5f55\u4e0b\u7684  \/htdocs  \u6587\u4ef6\u5939&#xff1a; <\/p>\n<p>DocumentRoot &#034;C:\/Apache24\/htdocs&#034;<\/p>\n<p> \u5728\u4f01\u4e1a\u7ea7\u90e8\u7f72\u4e2d&#xff0c;\u901a\u5e38\u4f1a\u5c06\u7f51\u7ad9\u5185\u5bb9\u96c6\u4e2d\u5b58\u653e\u5728\u72ec\u7acb\u78c1\u76d8\u5206\u533a\u6216\u4e13\u7528\u6570\u636e\u76d8\u4e2d&#xff0c;\u4f8b\u5982  D:\\\\webprojects\\\\myapp  \u3002\u6b64\u65f6\u5e94\u4fee\u6539\u8be5\u6307\u4ee4\u4ee5\u6307\u5411\u65b0\u8def\u5f84&#xff1a; <\/p>\n<p>DocumentRoot &#034;D:\/webprojects\/myapp&#034;<\/p>\n<p> \u26a0\ufe0f \u6ce8\u610f\u4e8b\u9879&#xff1a; <\/p>\n<ul>\n<li> \u8def\u5f84\u5206\u9694\u7b26\u5efa\u8bae\u4f7f\u7528\u6b63\u659c\u6760  \/  \u6216\u53cc\u53cd\u659c\u6760  \\\\\\\\  &#xff0c;\u907f\u514d\u5355\u53cd\u659c\u6760  \\\\  \u5f15\u53d1\u8f6c\u4e49\u95ee\u9898\u3002 <\/li>\n<li> \u4fee\u6539\u540e\u5fc5\u987b\u540c\u6b65\u66f4\u65b0\u5bf9\u5e94\u7684  &lt;Directory&gt;  \u5bb9\u5668\u5757&#xff0c;\u5426\u5219\u4f1a\u5bfc\u81f4\u201cForbidden\u201d\u9519\u8bef\u3002 <\/li>\n<\/ul>\n<p> \u6b64\u4e3e\u5b9e\u73b0\u4e86\u7269\u7406\u8def\u5f84\u4e0e\u903b\u8f91\u670d\u52a1\u8def\u5f84\u7684\u89e3\u8026&#xff0c;\u4fbf\u4e8e\u540e\u7eed\u8fdb\u884c\u5907\u4efd\u3001\u8fc1\u79fb\u6216\u6743\u9650\u9694\u79bb\u64cd\u4f5c\u3002 <\/p>\n<h5> \u53c2\u6570\u8bf4\u660e\u4e0e\u6267\u884c\u903b\u8f91\u5206\u6790 <\/h5>\n<table>\n<tr> \u53c2\u6570  \u542b\u4e49 <\/tr>\n<tbody>\n<tr>\n<td>  DocumentRoot  <\/td>\n<td> \u5b9a\u4e49\u4e3b\u7ad9\u70b9\u7684\u5185\u5bb9\u6839\u76ee\u5f55 <\/td>\n<\/tr>\n<tr>\n<td> \u8def\u5f84\u5b57\u7b26\u4e32 <\/td>\n<td> \u5fc5\u987b\u4e3a\u7edd\u5bf9\u8def\u5f84&#xff0c;\u652f\u6301\u7f51\u7edc\u5171\u4eab\u8def\u5f84&#xff08;\u9700\u786e\u4fdd\u670d\u52a1\u8d26\u6237\u6709\u8bbf\u95ee\u6743\u9650&#xff09; <\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p> \u6b64\u6307\u4ee4\u4ec5\u8bbe\u5b9a\u6587\u4ef6\u7cfb\u7edf\u7684\u8d77\u70b9&#xff0c;\u771f\u6b63\u7684\u8bbf\u95ee\u6743\u9650\u7531  &lt;Directory&gt;  \u5757\u63a7\u5236&#xff0c;\u56e0\u6b64\u4e24\u8005\u5fc5\u987b\u5339\u914d\u3002 <\/p>\n<h4> 4.1.2  &lt;Directory&gt;  \u5bb9\u5668\u914d\u7f6e\u8bbf\u95ee\u6743\u9650&#xff08;Require all granted&#xff09; <\/h4>\n<p> \u4e3a\u4e86\u4f7f\u65b0\u7684  DocumentRoot  \u53ef\u88ab\u8bbf\u95ee&#xff0c;\u5fc5\u987b\u5728\u914d\u7f6e\u6587\u4ef6\u4e2d\u627e\u5230\u6216\u6dfb\u52a0\u5bf9\u5e94\u7684  &lt;Directory&gt;  \u533a\u5757&#xff1a; <\/p>\n<p>&lt;Directory &#034;D:\/webprojects\/myapp&#034;&gt;<br \/>\n    Options Indexes FollowSymLinks<br \/>\n    AllowOverride None<br \/>\n    Require all granted<br \/>\n&lt;\/Directory&gt;<\/p>\n<p> \u4e0a\u8ff0\u914d\u7f6e\u542b\u4e49\u5982\u4e0b&#xff1a; <\/p>\n<ul>\n<li>  Options Indexes FollowSymLinks  &#xff1a;\u5141\u8bb8\u76ee\u5f55\u7d22\u5f15&#xff08;\u5373\u663e\u793a\u6587\u4ef6\u5217\u8868&#xff09;\u548c\u7b26\u53f7\u94fe\u63a5\u8df3\u8f6c&#xff1b; <\/li>\n<li>  AllowOverride None  &#xff1a;\u7981\u6b62  .htaccess  \u6587\u4ef6\u8986\u76d6\u4e3b\u914d\u7f6e&#xff1b; <\/li>\n<li>  Require all granted  &#xff1a;\u6388\u4e88\u6240\u6709\u5ba2\u6237\u7aef\u8bbf\u95ee\u6743\u9650\u3002 <\/li>\n<\/ul>\n<p> \u82e5\u672a\u8bbe\u7f6e  Require all granted  &#xff0c;\u5373\u4f7f\u6587\u6863\u6839\u6b63\u786e&#xff0c;Apache \u4ecd\u5c06\u8fd4\u56de  403 Forbidden  \u9519\u8bef\u3002 <\/p>\n<h5> \u4ee3\u7801\u9010\u884c\u89e3\u8bfb\u5206\u6790 <\/h5>\n<p>&lt;Directory &#034;D:\/webprojects\/myapp&#034;&gt;<\/p>\n<p> \u2192 \u5f00\u59cb\u4e00\u4e2a\u4f5c\u7528\u4e8e\u6307\u5b9a\u8def\u5f84\u7684\u914d\u7f6e\u5bb9\u5668\u3002 <\/p>\n<p>    Options Indexes FollowSymLinks<\/p>\n<p> \u2192 \u5141\u8bb8\u7528\u6237\u6d4f\u89c8\u76ee\u5f55\u5185\u5bb9&#xff08;\u5371\u9669&#xff01;\u89c1\u4e0b\u6587&#xff09;&#xff0c;\u5e76\u652f\u6301\u8f6f\u94fe\u63a5\u89e3\u6790\u3002 <\/p>\n<p>    AllowOverride None<\/p>\n<p> \u2192 \u7981\u6b62  .htaccess  \u6539\u5199\u89c4\u5219&#xff0c;\u63d0\u9ad8\u5b89\u5168\u6027\u548c\u6027\u80fd\u3002 <\/p>\n<p>    Require all granted<\/p>\n<p> \u2192 \u660e\u786e\u5141\u8bb8\u6240\u6709 IP \u5730\u5740\u8bbf\u95ee\u8be5\u76ee\u5f55\u5185\u5bb9\u3002 <\/p>\n<p>&lt;\/Directory&gt;<\/p>\n<p> \u2192 \u7ed3\u675f\u914d\u7f6e\u5757\u3002 <\/p>\n<h4> 4.1.3 \u7981\u7528\u76ee\u5f55\u6d4f\u89c8\u529f\u80fd\u9632\u6b62\u654f\u611f\u4fe1\u606f\u6cc4\u9732 <\/h4>\n<p> \u867d\u7136  Indexes  \u9009\u9879\u65b9\u4fbf\u8c03\u8bd5&#xff0c;\u4f46\u5728\u751f\u4ea7\u73af\u5883\u4e2d\u6781\u6613\u9020\u6210\u5b89\u5168\u9690\u60a3\u3002\u5f53\u76ee\u5f55\u4e2d\u65e0\u9ed8\u8ba4\u9996\u9875&#xff08;\u5982  index.html  &#xff09;\u65f6&#xff0c;Apache \u5c06\u5217\u51fa\u5168\u90e8\u6587\u4ef6\u540d&#xff0c;\u53ef\u80fd\u66b4\u9732\u914d\u7f6e\u6587\u4ef6\u3001\u65e5\u5fd7\u6216\u6570\u636e\u5e93\u5907\u4efd\u7b49\u654f\u611f\u8d44\u6e90\u3002 <\/p>\n<p> \u63a8\u8350\u5173\u95ed\u6b64\u529f\u80fd&#xff1a; <\/p>\n<p>&lt;Directory &#034;D:\/webprojects\/myapp&#034;&gt;<br \/>\n    Options -Indexes &#043;FollowSymLinks<br \/>\n    AllowOverride None<br \/>\n    Require all granted<br \/>\n&lt;\/Directory&gt;<\/p>\n<p> \u5176\u4e2d  -Indexes  \u8868\u793a\u7981\u7528\u76ee\u5f55\u6d4f\u89c8&#xff0c;  &#043;FollowSymLinks  \u663e\u5f0f\u542f\u7528\u7b26\u53f7\u94fe\u63a5\u3002 <\/p>\n<h5> \u5b89\u5168\u589e\u5f3a\u5bf9\u6bd4\u8868 <\/h5>\n<table>\n<tr> \u914d\u7f6e\u9879  \u542f\u7528\u76ee\u5f55\u6d4f\u89c8  \u7981\u7528\u76ee\u5f55\u6d4f\u89c8 <\/tr>\n<tbody>\n<tr>\n<td> \u5b89\u5168\u6027 <\/td>\n<td> \u274c \u6781\u4f4e&#xff0c;\u6613\u66b4\u9732\u6587\u4ef6\u7ed3\u6784 <\/td>\n<td> \u2705 \u63a8\u8350\u7528\u4e8e\u751f\u4ea7\u73af\u5883 <\/td>\n<\/tr>\n<tr>\n<td> \u4f7f\u7528\u573a\u666f <\/td>\n<td> \u5185\u90e8\u6d4b\u8bd5\u3001\u6587\u4ef6\u5171\u4eab\u7ad9 <\/td>\n<td> \u6240\u6709\u516c\u5f00\u7f51\u7ad9 <\/td>\n<\/tr>\n<tr>\n<td> \u7528\u6237\u4f53\u9a8c <\/td>\n<td> \u5217\u51fa\u6587\u4ef6\u4f9b\u4e0b\u8f7d <\/td>\n<td> \u8fd4\u56de 403 \u6216\u81ea\u5b9a\u4e49\u9519\u8bef\u9875 <\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p> \u6b64\u5916&#xff0c;\u53ef\u901a\u8fc7\u8bbe\u7f6e\u9ed8\u8ba4\u6587\u6863\u8fdb\u4e00\u6b65\u89c4\u907f\u98ce\u9669&#xff1a; <\/p>\n<p>DirectoryIndex index.php index.html index.htm<\/p>\n<p> \u8fd9\u6837\u5373\u4fbf\u6ca1\u6709\u542f\u7528\u7d22\u5f15&#xff0c;\u4e5f\u80fd\u81ea\u52a8\u52a0\u8f7d\u5165\u53e3\u9875\u9762\u3002 <\/p>\n<h5> mermaid \u6d41\u7a0b\u56fe&#xff1a;\u8bf7\u6c42\u5904\u7406\u6d41\u7a0b\u4e2d\u7684\u76ee\u5f55\u8bbf\u95ee\u5224\u65ad <\/h5>\n<p>graph TD<br \/>\n    A[HTTP \u8bf7\u6c42\u5230\u8fbe] &#8211;&gt; B{\u662f\u5426\u5b58\u5728\u5339\u914d\u7684 DocumentRoot?}<br \/>\n    B &#8212; \u662f &#8211;&gt; C{\u76ee\u6807\u76ee\u5f55\u662f\u5426\u6709\u9ed8\u8ba4\u9996\u9875?}<br \/>\n    B &#8212; \u5426 &#8211;&gt; D[\u8fd4\u56de 404 Not Found]<br \/>\n    C &#8212; \u6709 &#8211;&gt; E[\u8fd4\u56de\u9996\u9875\u5185\u5bb9]<br \/>\n    C &#8212; \u65e0 &#8211;&gt;<br \/>\n        F{\u662f\u5426\u542f\u7528 Options Indexes?}<br \/>\n    F &#8212; \u662f &#8211;&gt; G[\u751f\u6210\u76ee\u5f55\u5217\u8868\u5e76\u8fd4\u56de]<br \/>\n    F &#8212; \u5426 &#8211;&gt; H[\u8fd4\u56de 403 Forbidden]<\/p>\n<p> \u8be5\u6d41\u7a0b\u6e05\u6670\u5c55\u793a\u4e86\u4e3a\u4f55\u5fc5\u987b\u540c\u65f6\u914d\u7f6e  DirectoryIndex  \u548c\u7981\u7528  Indexes  \u6765\u4fdd\u969c\u5b89\u5168\u3002 <\/p>\n<h3> 4.2 \u65e5\u5fd7\u7cfb\u7edf\u914d\u7f6e\u4f18\u5316 <\/h3>\n<p> Apache \u63d0\u4f9b\u4e86\u5f3a\u5927\u7684\u65e5\u5fd7\u8bb0\u5f55\u673a\u5236&#xff0c;\u662f\u8fd0\u7ef4\u6392\u67e5\u95ee\u9898\u3001\u5206\u6790\u6d41\u91cf\u6a21\u5f0f\u548c\u76d1\u63a7\u5f02\u5e38\u884c\u4e3a\u7684\u6838\u5fc3\u5de5\u5177\u3002\u5408\u7406\u89c4\u5212\u65e5\u5fd7\u8f93\u51fa\u8def\u5f84\u3001\u683c\u5f0f\u4e0e\u8f6e\u8f6c\u7b56\u7565&#xff0c;\u4e0d\u4ec5\u80fd\u63d0\u5347\u6545\u969c\u54cd\u5e94\u6548\u7387&#xff0c;\u8fd8\u80fd\u907f\u514d\u78c1\u76d8\u7a7a\u95f4\u8017\u5c3d\u5f15\u53d1\u670d\u52a1\u4e2d\u65ad\u3002 <\/p>\n<h4> 4.2.1 ErrorLog\u4e0eCustomLog\u6307\u4ee4\u6307\u5b9a\u72ec\u7acb\u65e5\u5fd7\u5b58\u50a8\u8def\u5f84 <\/h4>\n<p> \u9ed8\u8ba4\u65e5\u5fd7\u4f4d\u4e8e  logs\/error.log  \u548c  logs\/access.log  \u3002\u5efa\u8bae\u5c06\u5176\u8fc1\u79fb\u5230\u72ec\u7acb\u78c1\u76d8\u6216\u65e5\u5fd7\u4e13\u7528\u76ee\u5f55&#xff08;\u5982  E:\\\\logs\\\\apache  &#xff09;\u4ee5\u4fbf\u96c6\u4e2d\u7ba1\u7406\u548c\u5907\u4efd\u3002 <\/p>\n<p>ErrorLog &#034;E:\/logs\/apache\/error.log&#034;<br \/>\nLogLevel warn<\/p>\n<p>CustomLog &#034;E:\/logs\/apache\/access.log&#034; combined<\/p>\n<ul>\n<li>  ErrorLog  &#xff1a;\u5b9a\u4e49\u9519\u8bef\u65e5\u5fd7\u8def\u5f84&#xff1b; <\/li>\n<li>  LogLevel  &#xff1a;\u8bbe\u7f6e\u65e5\u5fd7\u8be6\u7ec6\u7ea7\u522b&#xff1b; <\/li>\n<li>  CustomLog  &#xff1a;\u5b9a\u4e49\u8bbf\u95ee\u65e5\u5fd7\u8def\u5f84\u53ca\u683c\u5f0f\u3002 <\/li>\n<\/ul>\n<h5> \u53c2\u6570\u8bf4\u660e\u8868 <\/h5>\n<table>\n<tr> \u6307\u4ee4  \u53c2\u6570  \u793a\u4f8b\u503c  \u8bf4\u660e <\/tr>\n<tbody>\n<tr>\n<td>  ErrorLog  <\/td>\n<td> \u6587\u4ef6\u8def\u5f84 <\/td>\n<td>  &#034;E:\/logs\/apache\/error.log&#034;  <\/td>\n<td> \u8bb0\u5f55\u542f\u52a8\u5931\u8d25\u3001\u6a21\u5757\u52a0\u8f7d\u9519\u8bef\u3001\u6743\u9650\u62d2\u7edd\u7b49 <\/td>\n<\/tr>\n<tr>\n<td>  LogLevel  <\/td>\n<td> \u7ea7\u522b <\/td>\n<td>  debug  ,  info  ,  warn  ,  error  ,  crit  <\/td>\n<td> \u7ea7\u522b\u8d8a\u9ad8&#xff0c;\u8bb0\u5f55\u8d8a\u5c11&#xff1b;\u751f\u4ea7\u73af\u5883\u63a8\u8350  warn  <\/td>\n<\/tr>\n<tr>\n<td>  CustomLog  <\/td>\n<td> \u8def\u5f84 &#043; \u683c\u5f0f <\/td>\n<td>  &#034;logs\/access.log&#034; common  <\/td>\n<td> \u652f\u6301  common  \u3001  combined  \u7b49\u9884\u8bbe\u683c\u5f0f <\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h5> \u4ee3\u7801\u903b\u8f91\u5206\u6790 <\/h5>\n<p>ErrorLog &#034;E:\/logs\/apache\/error.log&#034;<\/p>\n<p> \u2192 \u5c06\u6240\u6709\u9519\u8bef\u4fe1\u606f\u5199\u5165\u6307\u5b9a\u6587\u4ef6&#xff0c;\u66ff\u4ee3\u9ed8\u8ba4\u8def\u5f84\u3002 <\/p>\n<p>LogLevel warn<\/p>\n<p> \u2192 \u4ec5\u8bb0\u5f55\u8b66\u544a\u53ca\u4ee5\u4e0a\u7ea7\u522b\u7684\u4e8b\u4ef6&#xff08;\u5982\u914d\u7f6e\u9519\u8bef\u3001\u5b50\u8fdb\u7a0b\u5d29\u6e83&#xff09;&#xff0c;\u51cf\u5c11\u5197\u4f59\u8f93\u51fa\u3002 <\/p>\n<p>CustomLog &#034;E:\/logs\/apache\/access.log&#034; combined<\/p>\n<p> \u2192 \u4f7f\u7528  combined  \u683c\u5f0f\u8bb0\u5f55\u5b8c\u6574\u8bbf\u95ee\u4fe1\u606f&#xff0c;\u5305\u62ec\u6765\u6e90 IP\u3001\u8bf7\u6c42\u65b9\u6cd5\u3001\u72b6\u6001\u7801\u3001User-Agent \u548c Referer\u3002 <\/p>\n<p> &#x1f4a1;  combined  \u683c\u5f0f\u5b9a\u4e49\u5982\u4e0b&#xff1a; <\/p>\n<p>  %h %l %u %t &#034;%r&#034; %&gt;s %b &#034;%{Referer}i&#034; &#034;%{User-agent}i&#034;  <\/p>\n<h4> 4.2.2 \u65e5\u5fd7\u8f6e\u8f6c\u7b56\u7565\u8bbe\u8ba1\u4e0e\u7b2c\u4e09\u65b9\u5de5\u5177\u96c6\u6210\u5efa\u8bae <\/h4>\n<p> Apache \u81ea\u8eab\u4e0d\u652f\u6301\u65e5\u5fd7\u81ea\u52a8\u5207\u5272&#xff0c;\u957f\u671f\u8fd0\u884c\u53ef\u80fd\u5bfc\u81f4\u5355\u4e2a\u65e5\u5fd7\u6587\u4ef6\u8fc7\u5927&#xff08;GB \u7ea7&#xff09;&#xff0c;\u5f71\u54cd\u8bfb\u53d6\u6027\u80fd\u751a\u81f3\u6491\u7206\u78c1\u76d8\u3002 <\/p>\n<p> \u89e3\u51b3\u65b9\u6848\u6709\u4e24\u79cd&#xff1a; <\/p>\n<li>  \u4f7f\u7528\u5916\u90e8\u5de5\u5177\u5b9a\u671f\u5207\u5272\u65e5\u5fd7  &#xff08;\u63a8\u8350&#xff09; <\/li>\n<li>  \u914d\u5408\u7ba1\u9053\u547d\u4ee4\u8c03\u7528 rotatelogs  <\/li>\n<h5> \u65b9\u6848\u4e00&#xff1a;\u4f7f\u7528 rotatelogs \u5b9e\u73b0\u6309\u5927\u5c0f\u8f6e\u8f6c <\/h5>\n<p>CustomLog &#034;|bin\/rotatelogs.exe E:\/logs\/apache\/access-%Y%m%d.log 86400&#034; combined<br \/>\nErrorLog &#034;|bin\/rotatelogs.exe E:\/logs\/apache\/error-%Y%m%d.log 86400&#034;<\/p>\n<ul>\n<li>  rotatelogs.exe  \u662f Apache \u81ea\u5e26\u7684\u65e5\u5fd7\u8f6e\u8f6c\u5de5\u5177&#xff1b; <\/li>\n<li>  86400  \u8868\u793a\u6bcf\u5929\u5207\u6362\u4e00\u6b21\u65e5\u5fd7\u6587\u4ef6&#xff1b; <\/li>\n<li>  %Y%m%d  \u5b9e\u73b0\u65e5\u671f\u547d\u540d&#xff08;\u5982  access-20250405.log  &#xff09;\u3002 <\/li>\n<\/ul>\n<h5> \u65b9\u6848\u4e8c&#xff1a;\u7ed3\u5408 Windows \u4efb\u52a1\u8ba1\u5212 &#043; PowerShell \u811a\u672c <\/h5>\n<p> \u521b\u5efa\u6279\u5904\u7406\u811a\u672c  rotate_logs.bat  &#xff1a; <\/p>\n<p>&#064;echo off<br \/>\nnet stop Apache2.4<br \/>\nmove &#034;E:\\\\logs\\\\apache\\\\access.log&#034; &#034;E:\\\\logs\\\\apache\\\\archive\\\\access_%date:~0,4%%date:~5,2%%date:~8,2%.log&#034;<br \/>\nmove &#034;E:\\\\logs\\\\apache\\\\error.log&#034; &#034;E:\\\\logs\\\\apache\\\\archive\\\\error_%date:~0,4%%date:~5,2%%date:~8,2%.log&#034;<br \/>\nnet start Apache2.4<\/p>\n<p> \u518d\u901a\u8fc7\u201c\u4efb\u52a1\u8ba1\u5212\u7a0b\u5e8f\u201d\u6bcf\u65e5\u51cc\u6668\u6267\u884c\u3002 <\/p>\n<h5> \u65e5\u5fd7\u7ba1\u7406\u7b56\u7565\u5bf9\u6bd4\u8868 <\/h5>\n<table>\n<tr> \u65b9\u6cd5  \u662f\u5426\u9700\u91cd\u542f\u670d\u52a1  \u81ea\u52a8\u5316\u7a0b\u5ea6  \u9002\u7528\u573a\u666f <\/tr>\n<tbody>\n<tr>\n<td> rotatelogs <\/td>\n<td> \u5426 <\/td>\n<td> \u9ad8 <\/td>\n<td> \u5b9e\u65f6\u5728\u7ebf\u670d\u52a1 <\/td>\n<\/tr>\n<tr>\n<td> \u6279\u5904\u7406 &#043; \u4efb\u52a1\u8ba1\u5212 <\/td>\n<td> \u662f <\/td>\n<td> \u4e2d <\/td>\n<td> \u5bf9\u505c\u673a\u5bb9\u5fcd\u7684\u5185\u7f51\u7cfb\u7edf <\/td>\n<\/tr>\n<tr>\n<td> \u7b2c\u4e09\u65b9\u5de5\u5177&#xff08;e.g., Logrotate for Windows&#xff09; <\/td>\n<td> \u5426 <\/td>\n<td> \u9ad8 <\/td>\n<td> \u591a\u670d\u52a1\u7edf\u4e00\u7ba1\u7406 <\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p> \u63a8\u8350\u751f\u4ea7\u73af\u5883\u4f18\u5148\u91c7\u7528  rotatelogs  \u65b9\u5f0f&#xff0c;\u786e\u4fdd\u670d\u52a1\u8fde\u7eed\u6027\u3002 <\/p>\n<h4> 4.2.3 \u8c03\u8bd5\u7ea7\u522b LogLevel \u8bbe\u7f6e\u63d0\u5347\u95ee\u9898\u8ffd\u8e2a\u6548\u7387 <\/h4>\n<p> \u5728\u6392\u67e5\u590d\u6742\u95ee\u9898\u65f6&#xff0c;\u53ef\u4e34\u65f6\u63d0\u5347\u65e5\u5fd7\u7ea7\u522b\u4ee5\u83b7\u53d6\u66f4\u591a\u7ec6\u8282&#xff1a; <\/p>\n<p>LogLevel debug<\/p>\n<p> \u6b64\u65f6\u65e5\u5fd7\u5c06\u5305\u542b\u6a21\u5757\u521d\u59cb\u5316\u3001\u8fde\u63a5\u5efa\u7acb\u3001\u8bf7\u6c42\u89e3\u6790\u7b49\u5168\u8fc7\u7a0b\u4fe1\u606f&#xff0c;\u6709\u52a9\u4e8e\u5b9a\u4f4d rewrite \u89c4\u5219\u4e0d\u751f\u6548\u3001\u8ba4\u8bc1\u5931\u8d25\u7b49\u95ee\u9898\u3002 <\/p>\n<p> \u4f46\u8bf7\u6ce8\u610f&#xff1a; <\/p>\n<ul>\n<li>  debug  \u7ea7\u522b\u4f1a\u4ea7\u751f\u5927\u91cf\u65e5\u5fd7&#xff0c;\u4ec5\u9650\u77ed\u65f6\u95f4\u8c03\u8bd5\u4f7f\u7528&#xff1b; <\/li>\n<li> \u751f\u4ea7\u73af\u5883\u5e94\u4fdd\u6301  warn  \u6216  error  \u7ea7\u522b&#xff0c;\u907f\u514d\u6027\u80fd\u635f\u8017&#xff1b; <\/li>\n<li> \u53ef\u9488\u5bf9\u7279\u5b9a\u76ee\u5f55\u7cbe\u7ec6\u8bbe\u7f6e\u65e5\u5fd7\u7ea7\u522b&#xff1a; <\/li>\n<\/ul>\n<p>&lt;Directory &#034;D:\/webprojects\/debug-app&#034;&gt;<br \/>\n    LogLevel debug<br \/>\n&lt;\/Directory&gt;<\/p>\n<p> \u8fd9\u79cd\u65b9\u5f0f\u5b9e\u73b0\u4e86\u5c40\u90e8\u8c03\u8bd5\u800c\u4e0d\u5f71\u54cd\u5168\u5c40\u6027\u80fd\u3002 <\/p>\n<h3> 4.3 \u6a21\u5757\u5316\u6269\u5c55\u80fd\u529b\u5b9e\u8df5 <\/h3>\n<p> Apache \u7684\u6a21\u5757\u5316\u67b6\u6784\u662f\u5176\u7075\u6d3b\u6027\u7684\u6838\u5fc3\u4f53\u73b0\u3002\u901a\u8fc7\u52a8\u6001\u52a0\u8f7d DSO&#xff08;Dynamic Shared Object&#xff09;\u6a21\u5757&#xff0c;\u53ef\u5728\u4e0d\u91cd\u65b0\u7f16\u8bd1\u7684\u60c5\u51b5\u4e0b\u6269\u5c55\u529f\u80fd&#xff0c;\u5982 URL \u91cd\u5199\u3001GZIP \u538b\u7f29\u3001SSL \u52a0\u5bc6\u7b49\u3002 <\/p>\n<h4> 4.3.1 LoadModule\u673a\u5236\u52a0\u8f7dmod_rewrite\u5b9e\u73b0URL\u91cd\u5199 <\/h4>\n<p> URL \u91cd\u5199\u5e7f\u6cdb\u5e94\u7528\u4e8e SEO \u53cb\u597d\u5730\u5740\u3001\u9690\u85cf\u771f\u5b9e\u8def\u5f84\u3001\u5b9e\u73b0\u4f2a\u9759\u6001\u7b49\u529f\u80fd\u3002\u542f\u7528  mod_rewrite  \u6a21\u5757\u524d&#xff0c;\u9700\u786e\u8ba4\u5176\u5df2\u7f16\u8bd1\u8fdb Apache&#xff1a; <\/p>\n<p> \u67e5\u770b  conf\\\\modules.conf  \u662f\u5426\u5305\u542b&#xff1a; <\/p>\n<p>LoadModule rewrite_module modules\/mod_rewrite.so<\/p>\n<p> \u82e5\u88ab\u6ce8\u91ca&#xff0c;\u5219\u53d6\u6d88\u6ce8\u91ca\u5e76\u91cd\u542f\u670d\u52a1\u3002 <\/p>\n<p> \u7136\u540e\u5728  .htaccess  \u6216\u4e3b\u914d\u7f6e\u4e2d\u4f7f\u7528  RewriteEngine On  \u5f00\u542f\u91cd\u5199\u5f15\u64ce&#xff1a; <\/p>\n<p>&lt;VirtualHost *:80&gt;<br \/>\n    DocumentRoot &#034;D:\/webprojects\/shop&#034;<br \/>\n    ServerName shop.local<\/p>\n<p>    &lt;Directory &#034;D:\/webprojects\/shop&#034;&gt;<br \/>\n        RewriteEngine On<br \/>\n        RewriteCond %{REQUEST_FILENAME} !-f<br \/>\n        RewriteCond %{REQUEST_FILENAME} !-d<br \/>\n        RewriteRule ^(.*)$ index.php?url&#061;$1 [QSA,L]<br \/>\n    &lt;\/Directory&gt;<br \/>\n&lt;\/VirtualHost&gt;<\/p>\n<h5> \u4ee3\u7801\u903b\u8f91\u9010\u884c\u5206\u6790 <\/h5>\n<p>RewriteEngine On<\/p>\n<p> \u2192 \u542f\u7528\u5f53\u524d\u4e0a\u4e0b\u6587\u7684\u91cd\u5199\u529f\u80fd\u3002 <\/p>\n<p>RewriteCond %{REQUEST_FILENAME} !-f<\/p>\n<p> \u2192 \u5982\u679c\u8bf7\u6c42\u7684\u8def\u5f84\u4e0d\u662f\u4e00\u4e2a\u771f\u5b9e\u5b58\u5728\u7684\u6587\u4ef6&#xff0c;\u5219\u7ee7\u7eed\u3002 <\/p>\n<p>RewriteCond %{REQUEST_FILENAME} !-d<\/p>\n<p> \u2192 \u5982\u679c\u8bf7\u6c42\u7684\u8def\u5f84\u4e0d\u662f\u4e00\u4e2a\u771f\u5b9e\u5b58\u5728\u7684\u76ee\u5f55&#xff0c;\u5219\u7ee7\u7eed\u3002 <\/p>\n<p>RewriteRule ^(.*)$ index.php?url&#061;$1 [QSA,L]<\/p>\n<p> \u2192 \u5c06\u6240\u6709\u8bf7\u6c42\u8f6c\u53d1\u5230  index.php  &#xff0c;\u5e76\u5c06\u539f\u59cb\u8def\u5f84\u4f5c\u4e3a  url  \u53c2\u6570\u4f20\u9012&#xff1b;   [QSA]  &#xff1a;\u4fdd\u7559\u539f\u6709\u67e5\u8be2\u53c2\u6570&#xff1b;   [L]  &#xff1a;\u6700\u540e\u4e00\u6761\u89c4\u5219&#xff0c;\u505c\u6b62\u540e\u7eed\u5339\u914d\u3002 <\/p>\n<h4> 4.3.2 \u542f\u7528mod_deflate\u538b\u7f29\u6a21\u5757\u63d0\u5347\u4f20\u8f93\u6027\u80fd <\/h4>\n<p> \u542f\u7528 GZIP \u538b\u7f29\u53ef\u663e\u8457\u51cf\u5c11 HTML\u3001CSS\u3001JS \u6587\u4ef6\u4f53\u79ef&#xff0c;\u52a0\u5feb\u9875\u9762\u52a0\u8f7d\u901f\u5ea6\u3002 <\/p>\n<p> \u9996\u5148\u786e\u4fdd\u6a21\u5757\u5df2\u52a0\u8f7d&#xff1a; <\/p>\n<p>LoadModule deflate_module modules\/mod_deflate.so<\/p>\n<p> \u7136\u540e\u6dfb\u52a0\u538b\u7f29\u89c4\u5219&#xff1a; <\/p>\n<p>&lt;IfModule mod_deflate.c&gt;<br \/>\n    AddOutputFilterByType DEFLATE text\/plain<br \/>\n    AddOutputFilterByType DEFLATE text\/html<br \/>\n    AddOutputFilterByType DEFLATE text\/xml<br \/>\n    AddOutputFilterByType DEFLATE text\/css<br \/>\n    AddOutputFilterByType DEFLATE application\/javascript<br \/>\n    AddOutputFilterByType DEFLATE application\/json<\/p>\n<p>    # \u907f\u514d\u538b\u7f29\u5df2\u538b\u7f29\u6587\u4ef6<br \/>\n    SetEnvIfNoCase Request_URI \\\\.(?:gif|jpe?g|png)$ no-gzip dont-vary<br \/>\n&lt;\/IfModule&gt;<\/p>\n<h5> \u6027\u80fd\u4f18\u5316\u524d\u540e\u5bf9\u6bd4\u8868 <\/h5>\n<table>\n<tr> \u8d44\u6e90\u7c7b\u578b  \u539f\u59cb\u5927\u5c0f  \u538b\u7f29\u540e\u5927\u5c0f  \u538b\u7f29\u7387 <\/tr>\n<tbody>\n<tr>\n<td> index.html (\u6587\u672c) <\/td>\n<td> 50 KB <\/td>\n<td> 12 KB <\/td>\n<td> 76% <\/td>\n<\/tr>\n<tr>\n<td> style.css <\/td>\n<td> 80 KB <\/td>\n<td> 18 KB <\/td>\n<td> 77.5% <\/td>\n<\/tr>\n<tr>\n<td> app.js <\/td>\n<td> 200 KB <\/td>\n<td> 50 KB <\/td>\n<td> 75% <\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p> &#x1f50d; \u9a8c\u8bc1\u65b9\u5f0f&#xff1a;\u6d4f\u89c8\u5668\u5f00\u53d1\u8005\u5de5\u5177 \u2192 Network \u2192 \u67e5\u770b\u54cd\u5e94\u5934  Content-Encoding: gzip  <\/p>\n<h4> 4.3.3 \u52a8\u6001\u5171\u4eab\u5bf9\u8c61&#xff08;DSO&#xff09;\u7ba1\u7406\u6700\u4f73\u5b9e\u8df5 <\/h4>\n<p> Apache \u652f\u6301\u8fd0\u884c\u65f6\u52a0\u8f7d\u6a21\u5757&#xff0c;\u6781\u5927\u589e\u5f3a\u4e86\u7075\u6d3b\u6027\u3002\u5173\u952e\u539f\u5219\u5305\u62ec&#xff1a; <\/p>\n<ul>\n<li>  \u6700\u5c0f\u5316\u542f\u7528\u6a21\u5757  &#xff1a;\u53ea\u52a0\u8f7d\u5fc5\u9700\u6a21\u5757&#xff0c;\u964d\u4f4e\u5185\u5b58\u5360\u7528\u548c\u653b\u51fb\u9762&#xff1b; <\/li>\n<li>  \u4f7f\u7528  IfModule  \u5305\u88f9\u4f9d\u8d56\u914d\u7f6e  &#xff1a; <\/li>\n<\/ul>\n<p>&lt;IfModule mod_headers.c&gt;<br \/>\n    Header set X-Content-Type-Options nosniff<br \/>\n&lt;\/IfModule&gt;<\/p>\n<p> \u9632\u6b62\u56e0\u6a21\u5757\u7f3a\u5931\u5bfc\u81f4\u914d\u7f6e\u62a5\u9519&#xff1b;  &#8211;  \u5b9a\u671f\u5ba1\u67e5\u52a0\u8f7d\u6a21\u5757\u5217\u8868  &#xff1a; <\/p>\n<p>httpd -M<\/p>\n<p> \u5217\u51fa\u6240\u6709\u5df2\u52a0\u8f7d\u6a21\u5757&#xff0c;\u8bc6\u522b\u6f5c\u5728\u5197\u4f59\u9879\u3002 <\/p>\n<h3> 4.4 \u865a\u62df\u4e3b\u673a\u914d\u7f6e\u5b9e\u73b0\u591a\u7ad9\u70b9\u6258\u7ba1 <\/h3>\n<p> \u4e00\u53f0 Apache \u670d\u52a1\u5668\u53ef\u901a\u8fc7\u865a\u62df\u4e3b\u673a\u6280\u672f\u6258\u7ba1\u591a\u4e2a\u72ec\u7acb\u7f51\u7ad9&#xff0c;\u5206\u4e3a\u57fa\u4e8e\u57df\u540d&#xff08;Name-based&#xff09;\u548c\u57fa\u4e8e IP&#xff08;IP-based&#xff09;\u4e24\u79cd\u65b9\u5f0f\u3002Windows \u4e0b\u5e38\u7528\u524d\u8005\u8fdb\u884c\u672c\u5730\u5f00\u53d1\u6d4b\u8bd5\u3002 <\/p>\n<h4> 4.4.1 \u57fa\u4e8e\u57df\u540d\u7684\u865a\u62df\u4e3b\u673a&#xff08;NameVirtualHost&#xff09;\u914d\u7f6e\u793a\u4f8b <\/h4>\n<p> \u7f16\u8f91  httpd.conf  \u6216  extra\/httpd-vhosts.conf  &#xff1a; <\/p>\n<p># \u542f\u7528\u865a\u62df\u4e3b\u673a\u76d1\u542c<br \/>\nNameVirtualHost *:80<\/p>\n<p>&lt;VirtualHost *:80&gt;<br \/>\n    ServerName site1.local<br \/>\n    DocumentRoot &#034;D:\/webprojects\/site1&#034;<br \/>\n    &lt;Directory &#034;D:\/webprojects\/site1&#034;&gt;<br \/>\n        Options -Indexes &#043;FollowSymLinks<br \/>\n        AllowOverride All<br \/>\n        Require all granted<br \/>\n    &lt;\/Directory&gt;<br \/>\n&lt;\/VirtualHost&gt;<\/p>\n<p>&lt;VirtualHost *:80&gt;<br \/>\n    ServerName site2.local<br \/>\n    DocumentRoot &#034;D:\/webprojects\/site2&#034;<br \/>\n    &lt;Directory &#034;D:\/webprojects\/site2&#034;&gt;<br \/>\n        Options -Indexes &#043;FollowSymLinks<br \/>\n        AllowOverride All<br \/>\n        Require all granted<br \/>\n    &lt;\/Directory&gt;<br \/>\n&lt;\/VirtualHost&gt;<\/p>\n<p> \u6bcf\u4e2a  &lt;VirtualHost&gt;  \u5757\u4ee3\u8868\u4e00\u4e2a\u72ec\u7acb\u7ad9\u70b9&#xff0c;\u901a\u8fc7  ServerName  \u533a\u5206\u3002 <\/p>\n<h4> 4.4.2 \u4e0d\u540cDocumentRoot\u9694\u79bb\u4e0d\u540c\u9879\u76ee\u8d44\u6e90 <\/h4>\n<p> \u901a\u8fc7\u4e3a\u6bcf\u4e2a\u7ad9\u70b9\u5206\u914d\u72ec\u7acb\u7684  DocumentRoot  &#xff0c;\u5b9e\u73b0\u5b8c\u5168\u9694\u79bb\u7684\u6587\u4ef6\u7cfb\u7edf\u89c6\u56fe\u3002\u8fd9\u6709\u5229\u4e8e&#xff1a; <\/p>\n<ul>\n<li> \u591a\u56e2\u961f\u5e76\u884c\u5f00\u53d1&#xff1b; <\/li>\n<li> \u7248\u672c\u9694\u79bb&#xff08;\u5982 v1 vs v2&#xff09;&#xff1b; <\/li>\n<li> \u5b89\u5168\u8fb9\u754c\u5212\u5206&#xff08;\u4e0d\u540c\u6743\u9650\u7b56\u7565&#xff09;\u3002 <\/li>\n<\/ul>\n<p> \u5efa\u8bae\u76ee\u5f55\u7ed3\u6784&#xff1a; <\/p>\n<p>D:\\\\<br \/>\n \u2514\u2500\u2500 webprojects\\\\<br \/>\n      \u251c\u2500\u2500 site1\\\\           # \u7535\u5546\u524d\u7aef<br \/>\n      \u251c\u2500\u2500 site2\\\\           # \u540e\u53f0\u7ba1\u7406\u7cfb\u7edf<br \/>\n      \u2514\u2500\u2500 api-docs\\\\        # \u63a5\u53e3\u6587\u6863\u7ad9<\/p>\n<p> \u6bcf\u4e2a\u9879\u76ee\u62e5\u6709\u4e13\u5c5e\u914d\u7f6e&#xff0c;\u4e92\u4e0d\u5f71\u54cd\u3002 <\/p>\n<h4> 4.4.3 \u672c\u5730Hosts\u6587\u4ef6\u914d\u5408\u6d4b\u8bd5\u865a\u62df\u4e3b\u673a\u89e3\u6790 <\/h4>\n<p> \u7531\u4e8e  .local  \u57df\u540d\u4e0d\u5728\u516c\u7f51 DNS \u89e3\u6790\u8303\u56f4\u5185&#xff0c;\u9700\u624b\u52a8\u7ed1\u5b9a\u672c\u5730 IP&#xff1a; <\/p>\n<p> \u7f16\u8f91  C:\\\\Windows\\\\System32\\\\drivers\\\\etc\\\\hosts  &#xff1a; <\/p>\n<p>127.0.0.1       site1.local<br \/>\n127.0.0.1       site2.local<\/p>\n<p> \u4fdd\u5b58\u540e\u5373\u53ef\u5728\u6d4f\u89c8\u5668\u8bbf\u95ee&#xff1a; <\/p>\n<ul>\n<li> http:\/\/site1.local <\/li>\n<li> http:\/\/site2.local <\/li>\n<\/ul>\n<h5> \u865a\u62df\u4e3b\u673a\u89e3\u6790\u6d41\u7a0b\u56fe&#xff08;mermaid&#xff09; <\/h5>\n<p>graph LR<br \/>\n    A[\u7528\u6237\u8f93\u5165 site1.local] &#8211;&gt; B{DNS \u67e5\u8be2}<br \/>\n    B &#8211;&gt; C[\u68c0\u67e5 hosts \u6587\u4ef6]<br \/>\n    C &#8211;&gt; D{\u662f\u5426\u5b58\u5728\u6620\u5c04?}<br \/>\n    D &#8212; \u662f &#8211;&gt; E[\u89e3\u6790\u4e3a 127.0.0.1]<br \/>\n    D &#8212; \u5426 &#8211;&gt; F[\u53d1\u8d77\u516c\u7f51 DNS \u8bf7\u6c42]<br \/>\n    E &#8211;&gt; G[\u53d1\u9001 HTTP \u8bf7\u6c42 Host: site1.local]<br \/>\n    G &#8211;&gt; H[Apache \u63a5\u6536\u8bf7\u6c42]<br \/>\n    H &#8211;&gt; I{\u5339\u914d VirtualHost ServerName}<br \/>\n    I &#8211;&gt; J[\u8fd4\u56de site1 \u5185\u5bb9]<\/p>\n<p> \u8fd9\u4e00\u673a\u5236\u4f7f\u5f97\u5f00\u53d1\u8005\u65e0\u9700\u6ce8\u518c\u57df\u540d\u5373\u53ef\u6a21\u62df\u771f\u5b9e\u591a\u7ad9\u70b9\u73af\u5883\u3002 <\/p>\n<h2> 5. Apache\u670d\u52a1\u751f\u547d\u5468\u671f\u7ba1\u7406\u4e0e\u8fd0\u884c\u72b6\u6001\u9a8c\u8bc1 <\/h2>\n<p> \u5728\u5b8c\u6210Apache HTTP Server\u7684\u5b89\u88c5\u3001\u914d\u7f6e\u548c\u521d\u6b65\u90e8\u7f72\u540e&#xff0c;\u786e\u4fdd\u5176\u7a33\u5b9a\u3001\u53ef\u63a7\u5730\u8fd0\u884c\u662f\u7cfb\u7edf\u8fd0\u7ef4\u4e2d\u7684\u5173\u952e\u73af\u8282\u3002\u670d\u52a1\u7684\u542f\u52a8\u3001\u505c\u6b62\u3001\u91cd\u542f\u4ee5\u53ca\u5065\u5eb7\u72b6\u6001\u7684\u6301\u7eed\u76d1\u63a7&#xff0c;\u6784\u6210\u4e86Apache\u670d\u52a1\u5668\u5168\u751f\u547d\u5468\u671f\u7ba1\u7406\u7684\u6838\u5fc3\u5185\u5bb9\u3002\u5c24\u5176\u5728Windows\u73af\u5883\u4e0b&#xff0c;Apache\u901a\u5e38\u4ee5\u7cfb\u7edf\u670d\u52a1\u7684\u5f62\u5f0f\u957f\u671f\u9a7b\u7559\u540e\u53f0&#xff0c;\u56e0\u6b64\u638c\u63e1\u591a\u79cd\u63a7\u5236\u624b\u6bb5\u548c\u9a8c\u8bc1\u673a\u5236\u663e\u5f97\u5c24\u4e3a\u91cd\u8981\u3002\u672c\u7ae0\u8282\u6df1\u5165\u63a2\u8ba8\u5982\u4f55\u901a\u8fc7\u547d\u4ee4\u884c\u5de5\u5177\u3001\u56fe\u5f62\u5316\u754c\u9762\u53ca\u6279\u5904\u7406\u811a\u672c\u5b9e\u73b0\u5bf9Apache\u670d\u52a1\u7684\u7cbe\u51c6\u64cd\u63a7&#xff0c;\u5e76\u7ed3\u5408\u65e5\u5fd7\u5206\u6790\u3001\u7f51\u7edc\u63a2\u6d4b\u7b49\u6280\u672f\u624b\u6bb5\u5168\u9762\u8bc4\u4f30\u670d\u52a1\u7684\u5b9e\u9645\u8fd0\u884c\u72b6\u51b5\u3002\u6b64\u5916&#xff0c;\u8fd8\u5c06\u4ecb\u7ecd\u914d\u7f6e\u70ed\u52a0\u8f7d\u7684\u6700\u4f73\u5b9e\u8df5&#xff0c;\u5e2e\u52a9\u8fd0\u7ef4\u4eba\u5458\u5728\u4e0d\u5f71\u54cd\u4e1a\u52a1\u8fde\u7eed\u6027\u7684\u524d\u63d0\u4e0b\u9ad8\u6548\u5b8c\u6210\u65e5\u5e38\u7ef4\u62a4\u4efb\u52a1\u3002 <\/p>\n<h3> 5.1 \u591a\u79cd\u65b9\u5f0f\u542f\u52a8\u3001\u505c\u6b62\u4e0e\u91cd\u542f\u670d\u52a1 <\/h3>\n<p> Apache\u5728Windows\u5e73\u53f0\u4e0a\u7684\u8fd0\u884c\u4f9d\u8d56\u4e8e  httpd.exe  \u8fdb\u7a0b\u6216\u6ce8\u518c\u4e3a\u7cfb\u7edf\u670d\u52a1\u540e\u7684\u540e\u53f0\u5b88\u62a4\u6a21\u5f0f\u3002\u4e3a\u4e86\u9002\u5e94\u4e0d\u540c\u7684\u4f7f\u7528\u573a\u666f&#xff08;\u5982\u5f00\u53d1\u8c03\u8bd5\u3001\u81ea\u52a8\u5316\u8fd0\u7ef4\u3001\u6545\u969c\u6392\u67e5&#xff09;&#xff0c;\u5e94\u719f\u7ec3\u638c\u63e1\u591a\u79cd\u670d\u52a1\u63a7\u5236\u65b9\u5f0f\u3002\u8fd9\u4e9b\u65b9\u6cd5\u4e0d\u4ec5\u63d0\u5347\u4e86\u64cd\u4f5c\u7075\u6d3b\u6027&#xff0c;\u4e5f\u4e3a\u6784\u5efa\u53ef\u91cd\u590d\u3001\u53ef\u811a\u672c\u5316\u7684\u90e8\u7f72\u6d41\u7a0b\u6253\u4e0b\u57fa\u7840\u3002 <\/p>\n<h4> 5.1.1 \u547d\u4ee4\u884c\u6a21\u5f0f&#xff1a;httpd -k start\/stop\/restart\u64cd\u4f5c <\/h4>\n<p> \u6700\u76f4\u63a5\u4e14\u5e95\u5c42\u7684\u670d\u52a1\u63a7\u5236\u65b9\u5f0f\u662f\u901a\u8fc7\u547d\u4ee4\u884c\u8c03\u7528  httpd.exe  \u5e76\u4f20\u9012\u63a7\u5236\u53c2\u6570\u3002\u8be5\u65b9\u6cd5\u65e0\u9700\u4f9d\u8d56Windows\u670d\u52a1\u7ba1\u7406\u5668&#xff0c;\u9002\u7528\u4e8e\u4e34\u65f6\u6d4b\u8bd5\u6216\u670d\u52a1\u672a\u6ce8\u518c\u65f6\u7684\u5feb\u901f\u9a8c\u8bc1\u3002 <\/p>\n<p># \u542f\u52a8Apache\u670d\u52a1<br \/>\nhttpd -k start<\/p>\n<p># \u505c\u6b62\u6b63\u5728\u8fd0\u884c\u7684Apache\u670d\u52a1<br \/>\nhttpd -k stop<\/p>\n<p># \u91cd\u542f\u670d\u52a1&#xff08;\u5148\u505c\u6b62\u518d\u542f\u52a8&#xff09;<br \/>\nhttpd -k restart<\/p>\n<h5> \u4ee3\u7801\u903b\u8f91\u9010\u884c\u89e3\u8bfb&#xff1a; <\/h5>\n<ul>\n<li>  httpd -k start  &#xff1a;  -k  \u662f\u201csignal kind\u201d\u7684\u7f29\u5199&#xff0c;\u7528\u4e8e\u5411Apache\u53d1\u9001\u63a7\u5236\u4fe1\u53f7\u3002  start  \u8868\u793a\u542f\u52a8\u4e3b\u8fdb\u7a0b&#xff0c;\u82e5\u6a21\u5757\u52a0\u8f7d\u65e0\u8bef\u4e14\u7aef\u53e3\u672a\u88ab\u5360\u7528&#xff0c;\u5219\u76d1\u542c\u6307\u5b9a\u7aef\u53e3\u5e76\u5f00\u59cb\u54cd\u5e94HTTP\u8bf7\u6c42\u3002 <\/li>\n<li>  httpd -k stop  &#xff1a;\u89e6\u53d1\u5e73\u6ed1\u5173\u95ed\u6d41\u7a0b&#xff0c;\u5141\u8bb8\u5f53\u524d\u6b63\u5728\u8fdb\u884c\u7684\u8fde\u63a5\u5b8c\u6210\u540e\u518d\u7ec8\u6b62\u8fdb\u7a0b&#xff0c;\u907f\u514d abrupt termination \u5bfc\u81f4\u7684\u6570\u636e\u4e22\u5931\u3002 <\/li>\n<li>  httpd -k restart  &#xff1a;\u6267\u884c\u4e00\u6b21\u5b8c\u6574\u7684\u91cd\u542f\u52a8\u4f5c&#xff0c;\u5e38\u7528\u4e8e\u5e94\u7528\u65b0\u7684\u914d\u7f6e\u6587\u4ef6\u53d8\u66f4\u3002\u5b83\u4f1a\u5148\u53d1\u9001  stop  \u4fe1\u53f7&#xff0c;\u968f\u540e\u7acb\u5373\u6267\u884c  start  &#xff0c;\u4f46\u76f8\u6bd4\u624b\u52a8  stop &#043; start  \u66f4\u9ad8\u6548\u4e14\u5177\u6709\u5185\u90e8\u540c\u6b65\u673a\u5236\u3002 <\/li>\n<\/ul>\n<p>  \u53c2\u6570\u8bf4\u660e  &#xff1a; <\/p>\n<ul>\n<li>  -k  &#xff1a;\u6307\u5b9a\u64cd\u4f5c\u7c7b\u578b&#xff0c;\u652f\u6301  start  ,  stop  ,  restart  ,  install  ,  uninstall  \u7b49\u3002 <\/li>\n<li> \u82e5\u672a\u5c06  bin  \u76ee\u5f55\u52a0\u5165\u73af\u5883\u53d8\u91cfPATH&#xff0c;\u5219\u9700\u8fdb\u5165  C:\\\\Apache24\\\\bin  \u76ee\u5f55\u6267\u884c\u4e0a\u8ff0\u547d\u4ee4&#xff0c;\u6216\u4f7f\u7528\u5b8c\u6574\u8def\u5f84&#xff1a;  C:\\\\Apache24\\\\bin\\\\httpd.exe -k start  <\/li>\n<\/ul>\n<p> \u6b64\u65b9\u6cd5\u7684\u4f18\u70b9\u5728\u4e8e\u5b9e\u65f6\u6027\u5f3a\u3001\u53cd\u9988\u660e\u786e&#xff0c;\u9002\u5408\u5f00\u53d1\u8005\u548c\u521d\u7ea7\u7ba1\u7406\u5458\u8fdb\u884c\u672c\u5730\u6d4b\u8bd5\u3002\u4f46\u5728\u751f\u4ea7\u73af\u5883\u4e2d&#xff0c;\u5efa\u8bae\u5c06\u5176\u5c01\u88c5\u4e3a\u6279\u5904\u7406\u811a\u672c\u4ee5\u63d0\u5347\u4e00\u81f4\u6027\u3002 <\/p>\n<h4> 5.1.2 Windows\u670d\u52a1\u7ba1\u7406\u5668GUI\u754c\u9762\u63a7\u5236\u670d\u52a1\u72b6\u6001 <\/h4>\n<p> \u5bf9\u4e8e\u4e0d\u719f\u6089\u547d\u4ee4\u884c\u64cd\u4f5c\u7684\u7528\u6237&#xff0c;Windows\u63d0\u4f9b\u7684\u201c\u670d\u52a1\u201d\u7ba1\u7406\u5668\u63d0\u4f9b\u4e86\u4e00\u79cd\u76f4\u89c2\u7684\u65b9\u5f0f\u6765\u7ba1\u7406\u7cfb\u7edf\u7ea7\u670d\u52a1\u3002 <\/p>\n<h5> \u64cd\u4f5c\u6b65\u9aa4\u5982\u4e0b&#xff1a; <\/h5>\n<li> \u6309\u4e0b  Win &#043; R  &#xff0c;\u8f93\u5165  services.msc  \u5e76\u56de\u8f66\u3002 <\/li>\n<li> \u5728\u670d\u52a1\u5217\u8868\u4e2d\u67e5\u627e\u540d\u4e3a  Apache2.4  \u7684\u670d\u52a1&#xff08;\u5177\u4f53\u540d\u79f0\u53ef\u80fd\u56e0\u5b89\u88c5\u65f6\u81ea\u5b9a\u4e49\u800c\u5f02&#xff09;\u3002 <\/li>\n<li> \u53f3\u952e\u70b9\u51fb\u8be5\u670d\u52a1&#xff0c;\u53ef\u9009\u62e9\u3010\u542f\u52a8\u3011\u3001\u3010\u505c\u6b62\u3011\u3001\u3010\u91cd\u65b0\u542f\u52a8\u3011\u6216\u3010\u5c5e\u6027\u3011\u3002 <\/li>\n<li> \u5728\u201c\u5c5e\u6027\u201d\u7a97\u53e3\u4e2d&#xff0c;\u53ef\u4ee5\u8bbe\u7f6e\u542f\u52a8\u7c7b\u578b\u4e3a\u201c\u81ea\u52a8\u201d\u3001\u201c\u624b\u52a8\u201d\u6216\u201c\u7981\u7528\u201d&#xff0c;\u5b9e\u73b0\u5f00\u673a\u81ea\u542f\u529f\u80fd\u3002 <\/li>\n<table>\n<tr> \u670d\u52a1\u72b6\u6001  \u63cf\u8ff0 <\/tr>\n<tbody>\n<tr>\n<td> \u6b63\u5728\u8fd0\u884c <\/td>\n<td> Apache\u5df2\u6210\u529f\u7ed1\u5b9a\u7aef\u53e3\u5e76\u63a5\u53d7\u5ba2\u6237\u7aef\u8bf7\u6c42 <\/td>\n<\/tr>\n<tr>\n<td> \u5df2\u505c\u6b62 <\/td>\n<td> \u670d\u52a1\u672a\u8fd0\u884c&#xff0c;\u65e0\u6cd5\u54cd\u5e94\u4efb\u4f55HTTP\u8bf7\u6c42 <\/td>\n<\/tr>\n<tr>\n<td> \u542f\u52a8\u5931\u8d25 <\/td>\n<td> \u901a\u5e38\u7531\u4e8e\u914d\u7f6e\u9519\u8bef\u3001\u6743\u9650\u4e0d\u8db3\u6216\u7aef\u53e3\u51b2\u7a81\u5bfc\u81f4 <\/td>\n<\/tr>\n<tr>\n<td> \u81ea\u52a8\u542f\u52a8 <\/td>\n<td> \u7cfb\u7edf\u542f\u52a8\u65f6\u81ea\u52a8\u52a0\u8f7dApache\u670d\u52a1 <\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h5> \u6d41\u7a0b\u56fe\u5c55\u793a\u670d\u52a1\u63a7\u5236\u6d41\u7a0b&#xff1a; <\/h5>\n<p>graph TD<br \/>\n    A[\u6253\u5f00 services.msc] &#8211;&gt; B{\u67e5\u627e Apache2.4 \u670d\u52a1}<br \/>\n    B &#8211;&gt; C{\u670d\u52a1\u662f\u5426\u5b58\u5728?}<br \/>\n    C &#8211;&gt;|\u662f| D[\u67e5\u770b\u5f53\u524d\u72b6\u6001]<br \/>\n    C &#8211;&gt;|\u5426| E[\u68c0\u67e5\u662f\u5426\u6b63\u786e\u6ce8\u518c\u670d\u52a1]<br \/>\n    D &#8211;&gt; F{\u5f53\u524d\u72b6\u6001\u662f\u4ec0\u4e48?}<br \/>\n    F &#8211;&gt;|\u5df2\u505c\u6b62| G[\u53f3\u952e -&gt; \u542f\u52a8]<br \/>\n    F &#8211;&gt;|\u6b63\u5728\u8fd0\u884c| H[\u53f3\u952e -&gt; \u505c\u6b62 \u6216 \u91cd\u542f]<br \/>\n    G &#8211;&gt; I[\u7b49\u5f85\u72b6\u6001\u53d8\u4e3a\u201c\u6b63\u5728\u8fd0\u884c\u201d]<br \/>\n    H &#8211;&gt; J[\u786e\u8ba4\u670d\u52a1\u5df2\u751f\u6548]<br \/>\n    I &#8211;&gt; K[\u6d4f\u89c8\u5668\u8bbf\u95ee http:\/\/localhost \u9a8c\u8bc1]<br \/>\n    J &#8211;&gt; K<\/p>\n<p> \u8be5\u6d41\u7a0b\u56fe\u6e05\u6670\u5c55\u793a\u4e86\u4ece\u6253\u5f00\u670d\u52a1\u7ba1\u7406\u5668\u5230\u6700\u7ec8\u9a8c\u8bc1\u670d\u52a1\u53ef\u7528\u6027\u7684\u5b8c\u6574\u8def\u5f84&#xff0c;\u5f3a\u8c03\u4e86\u72b6\u6001\u5224\u65ad\u548c\u670d\u52a1\u4ea4\u4e92\u7684\u903b\u8f91\u987a\u5e8f\u3002 <\/p>\n<h4> 5.1.3 net start\/stop Apache2.4\u5b9e\u73b0\u6279\u5904\u7406\u81ea\u52a8\u5316 <\/h4>\n<p> \u5728\u4f01\u4e1a\u7ea7\u90e8\u7f72\u4e2d&#xff0c;\u9891\u7e41\u7684\u624b\u52a8\u64cd\u4f5c\u4e0d\u53ef\u6301\u7eed\u3002\u5229\u7528Windows\u5185\u7f6e\u7684  net  \u547d\u4ee4&#xff0c;\u7ed3\u5408  .bat  \u6279\u5904\u7406\u811a\u672c&#xff0c;\u53ef\u5b9e\u73b0Apache\u670d\u52a1\u7684\u81ea\u52a8\u5316\u63a7\u5236\u3002 <\/p>\n<p>&#064;echo off<br \/>\n:: Apache\u670d\u52a1\u63a7\u5236\u811a\u672c<br \/>\nset SERVICE_NAME&#061;Apache2.4<\/p>\n<p>echo \u6b63\u5728\u68c0\u67e5Apache\u670d\u52a1\u72b6\u6001&#8230;<br \/>\nsc query &#034;%SERVICE_NAME%&#034; | find &#034;RUNNING&#034; &gt;nul<\/p>\n<p>if %errorlevel% &#061;&#061; 0 (<br \/>\n    echo \u670d\u52a1\u6b63\u5728\u8fd0\u884c&#xff0c;\u51c6\u5907\u505c\u6b62&#8230;<br \/>\n    net stop %SERVICE_NAME%<br \/>\n) else (<br \/>\n    echo \u670d\u52a1\u672a\u8fd0\u884c&#xff0c;\u51c6\u5907\u542f\u52a8&#8230;<br \/>\n    net start %SERVICE_NAME%<br \/>\n)<\/p>\n<p>pause<\/p>\n<h5> \u4ee3\u7801\u903b\u8f91\u9010\u884c\u89e3\u8bfb&#xff1a; <\/h5>\n<ul>\n<li>  &#064;echo off  &#xff1a;\u5173\u95ed\u547d\u4ee4\u56de\u663e&#xff0c;\u4f7f\u8f93\u51fa\u66f4\u6574\u6d01\u3002 <\/li>\n<li>  set SERVICE_NAME&#061;Apache2.4  &#xff1a;\u5b9a\u4e49\u53d8\u91cf\u5b58\u50a8\u670d\u52a1\u540d&#xff0c;\u4fbf\u4e8e\u540e\u671f\u4fee\u6539\u3002 <\/li>\n<li>  sc query  &#xff1a;\u67e5\u8be2\u670d\u52a1\u72b6\u6001&#xff0c;\u201cRUNNING\u201d\u8868\u793a\u6b63\u5728\u8fd0\u884c\u3002 <\/li>\n<li>  find &#034;RUNNING&#034;  &#xff1a;\u5728\u8f93\u51fa\u4e2d\u641c\u7d22\u5173\u952e\u8bcd&#xff0c;\u914d\u5408  &gt;nul  \u4e22\u5f03\u8f93\u51fa\u4ec5\u4fdd\u7559\u8fd4\u56de\u7801\u3002 <\/li>\n<li>  %errorlevel% &#061;&#061; 0  &#xff1a;\u5982\u679c\u627e\u5230\u201cRUNNING\u201d&#xff0c;\u5219\u9519\u8bef\u7ea7\u522b\u4e3a0&#xff0c;\u8868\u793a\u670d\u52a1\u6b63\u5728\u8fd0\u884c\u3002 <\/li>\n<li>  net stop\/start  &#xff1a;\u8c03\u7528\u7cfb\u7edf\u547d\u4ee4\u63a7\u5236\u670d\u52a1\u542f\u505c\u3002 <\/li>\n<\/ul>\n<p>  \u4f18\u52bf\u5206\u6790  &#xff1a; <\/p>\n<ul>\n<li> \u652f\u6301\u5b9a\u65f6\u4efb\u52a1\u8c03\u5ea6&#xff08;\u901a\u8fc7\u4efb\u52a1\u8ba1\u5212\u7a0b\u5e8f&#xff09; <\/li>\n<li> \u53ef\u96c6\u6210\u81f3CI\/CD\u6d41\u6c34\u7ebf\u4e2d\u4f5c\u4e3a\u90e8\u7f72\u540e\u7f6e\u64cd\u4f5c <\/li>\n<li> \u6613\u4e8e\u6269\u5c55\u4e3a\u591a\u670d\u52a1\u534f\u540c\u542f\u505c\u811a\u672c&#xff08;\u5982\u540c\u65f6\u7ba1\u7406MySQL&#xff09; <\/li>\n<\/ul>\n<p> \u8be5\u811a\u672c\u53ef\u7528\u4e8e\u6bcf\u65e5\u91cd\u542f\u6e05\u7406\u7f13\u5b58\u3001\u53d1\u5e03\u65b0\u7248\u672c\u524d\u540e\u81ea\u52a8\u91cd\u542f\u670d\u52a1\u7b49\u573a\u666f&#xff0c;\u663e\u8457\u63d0\u5347\u8fd0\u7ef4\u6548\u7387\u3002 <\/p>\n<h3> 5.2 \u670d\u52a1\u8fd0\u884c\u5065\u5eb7\u5ea6\u68c0\u6d4b\u65b9\u6cd5 <\/h3>\n<p> \u670d\u52a1\u6210\u529f\u542f\u52a8\u5e76\u4e0d\u7b49\u4e8e\u6b63\u5e38\u5de5\u4f5c\u3002\u5fc5\u987b\u901a\u8fc7\u591a\u7ef4\u5ea6\u624b\u6bb5\u9a8c\u8bc1\u5176\u5b9e\u9645\u8fd0\u884c\u8d28\u91cf&#xff0c;\u5305\u62ec\u9875\u9762\u8bbf\u95ee\u3001\u65e5\u5fd7\u5ba1\u67e5\u548c\u7aef\u53e3\u63a2\u6d4b\u3002 <\/p>\n<h4> 5.2.1 \u6d4f\u89c8\u5668\u8bbf\u95eehttp:\/\/localhost\u9a8c\u8bc1\u9ed8\u8ba4\u9875\u9762\u663e\u793a <\/h4>\n<p> \u6700\u76f4\u89c2\u7684\u9a8c\u8bc1\u65b9\u5f0f\u662f\u5728\u672c\u5730\u6d4f\u89c8\u5668\u4e2d\u8bbf\u95ee  http:\/\/localhost  \u6216  http:\/\/127.0.0.1  \u3002 <\/p>\n<h5> \u9884\u671f\u7ed3\u679c&#xff1a; <\/h5>\n<ul>\n<li> \u6210\u529f\u52a0\u8f7d Apache \u9ed8\u8ba4\u6b22\u8fce\u9875&#xff08;It works!&#xff09; <\/li>\n<li> HTTP\u72b6\u6001\u7801\u4e3a  200 OK  <\/li>\n<li> \u9875\u9762\u6807\u9898\u5305\u542b \u201cApache2 Test Page\u201d <\/li>\n<\/ul>\n<p> \u6ce8\u610f&#xff1a;\u82e5\u66f4\u6539\u4e86\u76d1\u542c\u7aef\u53e3&#xff08;\u59828080&#xff09;&#xff0c;\u9700\u8bbf\u95ee  http:\/\/localhost:8080  <\/p>\n<h5> \u5f02\u5e38\u60c5\u51b5\u5904\u7406&#xff1a; <\/h5>\n<table>\n<tr> \u73b0\u8c61  \u53ef\u80fd\u539f\u56e0 <\/tr>\n<tbody>\n<tr>\n<td> \u8fde\u63a5\u88ab\u62d2\u7edd <\/td>\n<td> Apache\u672a\u542f\u52a8\u6216\u9632\u706b\u5899\u62e6\u622a <\/td>\n<\/tr>\n<tr>\n<td> \u9875\u9762\u7a7a\u767d <\/td>\n<td> index.html\u7f3a\u5931\u6216DocumentRoot\u914d\u7f6e\u9519\u8bef <\/td>\n<\/tr>\n<tr>\n<td> \u663e\u793a\u65e7\u5185\u5bb9 <\/td>\n<td> \u7f13\u5b58\u672a\u6e05\u9664\u6216\u672a\u91cd\u542f\u670d\u52a1 <\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p> \u53ef\u901a\u8fc7\u5f00\u53d1\u8005\u5de5\u5177&#xff08;F12&#xff09;\u67e5\u770b\u7f51\u7edc\u8bf7\u6c42\u8be6\u60c5&#xff0c;\u8fdb\u4e00\u6b65\u5b9a\u4f4d\u95ee\u9898\u3002 <\/p>\n<h4> 5.2.2 \u67e5\u770blogs\\\\error.log\u5b9e\u65f6\u6355\u83b7\u542f\u52a8\u5f02\u5e38\u4fe1\u606f <\/h4>\n<p> Apache\u7684\u65e5\u5fd7\u7cfb\u7edf\u662f\u8bca\u65ad\u95ee\u9898\u7684\u7b2c\u4e00\u9053\u9632\u7ebf\u3002  logs\/error.log  \u8bb0\u5f55\u4e86\u6240\u6709\u4e25\u91cd\u9519\u8bef\u3001\u8b66\u544a\u548c\u5173\u952e\u4e8b\u4ef6\u3002 <\/p>\n<h5> \u793a\u4f8b\u65e5\u5fd7\u6761\u76ee&#xff1a; <\/h5>\n<p>[Sun Apr 05 10:23:45.678901 2025] [mpm_winnt:error] [pid 1234:tid 5678] (OS 10048)Only one usage of each socket address is normally permitted.  : AH00072: make_sock: could not bind to address [::]:80<\/p>\n<h5> \u65e5\u5fd7\u5b57\u6bb5\u89e3\u6790&#xff1a; <\/h5>\n<table>\n<tr> \u5b57\u6bb5  \u542b\u4e49 <\/tr>\n<tbody>\n<tr>\n<td>  [Sun Apr 05 &#8230;]  <\/td>\n<td> \u65f6\u95f4\u6233 <\/td>\n<\/tr>\n<tr>\n<td>  [mpm_winnt:error]  <\/td>\n<td> \u6a21\u5757\u540d\u4e0e\u65e5\u5fd7\u7b49\u7ea7 <\/td>\n<\/tr>\n<tr>\n<td>  [pid 1234:tid 5678]  <\/td>\n<td> \u8fdb\u7a0bID\u4e0e\u7ebf\u7a0bID <\/td>\n<\/tr>\n<tr>\n<td>  (OS 10048)  <\/td>\n<td> Windows\u7cfb\u7edf\u9519\u8bef\u4ee3\u7801 <\/td>\n<\/tr>\n<tr>\n<td>  AH00072  <\/td>\n<td> Apache\u5185\u90e8\u9519\u8bef\u7f16\u53f7 <\/td>\n<\/tr>\n<tr>\n<td> \u9519\u8bef\u63cf\u8ff0 <\/td>\n<td> \u5177\u4f53\u51fa\u9519\u539f\u56e0&#xff08;\u6b64\u5904\u4e3a\u7aef\u53e3\u88ab\u5360\u7528&#xff09; <\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p> \u63a8\u8350\u4f7f\u7528\u6587\u672c\u7f16\u8f91\u5668&#xff08;\u5982Notepad&#043;&#043;&#xff09;\u5f00\u542f\u201c\u81ea\u52a8\u5237\u65b0\u201d\u529f\u80fd&#xff0c;\u5b9e\u65f6\u76d1\u63a7\u65e5\u5fd7\u53d8\u5316\u3002 <\/p>\n<h4> 5.2.3 \u4f7f\u7528telnet\u6d4b\u8bd5\u7aef\u53e3\u8fde\u901a\u6027\u786e\u8ba4\u76d1\u542c\u72b6\u6001 <\/h4>\n<p> \u5373\u4f7fApache\u58f0\u79f0\u5df2\u542f\u52a8&#xff0c;\u4e5f\u53ef\u80fd\u56e0\u7ed1\u5b9a\u5931\u8d25\u800c\u5bfc\u81f4\u7aef\u53e3\u672a\u771f\u6b63\u5f00\u653e\u3002\u4f7f\u7528  telnet  \u53ef\u9a8c\u8bc1TCP\u5c42\u8fde\u901a\u6027\u3002 <\/p>\n<p>telnet localhost 80<\/p>\n<p> \u82e5\u63d0\u793a\u201c\u4e0d\u662f\u5185\u90e8\u6216\u5916\u90e8\u547d\u4ee4\u201d&#xff0c;\u8bf7\u542f\u7528Windows\u529f\u80fd&#xff1a;\u201cTelnet\u5ba2\u6237\u7aef\u201d\u3002 <\/p>\n<h5> \u6267\u884c\u7ed3\u679c\u5206\u6790&#xff1a; <\/h5>\n<ul>\n<li>  \u6210\u529f\u8fde\u63a5  &#xff1a;\u5c4f\u5e55\u53d8\u9ed1\u6216\u51fa\u73b0\u7a7a\u767d&#xff0c;\u8bf4\u660e\u7aef\u53e3\u5f00\u653e <\/li>\n<li>  \u8fde\u63a5\u5931\u8d25  &#xff1a;\u63d0\u793a\u201c\u65e0\u6cd5\u6253\u5f00\u5230\u4e3b\u673a\u7684\u8fde\u63a5\u201d&#xff0c;\u8868\u660e\u670d\u52a1\u672a\u76d1\u542c\u6216\u9632\u706b\u5899\u963b\u6b62 <\/li>\n<\/ul>\n<p> \u4e5f\u53ef\u4f7f\u7528PowerShell\u66ff\u4ee3\u65b9\u6848&#xff1a; <\/p>\n<p>Test-NetConnection -ComputerName localhost -Port 80<\/p>\n<p> \u8f93\u51fa\u793a\u4f8b&#xff1a; <\/p>\n<p>ComputerName     : localhost<br \/>\nRemoteAddress    : ::1<br \/>\nRemotePort       : 80<br \/>\nInterfaceAlias   : Loopback Pseudo-Interface 1<br \/>\nSourceAddress    : ::1<br \/>\nTcpTestSucceeded : True<\/p>\n<p> \u5f53  TcpTestSucceeded  \u4e3a  True  \u65f6&#xff0c;\u8bc1\u660e\u7aef\u53e3\u53ef\u8fbe\u3002 <\/p>\n<h3> 5.3 \u914d\u7f6e\u8bed\u6cd5\u68c0\u67e5\u4e0e\u70ed\u52a0\u8f7d\u5b9e\u8df5 <\/h3>\n<p> \u9891\u7e41\u4fee\u6539\u914d\u7f6e\u6587\u4ef6\u662f\u8fd0\u7ef4\u5e38\u6001&#xff0c;\u4f46\u9519\u8bef\u7684\u914d\u7f6e\u53ef\u80fd\u5bfc\u81f4\u670d\u52a1\u65e0\u6cd5\u542f\u52a8\u3002\u638c\u63e1\u8bed\u6cd5\u6821\u9a8c\u548c\u70ed\u52a0\u8f7d\u6280\u5de7&#xff0c;\u53ef\u5927\u5e45\u964d\u4f4e\u8fd0\u7ef4\u98ce\u9669\u3002 <\/p>\n<h4> 5.3.1 httpd -t\u547d\u4ee4\u9a8c\u8bc1conf\u6587\u4ef6\u8bed\u6cd5\u6b63\u786e\u6027 <\/h4>\n<p> \u5728\u91cd\u542f\u524d\u52a1\u5fc5\u6267\u884c\u8bed\u6cd5\u68c0\u67e5&#xff1a; <\/p>\n<p>httpd -t<\/p>\n<h5> \u8f93\u51fa\u793a\u4f8b&#xff1a; <\/h5>\n<p>Syntax OK<\/p>\n<p> \u6216 <\/p>\n<p>AH00526: Syntax error on line 58 of C:\/Apache24\/conf\/httpd.conf:<br \/>\nInvalid command &#039;Listenn&#039;, perhaps misspelled or defined by a module not included in the server configuration<\/p>\n<h5> \u53c2\u6570\u6269\u5c55\u8bf4\u660e&#xff1a; <\/h5>\n<ul>\n<li>  httpd -t -D DUMP_MODULES  &#xff1a;\u5217\u51fa\u5f53\u524d\u52a0\u8f7d\u7684\u6240\u6709\u6a21\u5757 <\/li>\n<li>  httpd -t -D DUMP_VHOSTS  &#xff1a;\u68c0\u67e5\u865a\u62df\u4e3b\u673a\u914d\u7f6e\u662f\u5426\u6b63\u786e <\/li>\n<li>  httpd -T  &#xff1a;\u8df3\u8fc7DNS\u89e3\u6790&#xff0c;\u52a0\u5feb\u6d4b\u8bd5\u901f\u5ea6 <\/li>\n<\/ul>\n<p> \u5efa\u8bae\u5c06\u6b64\u547d\u4ee4\u5199\u5165\u9884\u63d0\u4ea4\u94a9\u5b50&#xff08;pre-commit hook&#xff09;\u6216\u90e8\u7f72\u524d\u68c0\u67e5\u6e05\u5355\u4e2d\u3002 <\/p>\n<h4> 5.3.2 \u4fee\u6539\u914d\u7f6e\u540e\u4f7f\u7528restart\u800c\u975estop&#043;start\u51cf\u5c11\u4e2d\u65ad\u65f6\u95f4 <\/h4>\n<p> \u76f4\u63a5\u6267\u884c  stop  \u518d  start  \u5b58\u5728\u77ed\u6682\u7684\u670d\u52a1\u4e2d\u65ad\u7a97\u53e3&#xff0c;\u53ef\u80fd\u5bfc\u81f4\u90e8\u5206\u8bf7\u6c42\u5931\u8d25\u3002\u800c  restart  \u63d0\u4f9b\u4e86\u66f4\u4f18\u96c5\u7684\u5e73\u6ed1\u8fc7\u6e21\u673a\u5236\u3002 <\/p>\n<p>httpd -k restart<\/p>\n<h5> \u5185\u90e8\u5de5\u4f5c\u673a\u5236&#xff1a; <\/h5>\n<li> \u4e3b\u8fdb\u7a0b\u6536\u5230  restart  \u4fe1\u53f7 <\/li>\n<li> \u542f\u52a8\u65b0\u7684\u5b50\u8fdb\u7a0b\u6c60&#xff0c;\u52a0\u8f7d\u66f4\u65b0\u540e\u7684\u914d\u7f6e <\/li>\n<li> \u65e7\u5b50\u8fdb\u7a0b\u7ee7\u7eed\u5904\u7406\u5b8c\u73b0\u6709\u8bf7\u6c42 <\/li>\n<li> \u65e7\u5b50\u8fdb\u7a0b\u81ea\u7136\u9000\u51fa&#xff0c;\u5b8c\u6210\u65e0\u7f1d\u5207\u6362 <\/li>\n<p> \u9002\u7528\u573a\u666f&#xff1a;\u66f4\u65b0Rewrite\u89c4\u5219\u3001\u8c03\u6574\u65e5\u5fd7\u8def\u5f84\u3001\u4fee\u6539\u865a\u62df\u4e3b\u673a\u914d\u7f6e\u7b49\u975e\u7ed3\u6784\u6027\u53d8\u66f4 <\/p>\n<h4> 5.3.3 \u5b9e\u73b0\u96f6\u505c\u673a\u66f4\u65b0\u914d\u7f6e\u7684\u8fd0\u7ef4\u601d\u8def <\/h4>\n<p> \u771f\u6b63\u7684\u201c\u96f6\u505c\u673a\u201d\u9700\u8981\u7ed3\u5408\u4ee5\u4e0b\u7b56\u7565&#xff1a; <\/p>\n<table>\n<tr> \u6280\u672f\u624b\u6bb5  \u8bf4\u660e <\/tr>\n<tbody>\n<tr>\n<td>  Graceful Restart  <\/td>\n<td> \u4f7f\u7528  httpd -k graceful  &#xff0c;\u5141\u8bb8\u65e7\u8fde\u63a5\u5b8c\u6210&#xff0c;\u65b0\u8fde\u63a5\u4f7f\u7528\u65b0\u914d\u7f6e <\/td>\n<\/tr>\n<tr>\n<td> \u53cd\u5411\u4ee3\u7406\u96c6\u7fa4 <\/td>\n<td> \u524d\u7f6eNginx\u6216HAProxy&#xff0c;\u9010\u53f0\u66f4\u65b0\u540e\u7aefApache\u5b9e\u4f8b <\/td>\n<\/tr>\n<tr>\n<td> \u8d1f\u8f7d\u5747\u8861\u6eda\u52a8\u66f4\u65b0 <\/td>\n<td> \u591a\u8282\u70b9\u90e8\u7f72&#xff0c;\u6bcf\u6b21\u53ea\u91cd\u542f\u4e00\u4e2a\u8282\u70b9 <\/td>\n<\/tr>\n<tr>\n<td> \u914d\u7f6e\u7248\u672c\u63a7\u5236 <\/td>\n<td> \u4f7f\u7528Git\u7ba1\u7406conf\u6587\u4ef6&#xff0c;\u4fbf\u4e8e\u56de\u6eda <\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h5> \u63a8\u8350\u64cd\u4f5c\u6d41\u7a0b\u8868&#xff1a; <\/h5>\n<table>\n<tr> \u6b65\u9aa4  \u64cd\u4f5c  \u76ee\u6807 <\/tr>\n<tbody>\n<tr>\n<td> 1 <\/td>\n<td> \u5907\u4efd\u539f\u59cb\u914d\u7f6e <\/td>\n<td> \u9632\u6b62\u8bef\u64cd\u4f5c <\/td>\n<\/tr>\n<tr>\n<td> 2 <\/td>\n<td> \u6267\u884c  httpd -t  \u6821\u9a8c\u8bed\u6cd5 <\/td>\n<td> \u63d0\u524d\u53d1\u73b0\u95ee\u9898 <\/td>\n<\/tr>\n<tr>\n<td> 3 <\/td>\n<td> \u4f7f\u7528  graceful  \u6216  restart  \u5e94\u7528\u53d8\u66f4 <\/td>\n<td> \u6700\u5c0f\u5316\u5f71\u54cd <\/td>\n<\/tr>\n<tr>\n<td> 4 <\/td>\n<td> \u76d1\u63a7 error.log \u548c access.log <\/td>\n<td> \u786e\u8ba4\u65e0\u65b0\u9519\u8bef <\/td>\n<\/tr>\n<tr>\n<td> 5 <\/td>\n<td> \u6d4f\u89c8\u5668\u8bbf\u95ee\u9a8c\u8bc1\u529f\u80fd <\/td>\n<td> \u5b8c\u6210\u95ed\u73af <\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>flowchart LR<br \/>\n    A[\u4fee\u6539\u914d\u7f6e\u6587\u4ef6] &#8211;&gt; B{\u8bed\u6cd5\u6b63\u786e?}<br \/>\n    B &#8211;&gt;|\u5426| C[\u4fee\u6b63\u9519\u8bef]<br \/>\n    B &#8211;&gt;|\u662f| D[\u6267\u884c graceful restart]<br \/>\n    D &#8211;&gt; E[\u76d1\u63a7\u65e5\u5fd7]<br \/>\n    E &#8211;&gt; F{\u662f\u5426\u6709\u5f02\u5e38?}<br \/>\n    F &#8211;&gt;|\u662f| G[\u56de\u6eda\u914d\u7f6e]<br \/>\n    F &#8211;&gt;|\u5426| H[\u786e\u8ba4\u670d\u52a1\u6b63\u5e38]<br \/>\n    C &#8211;&gt; B<br \/>\n    G &#8211;&gt; D<\/p>\n<p> \u8be5\u6d41\u7a0b\u56fe\u4f53\u73b0\u4e86\u73b0\u4ee3\u8fd0\u7ef4\u4e2d\u201c\u5b89\u5168\u4f18\u5148\u3001\u5feb\u901f\u54cd\u5e94\u3001\u53ef\u8ffd\u6eaf\u201d\u7684\u6838\u5fc3\u7406\u5ff5\u3002 <\/p>\n<p> \u7efc\u4e0a\u6240\u8ff0&#xff0c;Apache\u670d\u52a1\u7684\u751f\u547d\u5468\u671f\u7ba1\u7406\u4e0d\u4ec5\u4ec5\u662f\u7b80\u5355\u7684\u542f\u505c\u64cd\u4f5c&#xff0c;\u800c\u662f\u6db5\u76d6\u63a7\u5236\u3001\u76d1\u6d4b\u3001\u9a8c\u8bc1\u4e0e\u4f18\u5316\u7684\u4e00\u6574\u5957\u4f53\u7cfb\u3002\u53ea\u6709\u5c06\u547d\u4ee4\u884c\u3001GUI\u3001\u811a\u672c\u4e0e\u65e5\u5fd7\u5206\u6790\u6709\u673a\u7ed3\u5408&#xff0c;\u624d\u80fd\u5b9e\u73b0\u9ad8\u53ef\u7528\u3001\u4f4e\u98ce\u9669\u7684Web\u670d\u52a1\u8fd0\u7ef4\u76ee\u6807\u3002 <\/p>\n<h2> 6. \u5b89\u5168\u52a0\u56fa\u4e0e\u5e38\u89c1\u6545\u969c\u6392\u67e5\u5b9e\u6218\u603b\u7ed3 <\/h2>\n<h3> 6.1 \u5b89\u5168\u914d\u7f6e\u5f3a\u5316\u63aa\u65bd <\/h3>\n<p> \u5728Apache\u90e8\u7f72\u5b8c\u6210\u540e&#xff0c;\u672a\u7ecf\u52a0\u56fa\u7684\u9ed8\u8ba4\u914d\u7f6e\u6781\u6613\u6210\u4e3a\u653b\u51fb\u5165\u53e3\u3002\u5c24\u5176\u5728Windows\u73af\u5883\u4e2d&#xff0c;\u7531\u4e8e\u5176\u56fe\u5f62\u5316\u7ba1\u7406\u7279\u6027\u4e0e\u590d\u6742\u7684\u6743\u9650\u6a21\u578b&#xff0c;\u66f4\u9700\u7cfb\u7edf\u6027\u5730\u5b9e\u65bd\u5b89\u5168\u7b56\u7565\u3002 <\/p>\n<h4> 6.1.1 \u79fb\u9664\u6216\u91cd\u547d\u540dserver-status\u7b49\u5371\u9669\u9ed8\u8ba4\u9875\u9762 <\/h4>\n<p> Apache\u9ed8\u8ba4\u542f\u7528\u4e86  mod_status  \u6a21\u5757&#xff0c;\u5e76\u901a\u8fc7  \/server-status  \u8def\u5f84\u66b4\u9732\u670d\u52a1\u5668\u8fd0\u884c\u72b6\u6001\u3002\u8be5\u9875\u9762\u53ef\u6cc4\u9732\u8bf7\u6c42\u5904\u7406\u3001CPU\u4f7f\u7528\u7387\u7b49\u654f\u611f\u4fe1\u606f&#xff0c;\u5e94\u4e88\u4ee5\u7981\u7528\u6216\u4e25\u683c\u9650\u5236\u8bbf\u95ee\u3002 <\/p>\n<p># conf\/httpd.conf \u4e2d\u5173\u95ed server-status \u8bbf\u95ee<br \/>\n&lt;Location \/server-status&gt;<br \/>\n    SetHandler server-status<br \/>\n    Require ip 127.0.0.1<br \/>\n    # \u7981\u6b62\u5916\u90e8\u8bbf\u95ee&#xff0c;\u4ec5\u5141\u8bb8\u672c\u5730\u8c03\u8bd5<br \/>\n&lt;\/Location&gt;<\/p>\n<p># \u82e5\u65e0\u9700\u72b6\u6001\u76d1\u63a7&#xff0c;\u76f4\u63a5\u6ce8\u91ca\u6216\u5220\u9664\u4e0a\u8ff0\u914d\u7f6e\u5757<\/p>\n<p>  \u64cd\u4f5c\u5efa\u8bae  &#xff1a;\u751f\u4ea7\u73af\u5883\u5e94\u5f7b\u5e95\u6ce8\u91ca\u76f8\u5173\u914d\u7f6e\u5e76\u6267\u884c  httpd -t  \u9a8c\u8bc1\u8bed\u6cd5\u540e\u91cd\u542f\u670d\u52a1\u3002 <\/p>\n<h4> 6.1.2 \u9690\u85cfServerTokens\u51cf\u5c11\u66b4\u9732\u7248\u672c\u4fe1\u606f\u98ce\u9669 <\/h4>\n<p> \u9ed8\u8ba4\u60c5\u51b5\u4e0b&#xff0c;Apache\u4f1a\u5728HTTP\u54cd\u5e94\u5934\u4e2d\u8fd4\u56de\u8be6\u7ec6\u7684\u670d\u52a1\u5668\u7248\u672c\u548c\u64cd\u4f5c\u7cfb\u7edf\u4fe1\u606f&#xff0c;\u4f8b\u5982&#xff1a; <\/p>\n<p>Server: Apache\/2.4.29 (Win64) PHP\/7.2.1<\/p>\n<p> \u653b\u51fb\u8005\u53ef\u636e\u6b64\u53d1\u8d77\u9488\u5bf9\u6027\u6f0f\u6d1e\u5229\u7528\u3002\u901a\u8fc7\u4ee5\u4e0b\u914d\u7f6e\u9690\u85cf\u6216\u6700\u5c0f\u5316\u8f93\u51fa&#xff1a; <\/p>\n<p># conf\/httpd.conf<br \/>\nServerTokens Prod<br \/>\nServerSignature Off<\/p>\n<ul>\n<li>  ServerTokens Prod  &#xff1a;\u4ec5\u663e\u793a\u201cApache\u201d\u800c\u4e0d\u900f\u9732\u7248\u672c\u53f7&#xff1b; <\/li>\n<li>  ServerSignature Off  &#xff1a;\u907f\u514d\u5728\u9519\u8bef\u9875\u9762\u5e95\u90e8\u663e\u793a\u670d\u52a1\u5668\u7248\u672c\u3002 <\/li>\n<\/ul>\n<p> \u4fee\u6539\u540e\u91cd\u542f\u670d\u52a1&#xff0c;\u4f7f\u7528\u6d4f\u89c8\u5668\u5f00\u53d1\u8005\u5de5\u5177\u6216  curl -I http:\/\/localhost  \u9a8c\u8bc1\u54cd\u5e94\u5934\u662f\u5426\u5df2\u7cbe\u7b80&#xff1a; <\/p>\n<p>$ curl -I http:\/\/localhost<br \/>\nHTTP\/1.1 200 OK<br \/>\nDate: Mon, 08 Apr 2025 10:30:00 GMT<br \/>\nServer: Apache<br \/>\nContent-Type: text\/html<\/p>\n<h4> 6.1.3 \u914d\u7f6e.htaccess\u6587\u4ef6\u9650\u5236IP\u8bbf\u95ee\u8303\u56f4 <\/h4>\n<p> \u5bf9\u4e8e\u7279\u5b9a\u76ee\u5f55&#xff08;\u5982\u7ba1\u7406\u540e\u53f0&#xff09;&#xff0c;\u53ef\u901a\u8fc7  .htaccess  \u5b9e\u73b0\u7ec6\u7c92\u5ea6\u8bbf\u95ee\u63a7\u5236\u3002 <\/p>\n<p> \u793a\u4f8b&#xff1a;\u9650\u5236  \/admin  \u76ee\u5f55\u4ec5\u5141\u8bb8\u5185\u7f51IP\u8bbf\u95ee <\/p>\n<p># htdocs\/admin\/.htaccess<br \/>\nOrder Deny,Allow<br \/>\nDeny from all<br \/>\nAllow from 192.168.1.0\/24<br \/>\nAllow from 127.0.0.1<\/p>\n<p> \u6216\u4f7f\u7528\u73b0\u4ee3\u8bed\u6cd5&#xff08;Apache 2.4&#043;&#xff09;&#xff1a; <\/p>\n<p>Require ip 192.168.1.0\/24<br \/>\nRequire ip 127.0.0.1<\/p>\n<p>  \u524d\u63d0\u6761\u4ef6  &#xff1a;\u786e\u4fdd\u4e3b\u914d\u7f6e\u4e2d\u5141\u8bb8  .htaccess  \u8986\u76d6\u6743\u9650&#xff1a; <\/p>\n<p>&lt;Directory &#034;C:\/Apache24\/htdocs&#034;&gt;<br \/>\n    AllowOverride All<br \/>\n    Require all granted<br \/>\n&lt;\/Directory&gt;<\/p>\n<h3> 6.2 \u5178\u578b\u95ee\u9898\u8bca\u65ad\u4e0e\u89e3\u51b3\u65b9\u6848 <\/h3>\n<h4> 6.2.1 \u201cAddress already in use\u201d\u7aef\u53e3\u5360\u7528\u51b2\u7a81\u5904\u7406 <\/h4>\n<p> \u5f53\u542f\u52a8Apache\u65f6\u51fa\u73b0\u5982\u4e0b\u9519\u8bef&#xff1a; <\/p>\n<p>(OS 10048)Only one usage of each socket address is normally permitted.<br \/>\nAH00072: make_sock: could not bind to address [::]:80<\/p>\n<p> \u8bf4\u660e80\u7aef\u53e3\u5df2\u88ab\u5176\u4ed6\u8fdb\u7a0b\u5360\u7528\u3002\u5e38\u89c1\u5360\u7528\u8005\u5305\u62ecIIS\u3001Skype\u3001SQL Server Reporting Services\u7b49\u3002 <\/p>\n<p>  \u89e3\u51b3\u6b65\u9aa4  &#xff1a; <\/p>\n<li>\n<p> \u67e5\u627e\u5360\u7528\u7aef\u53e3\u7684\u8fdb\u7a0bPID&#xff1a;   cmd netstat -ano | findstr :80   \u8f93\u51fa\u793a\u4f8b&#xff1a;   TCP 0.0.0.0:80 0.0.0.0:0 LISTENING 4  <\/p>\n<\/li>\n<li>\n<p> \u6839\u636ePID\u67e5\u8fdb\u7a0b\u540d&#xff1a;   cmd tasklist | findstr 4   \u8f93\u51fa\u53ef\u80fd\u4e3a&#xff1a;   System 4 NT Kernel &amp; System  <\/p>\n<\/li>\n<p> \u82e5PID\u4e3a4&#xff0c;\u901a\u5e38\u8868\u793aSystem\u8fdb\u7a0b&#xff0c;\u6781\u53ef\u80fd\u662fHTTP.sys\u9a71\u52a8&#xff08;\u7531IIS\u6216WebDav\u542f\u7528&#xff09;\u3002\u53ef\u901a\u8fc7\u4ee5\u4e0b\u547d\u4ee4\u505c\u7528&#xff1a;   cmd net stop was \/y  <\/p>\n<li> \u4fee\u6539Apache\u76d1\u542c\u7aef\u53e3\u4f5c\u4e3a\u4e34\u65f6\u89c4\u907f\u65b9\u6848&#xff1a;   apache Listen 8080 ServerName localhost:8080  <\/li>\n<h4> 6.2.2 \u6743\u9650\u62d2\u7edd\u9519\u8bef&#xff08;Permission denied&#xff09;\u7684NTFS\u6743\u9650\u4fee\u590d <\/h4>\n<p> \u73b0\u8c61&#xff1a;\u8bbf\u95ee\u9875\u9762\u8fd4\u56de  403 Forbidden  &#xff0c;\u65e5\u5fd7\u63d0\u793a&#xff1a; <\/p>\n<p>(13)Permission denied: [client 127.0.0.1:50432] AH00035: access to \/ denied<\/p>\n<p> \u539f\u56e0&#xff1a;Apache\u670d\u52a1\u8d26\u6237&#xff08;\u9ed8\u8ba4\u4e3a  Local System  &#xff09;\u5bf9\u6587\u6863\u6839\u76ee\u5f55\u65e0\u8bfb\u53d6\u6743\u9650\u3002 <\/p>\n<p>  \u4fee\u590d\u6d41\u7a0b  &#xff1a; <\/p>\n<li> \u53f3\u952e\u70b9\u51fb  C:\\\\Apache24\\\\htdocs  \u2192 \u5c5e\u6027 \u2192 \u5b89\u5168&#xff1b; <\/li>\n<li> \u6dfb\u52a0\u7528\u6237\u7ec4&#xff1a;  &#8211;  SYSTEM  &#xff1a;\u5b8c\u5168\u63a7\u5236  &#8211;  Administrators  &#xff1a;\u5b8c\u5168\u63a7\u5236  &#8211;  Users  &#xff1a;\u8bfb\u53d6\u548c\u6267\u884c\u3001\u5217\u51fa\u6587\u4ef6\u5939\u5185\u5bb9 <\/li>\n<li> \u5e94\u7528\u5e76\u7ee7\u627f\u81f3\u5b50\u5bf9\u8c61\u3002 <\/li>\n<p> PowerShell\u811a\u672c\u4e00\u952e\u8bbe\u7f6e&#xff1a; <\/p>\n<p>$path &#061; &#034;C:\\\\Apache24\\\\htdocs&#034;<br \/>\n$acl &#061; Get-Acl $path<br \/>\n$rule &#061; New-Object System.Security.AccessControl.FileSystemAccessRule(&#034;Users&#034;,&#034;ReadAndExecute&#034;,&#034;ContainerInherit,ObjectInherit&#034;,&#034;None&#034;,&#034;Allow&#034;)<br \/>\n$acl.SetAccessRule($rule)<br \/>\nSet-Acl $path $acl<\/p>\n<h4> 6.2.3 \u670d\u52a1\u65e0\u6cd5\u542f\u52a8\u65f6\u4e8b\u4ef6\u67e5\u770b\u5668\u65e5\u5fd7\u6df1\u5ea6\u5206\u6790 <\/h4>\n<p> \u82e5Apache\u670d\u52a1\u6ce8\u518c\u6210\u529f\u4f46\u65e0\u6cd5\u542f\u52a8&#xff0c;\u5e94\u68c0\u67e5Windows\u4e8b\u4ef6\u67e5\u770b\u5668&#xff1a; <\/p>\n<li> \u6253\u5f00  \u4e8b\u4ef6\u67e5\u770b\u5668 \u2192 Windows \u65e5\u5fd7 \u2192 \u5e94\u7528\u7a0b\u5e8f  <\/li>\n<li> \u7b5b\u9009\u6765\u6e90\u4e3a  Apache2.4  \u7684\u9519\u8bef\u4e8b\u4ef6 <\/li>\n<li> \u5e38\u89c1\u9519\u8bef\u7c7b\u578b\u53ca\u5bf9\u5e94\u7801\u8868&#xff1a; <\/li>\n<table>\n<tr> \u9519\u8bef\u4ee3\u7801  \u542b\u4e49  \u6392\u67e5\u65b9\u5411 <\/tr>\n<tbody>\n<tr>\n<td> 1 <\/td>\n<td> \u6a21\u5757\u52a0\u8f7d\u5931\u8d25 <\/td>\n<td> \u68c0\u67e5modules\u8def\u5f84\u662f\u5426\u5b58\u5728\u7f3a\u5931DLL <\/td>\n<\/tr>\n<tr>\n<td> 2 <\/td>\n<td> \u914d\u7f6e\u6587\u4ef6\u8def\u5f84\u9519\u8bef <\/td>\n<td> \u786e\u8ba4ServerRoot\u6307\u5411\u6b63\u786e\u76ee\u5f55 <\/td>\n<\/tr>\n<tr>\n<td> 3 <\/td>\n<td> \u7aef\u53e3\u88ab\u5360 <\/td>\n<td> \u4f7f\u7528netstat\u6392\u67e5 <\/td>\n<\/tr>\n<tr>\n<td> 4 <\/td>\n<td> \u6743\u9650\u4e0d\u8db3 <\/td>\n<td> \u68c0\u67e5conf\u4e0ehtdocs\u76ee\u5f55ACL <\/td>\n<\/tr>\n<tr>\n<td> 127 <\/td>\n<td> \u627e\u4e0d\u5230\u6307\u5b9a\u547d\u4ee4 <\/td>\n<td> PATH\u672a\u5305\u542bApache bin\u76ee\u5f55 <\/td>\n<\/tr>\n<tr>\n<td> 2148073478 <\/td>\n<td> SSL\u8bc1\u4e66\u8def\u5f84\u9519\u8bef <\/td>\n<td> \u68c0\u67e5SSLCertificateFile\u8def\u5f84 <\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p> \u793a\u4f8b\u4e8b\u4ef6\u65e5\u5fd7\u5185\u5bb9&#xff1a; <\/p>\n<p>Faulting application name: httpd.exe, Fault Code: 0xc0000135<\/p>\n<p> \u6b64\u4e3a\u7f3a\u5c11VC&#043;&#043;\u8fd0\u884c\u5e93\u6240\u81f4&#xff0c;\u9700\u5b89\u88c5Visual C&#043;&#043; Redistributable for Visual Studio 2015\u20132019 (x64)\u3002 <\/p>\n<h3> 6.3 \u5b8c\u6574\u90e8\u7f72\u6d41\u7a0b\u590d\u76d8\u4e0e\u6700\u4f73\u5b9e\u8df5\u63d0\u70bc <\/h3>\n<h4> 6.3.1 \u4ece\u89e3\u538b\u5230\u4e0a\u7ebf\u7684\u6807\u51c6\u5316\u64cd\u4f5c\u6e05\u5355 <\/h4>\n<p> \u6784\u5efa\u4e00\u5957\u53ef\u91cd\u590d\u6267\u884c\u7684\u90e8\u7f72checklist&#xff0c;\u63d0\u5347\u8fd0\u7ef4\u4e00\u81f4\u6027&#xff1a; <\/p>\n<table>\n<tr> \u6b65\u9aa4  \u64cd\u4f5c\u5185\u5bb9  \u9a8c\u8bc1\u65b9\u5f0f <\/tr>\n<tbody>\n<tr>\n<td> 1 <\/td>\n<td> \u4e0b\u8f7d\u5b98\u65b9zip\u5305\u5e76PGP\u6821\u9a8c <\/td>\n<td> SHA256\u5339\u914d\u5b98\u7f51\u503c <\/td>\n<\/tr>\n<tr>\n<td> 2 <\/td>\n<td> \u89e3\u538b\u81f3C:\\\\Apache24 <\/td>\n<td> \u76ee\u5f55\u7ed3\u6784\u5b8c\u6574 <\/td>\n<\/tr>\n<tr>\n<td> 3 <\/td>\n<td> \u4fee\u6539httpd.conf\u57fa\u7840\u53c2\u6570 <\/td>\n<td> ServerName\u3001Listen\u3001DocumentRoot <\/td>\n<\/tr>\n<tr>\n<td> 4 <\/td>\n<td> \u6ce8\u518c\u4e3a\u7cfb\u7edf\u670d\u52a1 <\/td>\n<td> sc query Apache2.4 \u663e\u793a\u5b58\u5728 <\/td>\n<\/tr>\n<tr>\n<td> 5 <\/td>\n<td> \u5f00\u542f\u9632\u706b\u5899\u7aef\u53e3 <\/td>\n<td> netsh advfirewall firewall show rule name&#061;\u201dApache\u201d <\/td>\n<\/tr>\n<tr>\n<td> 6 <\/td>\n<td> \u8bbe\u7f6e\u65e5\u5fd7\u8f6e\u8f6c <\/td>\n<td> \u786e\u8ba4logs\u76ee\u5f55\u6bcf\u65e5\u751f\u6210\u65b0\u6587\u4ef6 <\/td>\n<\/tr>\n<tr>\n<td> 7 <\/td>\n<td> \u6267\u884c\u5b89\u5168\u52a0\u56fa <\/td>\n<td> curl -I \u8fd4\u56deServer: Apache <\/td>\n<\/tr>\n<tr>\n<td> 8 <\/td>\n<td> \u6d4f\u89c8\u5668\u8bbf\u95ee\u6d4b\u8bd5 <\/td>\n<td> http:\/\/localhost \u663e\u793aIt works! <\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h4> 6.3.2 \u5f00\u53d1\u3001\u6d4b\u8bd5\u3001\u751f\u4ea7\u73af\u5883\u914d\u7f6e\u5dee\u5f02\u7ba1\u7406 <\/h4>\n<p> \u91c7\u7528\u5206\u5c42\u914d\u7f6e\u7b56\u7565&#xff1a; <\/p>\n<p>conf\/<br \/>\n\u251c\u2500\u2500 httpd.conf                 # \u516c\u5171\u57fa\u7840\u914d\u7f6e<br \/>\n\u251c\u2500\u2500 extra\/httpd-dev.conf       # \u5f00\u53d1\u73af\u5883\u7279\u6709&#xff08;\u5f00\u542f\u65e5\u5fd7\u8be6\u7ec6\u7ea7\u522b&#xff09;<br \/>\n\u251c\u2500\u2500 extra\/httpd-test.conf      # \u6d4b\u8bd5\u73af\u5883&#xff08;\u6a21\u62df\u8d1f\u8f7d\u5747\u8861\u4e0a\u6e38&#xff09;<br \/>\n\u2514\u2500\u2500 extra\/httpd-prod.conf      # \u751f\u4ea7\u73af\u5883&#xff08;\u5173\u95ed\u8c03\u8bd5\u3001\u542f\u7528\u538b\u7f29&#xff09;<\/p>\n<p> \u4e3b\u914d\u7f6e\u4e2d\u6839\u636e\u73af\u5883\u53d8\u91cf\u5f15\u5165&#xff1a; <\/p>\n<p>Define ENV dev<br \/>\n#Include conf\/extra\/httpd-${ENV}.conf<\/p>\n<p> \u5b9e\u9645\u90e8\u7f72\u65f6\u901a\u8fc7\u6279\u5904\u7406\u52a8\u6001\u66ff\u6362  ${ENV}  \u503c\u3002 <\/p>\n<h4> 6.3.3 \u6784\u5efa\u53ef\u91cd\u590d\u90e8\u7f72\u7684\u811a\u672c\u5316\u5b89\u88c5\u65b9\u6848&#xff08;BAT\/PowerShell&#xff09; <\/h4>\n<p> \u7f16\u5199\u81ea\u52a8\u5316\u90e8\u7f72\u811a\u672c&#xff0c;\u63d0\u5347\u6548\u7387\u4e0e\u51c6\u786e\u6027\u3002 <\/p>\n<p> PowerShell\u90e8\u7f72\u811a\u672c\u7247\u6bb5&#xff08;deploy-apache.ps1&#xff09;&#xff1a; <\/p>\n<p>$installPath &#061; &#034;C:\\\\Apache24&#034;<br \/>\n$httpd &#061; &#034;$installPath\\\\bin\\\\httpd.exe&#034;<\/p>\n<p># \u6ce8\u518c\u670d\u52a1<br \/>\n&amp; $httpd -k install -n &#034;Apache2.4&#034; -w<\/p>\n<p># \u542f\u52a8\u670d\u52a1<br \/>\nStart-Service -Name &#034;Apache2.4&#034;<\/p>\n<p># \u6dfb\u52a0\u9632\u706b\u5899\u89c4\u5219<br \/>\nNew-NetFirewallRule -DisplayName &#034;Apache HTTP&#034; -Direction Inbound &#096;<br \/>\n                    -Protocol TCP -LocalPort 80 -Action Allow<\/p>\n<p># \u6d4b\u8bd5\u54cd\u5e94<br \/>\n$response &#061; Invoke-WebRequest -Uri http:\/\/localhost -UseBasicParsing<br \/>\nif ($response.StatusCode -eq 200) {<br \/>\n    Write-Host &#034;Apache deployed successfully.&#034; -ForegroundColor Green<br \/>\n}<\/p>\n<p> \u8be5\u811a\u672c\u53ef\u7528\u4e8eCI\/CD\u6d41\u6c34\u7ebf\u4e2d\u7684\u73af\u5883\u521d\u59cb\u5316\u9636\u6bb5&#xff0c;\u7ed3\u5408Ansible\u6216Packer\u5b9e\u73b0\u8de8\u673a\u5668\u6279\u91cf\u90e8\u7f72\u3002 <\/p>\n<p>flowchart TD<br \/>\n    A[\u4e0b\u8f7dApache ZIP] &#8211;&gt; B[\u89e3\u538b\u81f3\u76ee\u6807\u8def\u5f84]<br \/>\n    B &#8211;&gt; C[\u4fee\u6539httpd.conf]<br \/>\n    C &#8211;&gt; D[\u6ce8\u518c\u4e3aWindows\u670d\u52a1]<br \/>\n    D &#8211;&gt; E[\u914d\u7f6e\u9632\u706b\u5899\u89c4\u5219]<br \/>\n    E &#8211;&gt; F[\u542f\u52a8\u670d\u52a1]<br \/>\n    F &#8211;&gt; G[\u6267\u884c\u5065\u5eb7\u68c0\u67e5]<br \/>\n    G &#8211;&gt; H[\u5e94\u7528\u5b89\u5168\u52a0\u56fa]<br \/>\n    H &#8211;&gt; I[\u8f93\u51fa\u90e8\u7f72\u62a5\u544a]<\/p>\n<p>  \u672c\u6587\u8fd8\u6709\u914d\u5957\u7684\u7cbe\u54c1\u8d44\u6e90&#xff0c;\u70b9\u51fb\u83b7\u53d6  <img decoding=\"async\" alt=\"menu-r.4af5f7ec.gif\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/07\/20260727114946-6a6745da2bf18.gif\" style=\"width:16px;margin-left:4px;vertical-align:text-bottom;cursor:text\" \/> <\/p>\n<p> \u7b80\u4ecb&#xff1a;Apache HTTP Server\u662f\u5168\u7403\u6700\u6d41\u884c\u7684Web\u670d\u52a1\u5668\u4e4b\u4e00&#xff0c;\u672c\u8d44\u6e90\u4e3a\u9002\u7528\u4e8e64\u4f4dWindows\u7cfb\u7edf\u7684Apache 2.4.29\u7a33\u5b9a\u7248\u672c\u5b89\u88c5\u5305&#xff0c;\u5305\u542b  readme_first.html  \u8bf4\u660e\u6587\u4ef6\u548c\u6838\u5fc3\u76ee\u5f55  Apache24  \u3002\u901a\u8fc7\u8be6\u7ec6\u7684\u5b89\u88c5\u6307\u5357\u3001\u914d\u7f6e\u6b65\u9aa4\u548c\u5e38\u89c1\u95ee\u9898\u89e3\u7b54&#xff0c;\u5e2e\u52a9\u7528\u6237\u5feb\u901f\u90e8\u7f72\u5e76\u8fd0\u884cApache\u670d\u52a1\u3002\u5185\u5bb9\u6db5\u76d6\u7cfb\u7edf\u9700\u6c42\u3001\u670d\u52a1\u542f\u505c\u3001httpd.conf\u914d\u7f6e\u3001\u9632\u706b\u5899\u8bbe\u7f6e\u53ca\u670d\u52a1\u6ce8\u518c\u7b49\u5173\u952e\u73af\u8282&#xff0c;\u9002\u5408\u521d\u5b66\u8005\u548c\u5f00\u53d1\u8005\u5728\u672c\u5730\u642d\u5efaWeb\u8fd0\u884c\u73af\u5883&#xff0c;\u652f\u6301\u540e\u7eed\u7f51\u7ad9\u4e0e\u5e94\u7528\u5f00\u53d1\u3002 <\/p>\n<p>   \u672c\u6587\u8fd8\u6709\u914d\u5957\u7684\u7cbe\u54c1\u8d44\u6e90&#xff0c;\u70b9\u51fb\u83b7\u53d6   <img decoding=\"async\" alt=\"menu-r.4af5f7ec.gif\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/07\/20260727114946-6a6745da2bf18.gif\" style=\"width:16px;margin-left:4px;vertical-align:text-bottom;cursor:text\" \/>  <\/p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u672c\u6587\u8fd8\u6709\u914d\u5957\u7684\u7cbe\u54c1\u8d44\u6e90&#xff0c;\u70b9\u51fb\u83b7\u53d6    \u7b80\u4ecb&#xff1a;Apache HTTP Server\u662f\u5168\u7403\u6700\u6d41\u884c\u7684Web\u670d\u52a1\u5668\u4e4b\u4e00&#xff0c;\u672c\u8d44\u6e90\u4e3a\u9002\u7528\u4e8e64\u4f4dWindows\u7cfb\u7edf\u7684Apache 2.4.29\u7a33\u5b9a\u7248\u672c\u5b89\u88c5\u5305&#xff0c;\u5305\u542b  readme_first.html  \u8bf4\u660e\u6587\u4ef6\u548c\u6838\u5fc3\u76ee\u5f55  Apache24  \u3002\u901a\u8fc7\u8be6\u7ec6\u7684\u5b89\u88c5\u6307\u5357\u3001\u914d\u7f6e\u6b65\u9aa4\u548c\u5e38\u89c1\u95ee\u9898\u89e3\u7b54&#xff0c;\u5e2e\u52a9\u7528\u6237\u5feb\u901f\u90e8\u7f72\u5e76\u8fd0\u884cApache\u670d\u52a1\u3002\u5185\u5bb9\u6db5\u76d6\u7cfb\u7edf\u9700\u6c42\u3001\u670d\u52a1\u542f\u505c\u3001httpd.<\/p>\n","protected":false},"author":2,"featured_media":85657,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"topic":[],"class_list":["post-85658","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-server"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Windows 64\u4f4d\u73af\u5883\u4e0bApache 2.4.29\u670d\u52a1\u5668\u5b89\u88c5\u4e0e\u914d\u7f6e\u5b9e\u6218\u5305 - \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\/85658.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Windows 64\u4f4d\u73af\u5883\u4e0bApache 2.4.29\u670d\u52a1\u5668\u5b89\u88c5\u4e0e\u914d\u7f6e\u5b9e\u6218\u5305 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"\u672c\u6587\u8fd8\u6709\u914d\u5957\u7684\u7cbe\u54c1\u8d44\u6e90&#xff0c;\u70b9\u51fb\u83b7\u53d6  \u7b80\u4ecb&#xff1a;Apache HTTP Server\u662f\u5168\u7403\u6700\u6d41\u884c\u7684Web\u670d\u52a1\u5668\u4e4b\u4e00&#xff0c;\u672c\u8d44\u6e90\u4e3a\u9002\u7528\u4e8e64\u4f4dWindows\u7cfb\u7edf\u7684Apache 2.4.29\u7a33\u5b9a\u7248\u672c\u5b89\u88c5\u5305&#xff0c;\u5305\u542b readme_first.html \u8bf4\u660e\u6587\u4ef6\u548c\u6838\u5fc3\u76ee\u5f55 Apache24 \u3002\u901a\u8fc7\u8be6\u7ec6\u7684\u5b89\u88c5\u6307\u5357\u3001\u914d\u7f6e\u6b65\u9aa4\u548c\u5e38\u89c1\u95ee\u9898\u89e3\u7b54&#xff0c;\u5e2e\u52a9\u7528\u6237\u5feb\u901f\u90e8\u7f72\u5e76\u8fd0\u884cApache\u670d\u52a1\u3002\u5185\u5bb9\u6db5\u76d6\u7cfb\u7edf\u9700\u6c42\u3001\u670d\u52a1\u542f\u505c\u3001httpd.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/85658.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2026-07-27T11:49:47+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/07\/20260727114946-6a6745da2bf18.gif\" \/>\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=\"23 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/85658.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/85658.html\",\"name\":\"Windows 64\u4f4d\u73af\u5883\u4e0bApache 2.4.29\u670d\u52a1\u5668\u5b89\u88c5\u4e0e\u914d\u7f6e\u5b9e\u6218\u5305 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2026-07-27T11:49:47+00:00\",\"dateModified\":\"2026-07-27T11:49:47+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/85658.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/85658.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/85658.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Windows 64\u4f4d\u73af\u5883\u4e0bApache 2.4.29\u670d\u52a1\u5668\u5b89\u88c5\u4e0e\u914d\u7f6e\u5b9e\u6218\u5305\"}]},{\"@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":"Windows 64\u4f4d\u73af\u5883\u4e0bApache 2.4.29\u670d\u52a1\u5668\u5b89\u88c5\u4e0e\u914d\u7f6e\u5b9e\u6218\u5305 - \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\/85658.html","og_locale":"zh_CN","og_type":"article","og_title":"Windows 64\u4f4d\u73af\u5883\u4e0bApache 2.4.29\u670d\u52a1\u5668\u5b89\u88c5\u4e0e\u914d\u7f6e\u5b9e\u6218\u5305 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"\u672c\u6587\u8fd8\u6709\u914d\u5957\u7684\u7cbe\u54c1\u8d44\u6e90&#xff0c;\u70b9\u51fb\u83b7\u53d6  \u7b80\u4ecb&#xff1a;Apache HTTP Server\u662f\u5168\u7403\u6700\u6d41\u884c\u7684Web\u670d\u52a1\u5668\u4e4b\u4e00&#xff0c;\u672c\u8d44\u6e90\u4e3a\u9002\u7528\u4e8e64\u4f4dWindows\u7cfb\u7edf\u7684Apache 2.4.29\u7a33\u5b9a\u7248\u672c\u5b89\u88c5\u5305&#xff0c;\u5305\u542b readme_first.html \u8bf4\u660e\u6587\u4ef6\u548c\u6838\u5fc3\u76ee\u5f55 Apache24 \u3002\u901a\u8fc7\u8be6\u7ec6\u7684\u5b89\u88c5\u6307\u5357\u3001\u914d\u7f6e\u6b65\u9aa4\u548c\u5e38\u89c1\u95ee\u9898\u89e3\u7b54&#xff0c;\u5e2e\u52a9\u7528\u6237\u5feb\u901f\u90e8\u7f72\u5e76\u8fd0\u884cApache\u670d\u52a1\u3002\u5185\u5bb9\u6db5\u76d6\u7cfb\u7edf\u9700\u6c42\u3001\u670d\u52a1\u542f\u505c\u3001httpd.","og_url":"https:\/\/www.wsisp.com\/helps\/85658.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2026-07-27T11:49:47+00:00","og_image":[{"url":"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/07\/20260727114946-6a6745da2bf18.gif"}],"author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"23 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/85658.html","url":"https:\/\/www.wsisp.com\/helps\/85658.html","name":"Windows 64\u4f4d\u73af\u5883\u4e0bApache 2.4.29\u670d\u52a1\u5668\u5b89\u88c5\u4e0e\u914d\u7f6e\u5b9e\u6218\u5305 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2026-07-27T11:49:47+00:00","dateModified":"2026-07-27T11:49:47+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/85658.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/85658.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/85658.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"Windows 64\u4f4d\u73af\u5883\u4e0bApache 2.4.29\u670d\u52a1\u5668\u5b89\u88c5\u4e0e\u914d\u7f6e\u5b9e\u6218\u5305"}]},{"@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\/85658","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=85658"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/85658\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media\/85657"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=85658"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=85658"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=85658"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=85658"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}