{"id":63599,"date":"2025-04-29T16:22:04","date_gmt":"2025-04-29T08:22:04","guid":{"rendered":"https:\/\/fwq.ai\/blog\/63599\/"},"modified":"2025-04-29T16:22:04","modified_gmt":"2025-04-29T08:22:04","slug":"apache%e6%9c%8d%e5%8a%a1%e5%99%a8%e6%80%8e%e4%b9%88%e9%87%8d%e5%90%af-2","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/63599\/","title":{"rendered":"apache\u670d\u52a1\u5668\u600e\u4e48\u91cd\u542f"},"content":{"rendered":"<blockquote><p>\n  \u8981\u91cd\u542f apache \u670d\u52a1\u5668\uff0c\u8bf7\u6309\u7167\u4ee5\u4e0b\u6b65\u9aa4\u64cd\u4f5c\uff1alinux\/macos\uff1a\u8fd0\u884c sudo systemctl restart apache2\u3002windows\uff1a\u8fd0\u884c net stop apache2.4 \u7136\u540e net start apache2.4\u3002\u8fd0\u884c netstat -a | findstr 80 \u68c0\u67e5\u670d\u52a1\u5668\u72b6\u6001\u3002\n<\/p><\/blockquote>\n<p><img decoding=\"async\" src=\"https:\/\/img.php.cn\/upload\/article\/202405\/29\/2024052917571680739.jpg\" class=\"aligncenter\" title=\"apache\u670d\u52a1\u5668\u600e\u4e48\u91cd\u542f\u63d2\u56fe\" alt=\"apache\u670d\u52a1\u5668\u600e\u4e48\u91cd\u542f\u63d2\u56fe\" \/><\/p>\n<p><strong>\u5982\u4f55\u91cd\u542f Apache \u670d\u52a1\u5668<\/strong><\/p>\n<p>\u8981\u91cd\u542f Apache \u670d\u52a1\u5668\uff0c\u8bf7\u6309\u7167\u4ee5\u4e0b\u6b65\u9aa4\u64cd\u4f5c\uff1a<\/p>\n<p><strong>Linux \u548c macOS<\/strong><\/p>\n<ol>\n<li>\u4ee5 root \u7528\u6237\u8eab\u4efd\u6216\u901a\u8fc7\u4f7f\u7528 sudo \u547d\u4ee4\u8f93\u5165\u7ec8\u7aef\u3002<\/li>\n<li>\u8fd0\u884c\u4ee5\u4e0b\u547d\u4ee4\uff1a<\/li>\n<\/ol>\n<pre>sudo systemctl restart apache2<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p><strong>Windows<\/strong><\/p>\n<ol>\n<li>\u6253\u5f00\u547d\u4ee4\u63d0\u793a\u7b26\u6216 PowerShell\u3002<\/li>\n<li>\u8f93\u5165\u4ee5\u4e0b\u547d\u4ee4\uff1a<\/li>\n<\/ol>\n<pre>net stop Apache2.4\nnet start Apache2.4<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p><strong>\u66f4\u591a\u4fe1\u606f<\/strong><\/p>\n<ul>\n<li> <strong>\u4f7f\u7528 systemd\uff1a<\/strong>systemctl restart 2 \u547d\u4ee4\u4f7f\u7528 systemd \u91cd\u65b0\u542f\u52a8 Apache \u670d\u52a1\u3002<\/li>\n<li> <strong>\u4f7f\u7528 service \u547d\u4ee4\uff1a<\/strong>service apache2 restart \u547d\u4ee4\u5728 Debian\/Ubuntu \u7b49\u8f83\u65e7\u7684 Linux \u53d1\u884c\u7248\u4e0a\u91cd\u65b0\u542f\u52a8 Apache \u670d\u52a1\u3002<\/li>\n<li> <strong>\u5728 Windows \u4e0a\u505c\u6b62\u548c\u542f\u52a8\u670d\u52a1\uff1a<\/strong>net stop \u548c net start \u547d\u4ee4\u7528\u4e8e\u5728 Windows \u4e0a\u505c\u6b62\u548c\u542f\u52a8\u670d\u52a1\u3002Apache2.4 \u662f Apache \u670d\u52a1\u5728 Windows \u4e0a\u7684\u9ed8\u8ba4\u540d\u79f0\u3002<\/li>\n<\/ul>\n<p>\u91cd\u65b0\u542f\u52a8 Apache \u670d\u52a1\u5668\u540e\uff0c\u60a8\u9700\u8981\u68c0\u67e5\u5b83\u662f\u5426\u6b63\u5728\u8fd0\u884c\uff1a<\/p>\n<p><strong>Linux \u548c macOS<\/strong><\/p>\n<pre>sudo systemctl status apache2<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p><strong>Windows<\/strong><\/p>\n<pre>netstat -a | findstr 80<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p>\u5982\u679c\u670d\u52a1\u5668\u6b63\u5728\u8fd0\u884c\uff0c\u60a8\u5c06\u770b\u5230\u4e0e\u7aef\u53e3 80 \u76f8\u5173\u7684\u6761\u76ee\uff0c\u8fd9\u662f Apache \u9ed8\u8ba4\u76d1\u542c\u7684\u7aef\u53e3\u3002<\/p>\n<p>\u4ee5\u4e0a\u5c31\u662f\u670d\u52a1\u5668\u600e\u4e48\u91cd\u542f\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>\u8981\u91cd\u542f apache \u670d\u52a1\u5668\uff0c\u8bf7\u6309\u7167\u4ee5\u4e0b\u6b65\u9aa4\u64cd\u4f5c\uff1alinux\/macos\uff1a\u8fd0\u884c sudo systemctl restart apache2\u3002windows\uff1a\u8fd0\u884c net stop apache2.4 \u7136\u540e net start apache2.4\u3002\u8fd0\u884c netstat -a | findstr 80 \u68c0\u67e5\u670d\u52a1\u5668\u72b6\u6001\u3002 \u5982\u4f55\u91cd\u542f Apache \u670d\u52a1\u5668 \u8981\u91cd\u542f Apache \u670d\u52a1\u5668\uff0c\u8bf7\u6309\u7167\u4ee5\u4e0b\u6b65\u9aa4\u64cd\u4f5c\uff1a Linux \u548c macOS \u4ee5 root \u7528\u6237\u8eab\u4efd\u6216\u901a\u8fc7\u4f7f\u7528 sudo \u547d\u4ee4\u8f93\u5165\u7ec8\u7aef\u3002 \u8fd0\u884c\u4ee5\u4e0b\u547d\u4ee4\uff1a sudo systemctl restart apache2 \u767b\u5f55\u540e\u590d\u5236 Windows \u6253\u5f00\u547d\u4ee4\u63d0\u793a\u7b26\u6216 PowerShell\u3002 \u8f93\u5165\u4ee5\u4e0b\u547d\u4ee4\uff1a net stop Apache2.4 net start Apache2.4 \u767b\u5f55\u540e\u590d\u5236 \u66f4\u591a\u4fe1\u606f \u4f7f\u7528 systemd\uff1asystemctl restart [&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-63599","post","type-post","status-publish","format-standard","hentry","category-os"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/63599","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=63599"}],"version-history":[{"count":0,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/63599\/revisions"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=63599"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=63599"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=63599"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}