{"id":4853,"date":"2021-06-29T11:39:24","date_gmt":"2021-06-29T03:39:24","guid":{"rendered":"https:\/\/www.webteach.tw\/?p=4853"},"modified":"2021-06-29T11:39:24","modified_gmt":"2021-06-29T03:39:24","slug":"apache-%e7%92%b0%e5%a2%83%e8%ae%8a%e6%95%b8","status":"publish","type":"post","link":"https:\/\/www.webteach.tw\/?p=4853","title":{"rendered":"[ Apache ] &#8211; \u4fee\u6b63 Apache \u74b0\u5883\u8b8a\u6578"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">\u6700\u8fd1\u91cd\u555f Apache \u6642\u767c\u73fe apache2 \u6709\u932f\u8aa4\u8a0a\u606f Syntax error on line 80 of \/etc\/apache2\/apache2.conf: DefaultRuntimeDir must be a valid directory, absolute or relative to ServerRoot\uff0c\u96d6\u7136\u5c0d\u7db2\u7ad9\u57f7\u884c\u6c92\u6709\u4ec0\u9ebc\u554f\u984c\uff0c\u6709\u932f\u8aa4\u5c31\u5c31\u662f\u4e0d\u8212\u670d\uff1b\u5c31\u4e0a\u7db2\u722c\u722c\u6587\u627e\u89e3\u6cd5\u5982\u4e0b\u3002<\/p>\n\n\n<p class=\"wp-block-paragraph\">\u986f\u793aapache\u4f86\u6e90\u8cc7\u8a0a<br \/>\u6307\u4ee4\uff1aapache2 -S<\/p>\n\n\n<p class=\"wp-block-paragraph\">\u986f\u793a\u7d50\u679c<br \/>[Tue Jun 29 11:17:55.681925 2021] [core:warn] [pid 13720] AH00111: Config variable ${APACHE_RUN_DIR} is not defined<br \/>apache2: Syntax error on line 80 of \/etc\/apache2\/apache2.conf: DefaultRuntimeDir must be a valid directory, absolute or relative to ServerRoot<\/p>\n\n\n<p class=\"wp-block-paragraph\">\u4fee\u6b63\u74b0\u5883\u8b8a\u6578<br \/>\u6307\u4ee4\uff1asource \/etc\/apache2\/envvars<\/p>\n\n\n<p class=\"wp-block-paragraph\">\u986f\u793aapache\u4f86\u6e90\u8cc7\u8a0a<br \/>\u6307\u4ee4\uff1aapache2 -S<\/p>\n\n\n<p class=\"wp-block-paragraph\">\u986f\u793a\u7d50\u679c<br \/>VirtualHost configuration:<br \/>*:443 webteach.tw (\/etc\/apache2\/sites-enabled\/webteach.tw-ssl.conf:2)<br \/>*:80 is a NameVirtualHost<br \/>default server ip-172-31-27-1.ap-northeast-1.compute.internal (\/etc\/apache2\/sites-enabled\/000-default.conf:1)<br \/>port 80 namevhost ip-172-31-27-1.ap-northeast-1.compute.internal (\/etc\/apache2\/sites-enabled\/000-default.conf:1)<br \/>port 80 namevhost webteach.tw (\/etc\/apache2\/sites-enabled\/cdn.webteach.tw.conf:1)<br \/>alias cdn.webteach.tw<br \/>port 80 namevhost webteach.tw (\/etc\/apache2\/sites-enabled\/webteach.tw.conf:1)<br \/>alias www.webteach.tw<br \/>port 80 namevhost wpdemo.webteach.tw (\/etc\/apache2\/sites-enabled\/wpdemo.webteach.tw.conf:1)<br \/>alias wpdemo.webteach.tw<br \/>ServerRoot: &#8220;\/etc\/apache2&#8221;<br \/>Main DocumentRoot: &#8220;\/var\/www\/html&#8221;<br \/>Main ErrorLog: &#8220;\/var\/log\/apache2\/error.log&#8221;<br \/>Mutex watchdog-callback: using_defaults<br \/>Mutex rewrite-map: using_defaults<br \/>Mutex ssl-stapling-refresh: using_defaults<br \/>Mutex ssl-stapling: using_defaults<br \/>Mutex proxy: using_defaults<br \/>Mutex ssl-cache: using_defaults<br \/>Mutex default: dir=&#8221;\/var\/run\/apache2\/&#8221; mechanism=default<br \/>PidFile: &#8220;\/var\/run\/apache2\/apache2.pid&#8221;<br \/>Define: DUMP_VHOSTS<br \/>Define: DUMP_RUN_CFG<br \/>User: name=&#8221;www-data&#8221; id=33 not_used<br \/>Group: name=&#8221;www-data&#8221; id=33 not_used<\/p>\n\n\n<p class=\"wp-block-paragraph\">\u53c3\u8003\u9023\u7d50\uff1a<br \/><a href=\"https:\/\/qastack.cn\/ubuntu\/927355\/ubuntu-apache2-defaultruntimedir-must-be-a-valid-directory-absolute-or-relative\" target=\"_blank\" rel=\"noreferrer noopener\">https:\/\/qastack.cn\/ubuntu\/927355\/ubuntu-apache2-defaultruntimedir-must-be-a-valid-directory-absolute-or-relative<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6700\u8fd1\u91cd\u555f Apache \u6642\u767c\u73fe apache2 \u6709\u932f\u8aa4\u8a0a\u606f Syntax error on line 80 of \/etc\/apache2\/apache2.conf: DefaultRuntimeDir must be a valid directory, absolute or relative to ServerRoot\uff0c\u96d6\u7136\u5c0d\u7db2\u7ad9\u57f7\u884c\u6c92\u6709\u4ec0\u9ebc\u554f\u984c\uff0c\u6709\u932f\u8aa4\u5c31\u5c31\u662f\u4e0d\u8212\u670d\uff1b\u5c31\u4e0a\u7db2\u722c\u722c\u6587\u627e\u89e3\u6cd5\u5982\u4e0b\u3002<\/p>\n","protected":false},"author":1,"featured_media":4004,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[42,32],"tags":[109,110,370],"class_list":["post-4853","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-apache","category-linux","tag-apache","tag-apache-","tag-linux","hvn-theme-has-thumbnail"],"_links":{"self":[{"href":"https:\/\/www.webteach.tw\/index.php?rest_route=\/wp\/v2\/posts\/4853","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.webteach.tw\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.webteach.tw\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.webteach.tw\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.webteach.tw\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=4853"}],"version-history":[{"count":0,"href":"https:\/\/www.webteach.tw\/index.php?rest_route=\/wp\/v2\/posts\/4853\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.webteach.tw\/index.php?rest_route=\/wp\/v2\/media\/4004"}],"wp:attachment":[{"href":"https:\/\/www.webteach.tw\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=4853"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.webteach.tw\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=4853"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.webteach.tw\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=4853"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}