{"id":63638,"date":"2025-04-29T16:03:08","date_gmt":"2025-04-29T08:03:08","guid":{"rendered":"https:\/\/fwq.ai\/blog\/63638\/"},"modified":"2025-04-29T16:03:08","modified_gmt":"2025-04-29T08:03:08","slug":"apache%e6%80%8e%e4%b9%88%e5%90%af%e5%8a%a8-2","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/63638\/","title":{"rendered":"apache\u600e\u4e48\u542f\u52a8"},"content":{"rendered":"<blockquote><p>\n  \u542f\u52a8 apache \u7684\u6b65\u9aa4\u5982\u4e0b\uff1a\u5b89\u88c5 apache\uff08\u547d\u4ee4\uff1asudo apt-get install apache2 \u6216\u4ece\u5b98\u7f51\u4e0b\u8f7d\uff09\u542f\u52a8 apache\uff08linux\uff1asudo systemctl start apache2\uff1bwindows\uff1a\u53f3\u952e\u201capache2.4\u201d\u670d\u52a1\u5e76\u9009\u62e9\u201c\u542f\u52a8\u201d\uff09\u68c0\u67e5\u662f\u5426\u5df2\u542f\u52a8\uff08linux\uff1asudo systemctl status apache2\uff1bwindows\uff1a\u67e5\u770b\u670d\u52a1\u7ba1\u7406\u5668\u4e2d\u201capache2.4\u201d\u670d\u52a1\u7684\u72b6\u6001\uff09\u542f\u7528\u5f00\u673a\u81ea\u52a8\u542f\u52a8\uff08\u53ef\u9009\uff0clinux\uff1asudo systemctl\n<\/p><\/blockquote>\n<p><img decoding=\"async\" src=\"https:\/\/img.php.cn\/upload\/article\/202406\/03\/2024060318514590029.jpg\" class=\"aligncenter\" title=\"apache\u600e\u4e48\u542f\u52a8\u63d2\u56fe\" alt=\"apache\u600e\u4e48\u542f\u52a8\u63d2\u56fe\" \/><\/p>\n<p><strong>\u5982\u4f55\u542f\u52a8 Apache<\/strong><\/p>\n<p>Apache \u662f\u4e00\u4e2a\u6d41\u884c\u7684 Web \u670d\u52a1\u5668\uff0c\u53ef\u7528\u4e8e\u5728 Web \u4e0a\u6258\u7ba1\u7f51\u7ad9\u548c\u5e94\u7528\u7a0b\u5e8f\u3002\u542f\u52a8 Apache \u7684\u6b65\u9aa4\u5982\u4e0b\uff1a<\/p>\n<p><strong>\u6b65\u9aa4 1\uff1a\u5b89\u88c5 Apache<\/strong><\/p>\n<ul>\n<li>\n<p>\u5728 Linux \u7cfb\u7edf\u4e0a\uff0c\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u5b89\u88c5 Apache\uff1a<\/p>\n<pre>sudo apt-get install apache2<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/li>\n<li>\u5728 Windows \u7cfb\u7edf\u4e0a\uff0c\u4ece Apache \u5b98\u7f51\u4e0b\u8f7d\u5e76\u5b89\u88c5 Apache\u3002<\/li>\n<\/ul>\n<p><strong>\u6b65\u9aa4 2\uff1a\u542f\u52a8 Apache<\/strong><\/p>\n<ul>\n<li>\n<p><strong>Linux \u7cfb\u7edf\uff1a<\/strong>\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u542f\u52a8 Apache\uff1a<\/p>\n<pre>sudo systemctl start apache2<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/li>\n<li>\n<p><strong>Windows \u7cfb\u7edf\uff1a<\/strong><\/p>\n<ol>\n<li>\u6253\u5f00\u670d\u52a1\u7ba1\u7406\u5668\uff08services.msc\uff09\u3002<\/li>\n<li>\u627e\u5230\u201cApache2.4\u201d\u670d\u52a1\u3002<\/li>\n<li>\u53f3\u952e\u5355\u51fb\u5e76\u9009\u62e9\u201c\u542f\u52a8\u201d\u3002<\/li>\n<\/ol>\n<\/li>\n<\/ul>\n<p><strong>\u6b65\u9aa4 3\uff1a\u68c0\u67e5\u662f\u5426\u5df2\u542f\u52a8<\/strong><\/p>\n<ul>\n<li>\n<p><strong>Linux \u7cfb\u7edf\uff1a<\/strong>\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u68c0\u67e5 Apache \u662f\u5426\u5df2\u542f\u52a8\uff1a<\/p>\n<pre>sudo systemctl status apache2<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/li>\n<li> <strong>Windows \u7cfb\u7edf\uff1a<\/strong>\u5728\u670d\u52a1\u7ba1\u7406\u5668\u4e2d\uff0c\u67e5\u770b\u201cApache2.4\u201d\u670d\u52a1\u7684\u72b6\u6001\u662f\u5426\u663e\u793a\u4e3a\u201c\u6b63\u5728\u8fd0\u884c\u201d\u3002<\/li>\n<\/ul>\n<p><strong>\u6b65\u9aa4 4\uff1a\u542f\u7528\u5f00\u673a\u81ea\u52a8\u542f\u52a8\uff08\u53ef\u9009\uff09<\/strong><\/p>\n<ul>\n<li>\n<p><strong>Linux \u7cfb\u7edf\uff1a<\/strong>\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u542f\u7528 Apache \u5f00\u673a\u81ea\u52a8\u542f\u52a8\uff1a<\/p>\n<pre>sudo systemctl enable apache2<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/li>\n<li>\n<p><strong>Windows \u7cfb\u7edf\uff1a<\/strong><\/p>\n<ol>\n<li>\u5728\u670d\u52a1\u7ba1\u7406\u5668\u4e2d\uff0c\u53f3\u952e\u5355\u51fb\u201cApache2.4\u201d\u670d\u52a1\u3002<\/li>\n<li>\u9009\u62e9\u201c\u5c5e\u6027\u201d\u3002<\/li>\n<li>\u5728\u201c\u542f\u52a8\u7c7b\u578b\u201d\u4e0b\u62c9\u83dc\u5355\u4e2d\uff0c\u9009\u62e9\u201c\u81ea\u52a8\u201d\u3002<\/li>\n<li>\u5355\u51fb\u201c\u786e\u5b9a\u201d\u3002<\/li>\n<\/ol>\n<\/li>\n<\/ul>\n<p><strong>\u63d0\u793a\uff1a<\/strong><\/p>\n<ul>\n<li>Apache \u7684\u9ed8\u8ba4\u7aef\u53e3\u4e3a 80\u3002<\/li>\n<li>\u5982\u679c\u60a8\u5df2\u5b89\u88c5\u4e86\u9632\u706b\u5899\uff0c\u8bf7\u786e\u4fdd\u5df2\u6253\u5f00 80 \u7aef\u53e3\u3002<\/li>\n<li>\u5982\u679c\u60a8\u5728\u542f\u52a8 Apache \u65f6\u9047\u5230\u95ee\u9898\uff0c\u8bf7\u68c0\u67e5\u9519\u8bef\u65e5\u5fd7\uff08\u901a\u5e38\u4f4d\u4e8e \/var\/log\/2\/error.log \u6216 %APACHE_HOME%logserror.log\uff09\u3002<\/li>\n<\/ul>\n<p>\u4ee5\u4e0a\u5c31\u662f\u600e\u4e48\u542f\u52a8\u7684\u8be6\u7ec6\u5185\u5bb9\uff0c\u66f4\u591a\u8bf7\u5173\u6ce8FDCServers\u5176\u5b83\u76f8\u5173\u6587\u7ae0\uff01<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u542f\u52a8 apache \u7684\u6b65\u9aa4\u5982\u4e0b\uff1a\u5b89\u88c5 apache\uff08\u547d\u4ee4\uff1asudo apt-get install apache2 \u6216\u4ece\u5b98\u7f51\u4e0b\u8f7d\uff09\u542f\u52a8 apache\uff08linux\uff1asudo systemctl start apache2\uff1bwindows\uff1a\u53f3\u952e\u201capache2.4\u201d\u670d\u52a1\u5e76\u9009\u62e9\u201c\u542f\u52a8\u201d\uff09\u68c0\u67e5\u662f\u5426\u5df2\u542f\u52a8\uff08linux\uff1asudo systemctl status apache2\uff1bwindows\uff1a\u67e5\u770b\u670d\u52a1\u7ba1\u7406\u5668\u4e2d\u201capache2.4\u201d\u670d\u52a1\u7684\u72b6\u6001\uff09\u542f\u7528\u5f00\u673a\u81ea\u52a8\u542f\u52a8\uff08\u53ef\u9009\uff0clinux\uff1asudo systemctl \u5982\u4f55\u542f\u52a8 Apache Apache \u662f\u4e00\u4e2a\u6d41\u884c\u7684 Web \u670d\u52a1\u5668\uff0c\u53ef\u7528\u4e8e\u5728 Web \u4e0a\u6258\u7ba1\u7f51\u7ad9\u548c\u5e94\u7528\u7a0b\u5e8f\u3002\u542f\u52a8 Apache \u7684\u6b65\u9aa4\u5982\u4e0b\uff1a \u6b65\u9aa4 1\uff1a\u5b89\u88c5 Apache \u5728 Linux \u7cfb\u7edf\u4e0a\uff0c\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u5b89\u88c5 Apache\uff1a sudo apt-get install apache2 \u767b\u5f55\u540e\u590d\u5236 \u5728 Windows \u7cfb\u7edf\u4e0a\uff0c\u4ece Apache \u5b98\u7f51\u4e0b\u8f7d\u5e76\u5b89\u88c5 Apache\u3002 \u6b65\u9aa4 2\uff1a\u542f\u52a8 Apache Linux \u7cfb\u7edf\uff1a\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u542f\u52a8 Apache\uff1a sudo systemctl start apache2 \u767b\u5f55\u540e\u590d\u5236 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8],"tags":[],"class_list":["post-63638","post","type-post","status-publish","format-standard","hentry","category-os"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/63638","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/comments?post=63638"}],"version-history":[{"count":0,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/63638\/revisions"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=63638"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=63638"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=63638"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}