{"id":176,"date":"2020-04-23T14:20:42","date_gmt":"2020-04-23T06:20:42","guid":{"rendered":"http:\/\/iotch.xyz\/?p=176"},"modified":"2020-04-23T14:20:42","modified_gmt":"2020-04-23T06:20:42","slug":"ubuntu18%e6%97%a0%e6%b3%95%e5%90%af%e5%8a%a8apachejob-for-apache2-service-failed-because-the-control-process-exited-with-error-code","status":"publish","type":"post","link":"https:\/\/www.iotch.xyz\/?p=176","title":{"rendered":"ubuntu18\u65e0\u6cd5\u542f\u52a8ApacheJob for apache2.service failed because the control process exited with error code."},"content":{"rendered":"\n<p>\u6700\u8fd1\u5728\u5b8c\u6210Linux\u8bfe\u7a0b\u4f5c\u4e1a\uff1aLAMP\u6846\u67b6\u7684\u642d\u5efa\uff0c\u9047\u5230\u4e86\u4e00\u4e2a\u56f0\u6270\u4e86\u6211\u51e0\u5929\u7684\u95ee\u9898\uff1aApache2.4\u670d\u52a1\u5668\u65e0\u6cd5\u6b63\u5e38\u542f\u52a8\uff0c\u7ecf\u8fc7\u5404\u79cd\u767e\u5ea6\u548cbing\u641c\u7d22\uff0c\u7ec8\u4e8e\u89e3\u51b3\u4e86\u95ee\u9898\uff0c\u611f\u8c22\u8fd9\u6b21\u7ecf\u5386\u4f7f\u81ea\u5df1\u52a0\u6df1\u4e86\u5bf9ubuntu\u7684\u7406\u89e3\u3002<\/p>\n\n\n\n<p>1.\u9519\u8bef\u63cf\u8ff0\uff1a<\/p>\n\n\n\n<p>\u5f53\u6211\u542f\u52a8\u6216\u91cd\u542fApache2\u65f6\uff0c<\/p>\n\n\n\n<p>$ systemctl restart apache2<\/p>\n\n\n\n<p>\u51fa\u73b0\u5982\u4e0b\u9519\u8bef<\/p>\n\n\n\n<p>Job for apache2.service failed because the control process exited with error code.See \"systemctl status apache2.service\" and \"journalctl -xe\" for details.<\/p>\n\n\n\n<p>\u901a\u8fc7help\u67e5\u770b\u9519\u8bef<\/p>\n\n\n\n<p>apache2 --help<\/p>\n\n\n\n<p>\u663e\u793a\u9519\u8bef\u539f\u56e0\u662f<\/p>\n\n\n\n<p>(13)Permission denied: AH00072: make_sock: could not bind to address [::]:80(13)Permission denied: AH00072: make_sock: could not bind to address 0.0.0.0:80no listening sockets available, shutting downAH00015: Unable to open logs<\/p>\n\n\n\n<p>\u5927\u610f\u662f\u8bf4http\u534f\u8bae\u8981\u8c03\u7528\u768480\u7aef\u53e3\u88ab\u5360\u7528\u4e86,\u6211\u4eec\u53ef\u4ee5\u4fee\u6539\u7aef\u53e3\u4e3a8080\u3002\u540c\u65f6\u6211\u5728StackOverflow\u4e0a\u67e5\u5230\u4e86\u4e00\u7bc7\u89e3\u51b3\u6b64\u95ee\u9898\u7684\u6587\u7ae0\uff0c\u611f\u89c9\u7b54\u4e3b\u7684\u56de\u7b54\u5f88\u6709\u8da3\uff0c\u548c\u5927\u5bb6\u5206\u4eab\u4e00\u4e0bhttps:\/\/askubuntu.com\/questions\/338218\/why-am-i-getting-permission-denied-make-sock-could-not-bind-to-address-when<\/p>\n\n\n\n<p>\u89e3\u51b3\u529e\u6cd5\u4e3a<\/p>\n\n\n\n<p>sudo vim \/etc\/apache2\/ports.conf<\/p>\n\n\n\n<p>\u8fdb\u5165\u8bbe\u7f6e\u7aef\u53e3\u7684ports.conf\u6587\u4ef6,\u6587\u4ef6\u5185\u5bb9\u5982\u4e0b<\/p>\n\n\n\n<p>1# If you just change the port or add more ports here, you will likely also 2 # have to change the VirtualHost statement in 3 # \/etc\/apache2\/sites-enabled\/000-default.conf 4 5 Listen 8080 #\u5728\u6b64\u5904\u5c06\u539f\u7aef\u53e380\u6539\u4e3a\u4e868080 6 7 8 Listen 443 9 10 11 12 Listen 443 13 14 15 # vim: syntax=apache ts=4 sw=4 sts=4 sr noet<\/p>\n\n\n\n<p>\u4fdd\u5b58\u540e\u91cd\u542fapache2<\/p>\n\n\n\n<p>sudo \/etc\/init.d\/apache2 start<\/p>\n\n\n\n<p>\u6b63\u5e38\u542f\u52a8<\/p>\n\n\n\n<p class=\"has-text-color has-vivid-red-color\">[ ok ] Starting apache2 (via systemctl): apache2.service.<br>\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014<br>\u7248\u6743\u58f0\u660e\uff1a\u672c\u6587\u4e3aCSDN\u535a\u4e3b\u300cLudaner!\u300d\u7684\u539f\u521b\u6587\u7ae0\uff0c\u9075\u5faa CC 4.0 BY-SA \u7248\u6743\u534f\u8bae\uff0c\u8f6c\u8f7d\u8bf7\u9644\u4e0a\u539f\u6587\u51fa\u5904\u94fe\u63a5\u53ca\u672c\u58f0\u660e\u3002<br>\u539f\u6587\u94fe\u63a5\uff1a<a href=\"https:\/\/blog.csdn.net\/wlher\/java\/article\/details\/102734741\" target=\"_blank\" rel=\"noreferrer noopener\" rel=\"nofollow\" >https:\/\/blog.csdn.net\/wlher\/java\/article\/details\/102734741<\/a><\/p>\n<button class=\"simplefavorite-button\" data-postid=\"176\" data-siteid=\"1\" data-groupid=\"1\" data-favoritecount=\"0\" style=\"\">\u6536\u85cf <i class=\"sf-icon-star-empty\"><\/i><\/button>","protected":false},"excerpt":{"rendered":"<p>\u6700\u8fd1\u5728\u5b8c\u6210Linux\u8bfe\u7a0b\u4f5c\u4e1a\uff1aLAMP\u6846\u67b6\u7684\u642d\u5efa\uff0c\u9047\u5230\u4e86\u4e00\u4e2a\u56f0\u6270\u4e86\u6211\u51e0\u5929\u7684\u95ee\u9898\uff1aApache2.4\u670d\u52a1\u5668\u65e0\u6cd5\u6b63\u5e38\u542f\u52a8\uff0c\u7ecf\u8fc7\u5404\u79cd\u767e\u5ea6 &#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[11],"tags":[],"class_list":["post-176","post","type-post","status-publish","format-standard","hentry","category-11"],"_links":{"self":[{"href":"https:\/\/www.iotch.xyz\/index.php?rest_route=\/wp\/v2\/posts\/176","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.iotch.xyz\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.iotch.xyz\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.iotch.xyz\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.iotch.xyz\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=176"}],"version-history":[{"count":0,"href":"https:\/\/www.iotch.xyz\/index.php?rest_route=\/wp\/v2\/posts\/176\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.iotch.xyz\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=176"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.iotch.xyz\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=176"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.iotch.xyz\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=176"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}