{"id":3895,"date":"2025-05-15T07:54:34","date_gmt":"2025-05-14T22:54:34","guid":{"rendered":"https:\/\/www.dogrow.net\/linux\/?p=3895"},"modified":"2025-05-15T23:26:03","modified_gmt":"2025-05-15T14:26:03","slug":"blog168-%e3%80%90%e8%a7%a3%e6%b1%ba%e3%80%91ubuntu-22-04%e2%86%9224-04%e3%81%ab%e6%9b%b4%e6%96%b0%e3%81%97%e3%81%9f%e3%82%89apache2%e3%81%8c%e5%8b%95%e3%81%8b%e3%81%aa%e3%81%8f%e3%81%aa%e3%81%a3","status":"publish","type":"post","link":"https:\/\/www.dogrow.net\/linux\/blog168-%e3%80%90%e8%a7%a3%e6%b1%ba%e3%80%91ubuntu-22-04%e2%86%9224-04%e3%81%ab%e6%9b%b4%e6%96%b0%e3%81%97%e3%81%9f%e3%82%89apache2%e3%81%8c%e5%8b%95%e3%81%8b%e3%81%aa%e3%81%8f%e3%81%aa%e3%81%a3\/","title":{"rendered":"(168) \u3010\u89e3\u6c7a\u3011Ubuntu 22.04\u219224.04\u306b\u66f4\u65b0\u3057\u305f\u3089Apache2\u304c\u52d5\u304b\u306a\u304f\u306a\u3063\u305f\u3002"},"content":{"rendered":"<h1 class=\"my_h\">\u554f\u984c\u767a\u751f<\/h1>\n<p>\u81ea\u5b85\u30b5\u30fc\u30d0\u306e OS\u3092 Ubuntu22.04\u304b\u3089 24.04\u306b\u30a2\u30c3\u30d7\u30b0\u30ec\u30fc\u30c9\u3057\u305f\u3002<\/p>\n<p>\u3059\u308b\u3068&#8230;<br \/>\n\u3053\u306e\u30b5\u30fc\u30d0\u306b\u7f6e\u3044\u3066\u3042\u308b <span class=\"my_fc_redBBig\">Web\u30b5\u30a4\u30c8\u306b\u30a2\u30af\u30bb\u30b9\u3067\u304d\u306a\u304f\u306a\u3063\u305f\u3002<\/span><\/p>\n<h1 class=\"my_h\">\u539f\u56e0\u8abf\u67fb\uff06\u5bfe\u7b56<\/h1>\n<p>Apache2\u306e\u72b6\u614b\u3092\u78ba\u8a8d\u3059\u308b\u3002<\/p>\n<pre class=\"my_pre_bgBlack\">\r\n$ <span class=\"my_fc_yellow\">sudo systemctl status apache2<\/span>\r\n\u00d7 apache2.service - The Apache HTTP Server\r\n     Loaded: loaded (\/usr\/lib\/systemd\/system\/apache2.service; enabled; preset: enabled)\r\n     Active: <span class=\"my_fc_red\">failed<\/span> (Result: exit-code) since Thu 2025-05-15 06:56:41 JST; 3min 53s ago\r\n       Docs: https:\/\/httpd.apache.org\/docs\/2.4\/\r\n    Process: 1041 ExecStart=\/usr\/sbin\/apachectl start (code=exited, status=1\/FAILURE)\r\n        CPU: 14ms\r\n\r\n 5\u6708 15 06:56:41 systemd[1]: Starting apache2.service - The Apache HTTP Server...\r\n 5\u6708 15 06:56:41 apachectl[1081]: apache2: <span class=\"my_fc_red\">Syntax error on line 146 of \/etc\/apache2\/apache2.conf: Syntax error on line 3 of \/etc\/apache2&gt;<\/span>\r\n 5\u6708 15 06:56:41 systemd[1]: apache2.service: Control process exited, code=exited, status=1\/FAILURE\r\n 5\u6708 15 06:56:41 systemd[1]: apache2.service: Failed with result 'exit-code'.\r\n 5\u6708 15 06:56:41 systemd[1]: Failed to start apache2.service - The Apache HTTP Server.\r\n<\/pre>\n<p><span class=\"my_fc_red\">Syntax error on line 146 of \/etc\/apache2\/apache2.conf<\/span><br \/>\n\u3068\u306e\u3053\u3068\u3002<\/p>\n<p>\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u304c\u66f8\u304d\u63db\u3048\u3089\u308c\u305f\u306e\u304b\uff1f<br \/>\n\u305d\u308c\u3068\u3082\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u306b\u66f8\u304b\u308c\u3066\u3044\u308b\u30ea\u30f3\u30af\u5148\u304c\u6d88\u3048\u305f\u308a\u3057\u305f\u306e\u304b\uff1f<\/p>\n<p>\u30a8\u30e9\u30fc\u30ed\u30b0\u3092\u898b\u3066\u307f\u308b\u3053\u3068\u306b\u3059\u308b\u3002<\/p>\n<pre class=\"my_pre_bgBlack\">\r\n$ <span class=\"my_fc_yellow\">sudo journalctl -u apache2.service -b<\/span>\r\n<\/pre>\n<pre class=\"my_pre_bgBlack\">\r\n 5\u6708 15 06:56:41 systemd[1]: Starting apache2.service - The Apache HTTP Server...\r\n 5\u6708 15 06:56:41 apachectl[1081]: apache2: Syntax error on line 146 of \/etc\/apache2\/apache2.conf:\r\n Syntax error on line 3 of \/etc\/apache2\/mods-enabled\/php8.1.load: <span class=\"my_fc_red\">Cannot load \/usr\/lib\/apache2\/modules\/libphp8.1.so<\/span> &gt;\r\n 5\u6708 15 06:56:41 systemd[1]: apache2.service: Control process exited, code=exited, status=1\/FAILURE\r\n 5\u6708 15 06:56:41 systemd[1]: apache2.service: Failed with result 'exit-code'.\r\n 5\u6708 15 06:56:41 systemd[1]: Failed to start apache2.service - The Apache HTTP Server.\r\n<\/pre>\n<p>\u539f\u56e0\u306f <span class=\"my_fc_blue\">libphp8.1.so<\/span> \u304c\u30ed\u30fc\u30c9\u3067\u304d\u306a\u3044\u3068\u306e\u3053\u3068\u3002<br \/>\nOS Update\u3067 PHP\u30d0\u30fc\u30b8\u30e7\u30f3\u304c\u5165\u308c\u66ff\u308f\u3063\u305f\u306e\u304b\uff1f<\/p>\n<p>PHP\u30d0\u30fc\u30b8\u30e7\u30f3\u3092\u78ba\u8a8d\u3057\u3066\u307f\u308b\u3002<\/p>\n<pre class=\"my_pre_bgBlack\">\r\n$ <span class=\"my_fc_yellow\">php -v<\/span>\r\nPHP 8.3.6 (cli) (built: Mar 19 2025 10:08:38) (NTS)\r\nCopyright (c) The PHP Group\r\nZend Engine v4.3.6, Copyright (c) Zend Technologies\r\n    with Zend OPcache v8.3.6, Copyright (c), by Zend Technologies\r\n<\/pre>\n<p>PHP8.3\u306b\u30a2\u30c3\u30d7\u30b0\u30ec\u30fc\u30c9\u3055\u308c\u3066\u3044\u308b\u3002<br \/>\nApach2\u306e\u8a2d\u5b9a\u3082\u3053\u308c\u306b\u5408\u308f\u305b\u3066\u5909\u66f4\u3059\u308b\u3002<\/p>\n<pre class=\"my_pre_bgBlack\">\r\n$ <span class=\"my_fc_yellow\">sudo a2dismod php8.1<\/span>                     # \u53e4\u3044\u30e2\u30b8\u30e5\u30fc\u30eb\u3092\u7121\u52b9\u5316\r\n$ <span class=\"my_fc_yellow\">sudo apt install libapache2-mod-php8.3<\/span>   # Apache2\u7528PHP8.3\u30e2\u30b8\u30e5\u30fc\u30eb\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb \r\n$ <span class=\"my_fc_yellow\">sudo a2enmod php8.3<\/span>                      # \u65b0\u3057\u3044\u30e2\u30b8\u30e5\u30fc\u30eb\u3092\u6709\u52b9\u5316\r\n<\/pre>\n<p>\u65b0\u3057\u3044\u8a2d\u5b9a\u3067\u554f\u984c\u306a\u3044\u304b\uff1f<\/p>\n<pre class=\"my_pre_bgBlack\">\r\n$ <span class=\"my_fc_yellow\">sudo apachectl configtest<\/span>\r\nSyntax OK\r\n<\/pre>\n<p>OK\u3060\uff01<br \/>\nApache2\u3092\u518d\u8d77\u52d5\u3057\u3001\u72b6\u614b\u3092\u78ba\u8a8d\u3059\u308b\u3002<\/p>\n<pre class=\"my_pre_bgBlack\">\r\n$ <span class=\"my_fc_yellow\">sudo systemctl restart apache2<\/span>\r\n$ <span class=\"my_fc_yellow\">sudo systemctl status apache2<\/span>\r\n\u25cf apache2.service - The Apache HTTP Server\r\n     Loaded: loaded (\/usr\/lib\/systemd\/system\/apache2.service; enabled; preset: enabled)\r\n     Active: <span style=\"color:#0F0\">active (running)<\/span> since Thu 2025-05-15 07:04:54 JST; 8s ago\r\n       Docs: https:\/\/httpd.apache.org\/docs\/2.4\/\r\n    Process: 4253 ExecStart=\/usr\/sbin\/apachectl start (code=exited, status=0\/SUCCESS)\r\n      Tasks: 28 (limit: 19103)\r\n     Memory: 33.8M (peak: 40.3M)\r\n        CPU: 144ms\r\n     CGroup: \/system.slice\/apache2.service\r\n             \u251c\u25004283 \/usr\/sbin\/apache2 -k start\r\n             \u251c\u25004287 \"Passenger watchdog\"\r\n             \u251c\u25004290 \"Passenger core\"\r\n             \u251c\u25004311 \/usr\/sbin\/apache2 -k start\r\n             \u251c\u25004312 \/usr\/sbin\/apache2 -k start\r\n             \u251c\u25004313 \/usr\/sbin\/apache2 -k start\r\n             \u251c\u25004314 \/usr\/sbin\/apache2 -k start\r\n             \u2514\u25004315 \/usr\/sbin\/apache2 -k start\r\n\r\n 5\u6708 15 07:04:53 systemd[1]: Starting apache2.service - The Apache HTTP Server...\r\n 5\u6708 15 07:04:54 systemd[1]: Started apache2.service - The Apache HTTP Server.\r\n<\/pre>\n<p>OK\u3060\uff01<br \/>\n\u6b63\u5e38\u306b\u8d77\u52d5\u3059\u308b\u3088\u3046\u306b\u306a\u3063\u305f\u3002<br \/>\nWeb\u30d6\u30e9\u30a6\u30b6\u304b\u3089\u306e\u30a2\u30af\u30bb\u30b9\u3082OK\u3060\uff01<\/p>\n<h1 class=\"my_h\">Subversion\u306b\u3082\u7e4b\u3052\u306a\u304f\u306a\u3063\u3066\u3044\u305f&#8230;<\/h1>\n<p>\u52dd\u624b\u306b config\u30d5\u30a1\u30a4\u30eb\u304c\u66f8\u304d\u63db\u3048\u3089\u308c\u3066\u3044\u305f\u3088\u3046\u3060\u3002<br \/>\n\u3053\u308c\u3082\u76f4\u3059\u3002<\/p>\n<pre class=\"my_pre_bgBlack\">\r\n$ <span class=\"my_fc_yellow\">sudo vi \/etc\/apache2\/mods-available\/dav_svn.conf<\/span>\r\n<\/pre>\n<p>\u307e\u308b\u3054\u3068\u6d88\u3048\u3066\u3044\u305f\u306e\u3067\u3001https:\/\/???.???.???.???\/svn\/ \u306e\u30a2\u30af\u30bb\u30b9\u5148\u3092\u518d\u8a2d\u5b9a\u3059\u308b\u3002<\/p>\n<pre class=\"my_pre\">\r\n&lt;Location \/svn&gt;\r\n  DAV svn\r\n  SVNParentPath \/var\/svn\/repos\r\n&lt;\/Location&gt;\r\n<\/pre>\n<p>Apache2\u3092\u518d\u8d77\u52d5\u3059\u308b\u3002<\/p>\n<pre class=\"my_pre_bgBlack\">\r\n$ <span class=\"my_fc_yellow\">sudo systemctl restart apache2<\/span>\r\n<\/pre>\n<p>Subversion\u3082\u4f7f\u3048\u308b\u3088\u3046\u306b\u306a\u3063\u305f\u3002<\/p>\n<hr class=\"my_hr_bottom\">\n","protected":false},"excerpt":{"rendered":"<p>\u554f\u984c\u767a\u751f \u81ea\u5b85\u30b5\u30fc\u30d0\u306e OS\u3092 Ubuntu22.04\u304b\u3089 24.04\u306b\u30a2\u30c3\u30d7\u30b0\u30ec\u30fc\u30c9\u3057\u305f\u3002 \u3059\u308b\u3068&#8230; \u3053\u306e\u30b5\u30fc\u30d0\u306b\u7f6e\u3044\u3066\u3042\u308b Web\u30b5\u30a4\u30c8\u306b\u30a2\u30af\u30bb\u30b9\u3067\u304d\u306a\u304f\u306a\u3063\u305f\u3002 \u539f\u56e0\u8abf\u67fb\uff06\u5bfe\u7b56 Apache2\u306e\u72b6\u614b\u3092\u78ba\u2026 <span class=\"read-more\"><a href=\"https:\/\/www.dogrow.net\/linux\/blog168-%e3%80%90%e8%a7%a3%e6%b1%ba%e3%80%91ubuntu-22-04%e2%86%9224-04%e3%81%ab%e6%9b%b4%e6%96%b0%e3%81%97%e3%81%9f%e3%82%89apache2%e3%81%8c%e5%8b%95%e3%81%8b%e3%81%aa%e3%81%8f%e3%81%aa%e3%81%a3\/\">\u7d9a\u304d\u3092\u8aad\u3080 &raquo;<\/a><\/span><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[57,24,89],"tags":[],"class_list":["post-3895","post","type-post","status-publish","format-standard","hentry","category-apache","category-subversion","category-ubuntu"],"views":1467,"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/www.dogrow.net\/linux\/wp-json\/wp\/v2\/posts\/3895","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.dogrow.net\/linux\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.dogrow.net\/linux\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.dogrow.net\/linux\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.dogrow.net\/linux\/wp-json\/wp\/v2\/comments?post=3895"}],"version-history":[{"count":22,"href":"https:\/\/www.dogrow.net\/linux\/wp-json\/wp\/v2\/posts\/3895\/revisions"}],"predecessor-version":[{"id":3917,"href":"https:\/\/www.dogrow.net\/linux\/wp-json\/wp\/v2\/posts\/3895\/revisions\/3917"}],"wp:attachment":[{"href":"https:\/\/www.dogrow.net\/linux\/wp-json\/wp\/v2\/media?parent=3895"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.dogrow.net\/linux\/wp-json\/wp\/v2\/categories?post=3895"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.dogrow.net\/linux\/wp-json\/wp\/v2\/tags?post=3895"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}