{"id":467,"date":"2018-10-04T12:32:41","date_gmt":"2018-10-04T03:32:41","guid":{"rendered":"http:\/\/www7390uo.sakura.ne.jp\/wordpress\/?p=467"},"modified":"2022-05-21T23:40:18","modified_gmt":"2022-05-21T14:40:18","slug":"apache2-4-35%e3%82%92%e3%82%bd%e3%83%bc%e3%82%b9%e3%81%8b%e3%82%89%e3%82%a4%e3%83%b3%e3%82%b9%e3%83%88%e3%83%bc%e3%83%ab","status":"publish","type":"post","link":"https:\/\/www7390uo.sakura.ne.jp\/wordpress\/archives\/467","title":{"rendered":"Apache2.4.35\u3092\u30bd\u30fc\u30b9\u304b\u3089\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb"},"content":{"rendered":"\n<p>OS: Ubuntu Server 18.04.1 LTS<br>Apache 2.4.35<\/p>\n\n\n\n<p>Apache HTTP Server\u3092\u30bd\u30fc\u30b9\u304b\u3089\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u3053\u3068\u304c\u7136\u7a0b\u983b\u7e41\u306b\u306f\u7121\u3044\u304b\u3089\u3001\u3044\u3056\u3068\u3044\u3046\u969b\u306b\u3059\u3063\u304b\u308a\u3084\u308a\u65b9\u3092\u5fd8\u308c\u3066\u3057\u307e\u3046\u3002configure\u30b9\u30af\u30ea\u30d7\u30c8\u3092\u5b9f\u884c\u3057\u3066\u306f\u30a8\u30e9\u30fc\u306b\u51fa\u4f1a\u3044\u3001\u8abf\u3079\u3066\u306f\u307e\u305fconfigure\u30b9\u30af\u30ea\u30d7\u30c8\u3092\u5b9f\u884c\u3059\u308b\u306e\u306f\u3044\u3044\u52a0\u6e1b\u5384\u4ecb\u306b\u611f\u3058\u308b\u304b\u3089\u3001\u3072\u3068\u3064\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u306e\u624b\u5f15\u304d\u3092\u3057\u305f\u305f\u3081\u3066\u304a\u3053\u3046\u3068\u3044\u3046\u7b97\u6bb5\u3067\u3042\u308b\u3002\u307e\u305a\u306f\u30bd\u30fc\u30b9\u30b3\u30fc\u30c9\u3092\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3057\u3066\u5c55\u958b\u3059\u308b\u3002<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">$ wget -c http:\/\/ftp.tsukuba.wide.ad.jp\/software\/apache\/\/httpd\/httpd-2.4.35.tar.bz2\n$ wget -c https:\/\/www.apache.org\/dist\/httpd\/httpd-2.4.35.tar.bz2.asc\n\n$ gpg --recv-key 995E35221AD84DFF\n$ gpg --verify httpd-2.4.35.tar.bz2.asc\n\n$ tar jxvf httpd-2.4.35.tar.bz2\n$ cd httpd-2.4.35\/<\/pre>\n\n\n\n<p>configure\u30b9\u30af\u30ea\u30d7\u30c8\u3092\u5b9f\u65bd\u3059\u308b\u307e\u3048\u306b\u4e88\u3081\u5fc5\u8981\u3068\u3055\u308c\u308b\u30e9\u30a4\u30d6\u30e9\u30ea\u3092\u5c0e\u5165\u3057\u3066\u304a\u304f\u3002\u30aa\u30d7\u30b7\u30e7\u30f3\u306b\u3088\u3063\u3066\u5fc5\u8981\u3068\u3055\u308c\u308b\u3082\u306e\u306f\u5909\u308f\u308b\u3051\u308c\u3069\u3082\u3001\u6bce\u56de\u6982\u306d\u3053\u306e\u3088\u3046\u306a\u30a8\u30e9\u30fc\u30e1\u30c3\u30bb\u30fc\u30b8\u306b\u898b\u821e\u308f\u308c\u3066\u3044\u308b\u3002<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><thead><tr><th>\u30e1\u30c3\u30bb\u30fc\u30b8<\/th><th>\u5fc5\u8981\u306a\u30d1\u30c3\u30b1\u30fc\u30b8<\/th><\/tr><\/thead><tbody><tr><td>configure: error: APR not found.<br>Please read the documentation.<\/td><td>libapr1-dev<\/td><\/tr><tr><td>configure: error: APR-util not found.<br>Please read the documentation.<\/td><td>libaprutil1-dev<\/td><\/tr><tr><td>configure: error: pcre-config for<br>libpcre not found. PCRE is required and<br>available from http:\/\/pcre.org\/<\/td><td>libpcre3-dev<\/td><\/tr><tr><td>checking whether to enable<br>mod_deflate&#8230; configure: error:<br>mod_deflate has been requested but can<br>not be built due to prerequisite failures<\/td><td>zlib1g-dev<\/td><\/tr><tr><td>checking whether to enable<br>mod_ssl&#8230; configure: error:<br>mod_ssl has been requested but can not be<br>built due to prerequisite failures<\/td><td>libssl-dev<\/td><\/tr><\/tbody><\/table><figcaption>\u88681. \u30a8\u30e9\u30fc\u30e1\u30c3\u30bb\u30fc\u30b8\u3068\u5fc5\u8981\u306a\u30d1\u30c3\u30b1\u30fc\u30b8<\/figcaption><\/figure>\n\n\n\n<pre class=\"wp-block-preformatted\">$ sudo apt install libapr1-dev libaprutil1-dev libpcre3-dev zlib1g-dev libssl-dev\n$ .\/configure --enable-so --enable-cache --enable-disk-cache --enable-mem-cache --enable-deflate --enable-expires --enable-headers --enable-usertrack --enable-unique-id --enable-ssl --enable-rewrite --enable-logio\n$ make\n$ sudo make install<\/pre>\n\n\n\n<p>\u6059\u7121\u304f\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u304c\u5168\u3046\u3055\u308c\u305f\u3089\u6b21\u306f\u8a2d\u5b9a\u306b\u95a2\u3059\u308b\u624b\u7d9a\u304d\u3092\u9032\u3081\u308b\u3002httpd\u3092apache\u30e6\u30fc\u30b6\u3067\u5b9f\u884c\u3057\u305f\u3044\u304b\u3089\u6b64\u308c\u3092\u4e88\u3081\u4f5c\u6210\u3059\u308b\u3002\u305d\u3046\u3057\u305f\u3089httpd.conf\u306b\u624b\u3092\u5165\u308c\u3066\u3086\u304f\u3002<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">$ sudo useradd -s \/bin\/false apache\n$ cd \/usr\/local\/apache2\/conf\/\n$ sudo cp -av httpd.conf httpd.conf.orig<\/pre>\n\n\n\n<p><a href=\"https:\/\/www7390uo.sakura.ne.jp\/wordpress\/archives\/458\">\u30ed\u30b0\u30d5\u30a9\u30fc\u30de\u30c3\u30c8\u306bcombinedio\u3092\u9069\u7528\u3059\u308b\u305f\u3081\u306b<\/a>mod_logio.so\u3092\u30ed\u30fc\u30c9\u3057\u305f\u308a <code>Invalid command 'UserDir', perhaps misspelled or defined by a module not included in the server configuration<\/code> \u3068\u3044\u3046\u30a8\u30e9\u30fc\u30e1\u30c3\u30bb\u30fc\u30b8\u3092\u907f\u3051\u308b\u305f\u3081\u306bmod_userdir.so\u3092\u30ed\u30fc\u30c9\u3057\u305f\u3002<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">$ sudo vi httpd.conf\n#LoadModule logio_module modules\/mod_logio.so\nLoadModule logio_module modules\/mod_logio.so\n\n#LoadModule userdir_module modules\/mod_userdir.so\nLoadModule userdir_module modules\/mod_userdir.so\n\n#User daemon\n#Group daemon\nUser apache\nGroup apache\n\n#ServerAdmin you@example.com\nServerAdmin guro@localhost\n\n#ServerName www.example.com:80\nServerName 192.168.0.58\n\n#Include conf\/extra\/httpd-userdir.conf\nInclude conf\/extra\/httpd-userdir.conf\n\n#Include conf\/extra\/httpd-vhosts.conf\nInclude conf\/extra\/httpd-vhosts.conf<\/pre>\n\n\n\n<p>\u305d\u306e\u6b21\u306bhttpd-userdir.conf\u3092\u89e6\u308b\u3002\u306e\u3061\u306bphp.ini\u306e\u8a2d\u5b9a\u3092.htaccess\u304b\u3089\u5909\u66f4\u3059\u308b\u305f\u3081\u306bAllowOverride\u30c7\u30a3\u30ec\u30af\u30c6\u30a3\u30d6\u3078Options\u3082\u8db3\u3059\u3002\u3051\u308c\u3069\u3082\u305d\u3046\u3059\u308b\u3068\u7d50\u5c40\u5168\u3066\u306e\u30c7\u30a3\u30ec\u30af\u30c6\u30a3\u30d6\u30bf\u30a4\u30d7\u3092\u6307\u5b9a\u3059\u308b\u3053\u3068\u3068\u540c\u7fa9\u3067\u3042\u308b\u304b\u3089All\u306b\u7f6e\u304d\u63db\u3048\u305f\u3002<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">$ cd extra\/\n$ sudo vi httpd-userdir.conf\n(snip)\n    #AllowOverride FileInfo AuthConfig Limit Indexes\n    AllowOverride All<\/pre>\n\n\n\n<p>\u4eca\u5ea6\u306fhttpd-vhosts.conf\u3092\u7de8\u96c6\u3059\u308b\u3002DocumentRoot\u304c\u898b\u3064\u304b\u3089\u306a\u3044\u3068 <code>AH00112: Warning: DocumentRoot [\/home\/guro\/public_html] does not exist<\/code> \u3068\u3044\u3046\u3088\u3046\u306a\u30a8\u30e9\u30fc\u30e1\u30c3\u30bb\u30fc\u30b8\u304c\u73fe\u308c\u3066\u3057\u307e\u3046\u304b\u3089\u3053\u308c\u3082\u4e88\u3081\u4f5c\u6210\u3057\u3066\u304b\u3089\u624b\u3092\u4ed8\u3051\u308b\u3002<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">$ mkdir \/home\/guro\/public_html\n$ sudo vi httpd-vhosts.conf\n&lt;VirtualHost *:80&gt;\n    ServerAdmin guro@localhost\n    DocumentRoot \"\/home\/guro\/public_html\"\n    ServerName 192.168.0.58\n    ErrorLog \"logs\/error_log.guro\"\n    CustomLog \"logs\/access_log.guro\" combinedio\n&lt;\/VirtualHost&gt;<\/pre>\n\n\n\n<p>\u3053\u3053\u307e\u3067\u8abf\u3048\u305f\u3089\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u306b\u8aa4\u308a\u304c\u306a\u3044\u304b\u78ba\u304b\u3081\u308b\u305f\u3081\u306bconfigtest\u3092\u5b9f\u65bd\u3059\u308b\u3002Syntax OK\u304c\u3082\u3089\u3048\u308b\u307e\u3067\u306f\u30a8\u30e9\u30fc\u306e\u5185\u5bb9\u3092\u71b1\u5fc3\u306b\u70b9\u691c\u3057\u3066\u4fee\u6b63\u305b\u306d\u3070\u306a\u3089\u306a\u3044\u3002<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">$ sudo \/usr\/local\/apache2\/bin\/apachectl configtest\nSyntax OK<\/pre>\n\n\n\n<p>\u554f\u984c\u3092\u3059\u3079\u3066\u6f70\u3057\u305f\u3089httpd\u3092\u8d77\u52d5\u3059\u308b\u3002\u8d77\u52d5\u306b\u6210\u529f\u3057\u3066\u3082apachectl\u304b\u3089\u306f\u307e\u308b\u304d\u308a\u30e1\u30c3\u30bb\u30fc\u30b8\u304c\u8868\u793a\u3055\u308c\u306a\u3044\u304b\u3089\u5b9f\u969b\u306bhttpd\u30d7\u30ed\u30bb\u30b9\u304c\u751f\u6210\u3055\u308c\u3066\u3044\u308b\u304b\u3092\u78ba\u8a8d\u3057\u3066\u304a\u304f\u3068\u826f\u3055\u305d\u3046\u3067\u3042\u308b\u3002<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">$ sudo \/usr\/local\/apache2\/bin\/apachectl start\n$ ps axuwf | grep http[d]\nroot      36536  0.0  0.0  79848  4012 ?        Ss   05:37   0:00 \/usr\/local\/apache2\/bin\/httpd -k start\napache    36537  0.0  0.1 2011824 4508 ?        Sl   05:37   0:00  \\_ \/usr\/local\/apache2\/bin\/httpd -k start\napache    36538  0.0  0.1 2011824 4508 ?        Sl   05:37   0:00  \\_ \/usr\/local\/apache2\/bin\/httpd -k start\napache    36539  0.0  0.1 2011824 4508 ?        Sl   05:37   0:00  \\_ \/usr\/local\/apache2\/bin\/httpd -k start<\/pre>\n\n\n\n<p>\u3042\u3068\u306f\u591a\u65b9\u9762\u304b\u3089\u306e\u53f1\u8cac\u304c\u898b\u8fbc\u307e\u308c\u308bHTML\u6587\u6cd5\u3067\u30c6\u30b9\u30c8\u7528\u306e\u30a6\u30a7\u30d6\u30b3\u30f3\u30c6\u30f3\u30c4\u3092\u7528\u610f\u3057\u3066\u5b9f\u969b\u306b\u30d6\u30e9\u30a6\u30b6\u304b\u3089\u30a2\u30af\u30bb\u30b9\u3057\u3066\u307f\u308b\u3068\u3053\u3046\u3067\u3042\u308b\u3002<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">$ vi \/home\/guro\/public_html\/index.html\n&lt;html&gt;&lt;body&gt;&lt;h1&gt;OK!&lt;\/h1&gt;&lt;\/body&gt;&lt;\/html&gt;<\/pre>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter\"><a href=\"https:\/\/www7390uo.sakura.ne.jp\/wordpress\/wp-content\/uploads\/2018\/10\/install-apache1.png\"><img loading=\"lazy\" decoding=\"async\" width=\"396\" height=\"173\" src=\"https:\/\/www7390uo.sakura.ne.jp\/wordpress\/wp-content\/uploads\/2018\/10\/install-apache1.png\" alt=\"\" class=\"wp-image-471\" srcset=\"https:\/\/www7390uo.sakura.ne.jp\/wordpress\/wp-content\/uploads\/2018\/10\/install-apache1.png 396w, https:\/\/www7390uo.sakura.ne.jp\/wordpress\/wp-content\/uploads\/2018\/10\/install-apache1-300x131.png 300w\" sizes=\"auto, (max-width: 396px) 100vw, 396px\" \/><\/a><figcaption>\u56f31. \u30c6\u30b9\u30c8\u7528\u30b3\u30f3\u30c6\u30f3\u30c4\u306e\u8868\u793a<\/figcaption><\/figure><\/div>\n\n\n\n<p>\u6b63\u5e38\u306b\u8868\u793a\u3055\u308c\u308b\u3053\u3068\u3092\u6563\u3005\u78ba\u8a8d\u3057\u305f\u3089\u3072\u3068\u307e\u305ahttpd\u3092\u505c\u6b62\u3057\u3066\u306e\u3061\u306b\u3069\u3053\u3078\u51fa\u3057\u3066\u3082\u6065\u305a\u304b\u3057\u3044\u30b3\u30f3\u30c6\u30f3\u30c4\u306b\u5dee\u3057\u66ff\u3048\u3066\u3086\u304f\u624b\u7b48\u3092\u6574\u3048\u3066\u5168\u3066\u306f\u7d42\u3044\u3067\u3042\u308b\u3002<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">$ sudo \/usr\/local\/apache2\/bin\/apachectl stop\n$ ps axuwf | grep http[d]<\/pre>\n\n\n\n<h3 class=\"link\">\u53c2\u8003:<\/h3>\n<ul>\n <li><a href=\"https:\/\/httpd.apache.org\/docs\/2.2\/ja\/mod\/core.html#allowoverride\">AllowOverride \u30c7\u30a3\u30ec\u30af\u30c6\u30a3\u30d6<\/a><\/li>\n <li><a href=\"https:\/\/php.net\/manual\/ja\/configuration.changes.php\">PHP: \u8a2d\u5b9a\u3092\u5909\u66f4\u3059\u308b\u306b\u306f<\/a><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>OS: Ubuntu Server 18.04.1 LTSApache 2.4.35 Apache HTTP Server\u3092\u30bd\u30fc\u30b9\u304b\u3089\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u3053\u3068\u304c\u7136\u7a0b\u983b\u7e41\u306b\u306f\u7121\u3044\u304b\u3089\u3001\u3044\u3056\u3068\u3044\u3046\u969b\u306b\u3059\u3063\u304b\u308a\u3084\u308a\u65b9\u3092\u5fd8\u308c\u3066\u3057\u307e\u3046\u3002configure\u30b9\u30af\u30ea\u30d7\u30c8\u3092\u5b9f\u884c\u3057\u3066\u306f\u30a8\u30e9\u30fc\u306b\u51fa\u4f1a\u3044\u3001\u8abf\u3079\u3066\u306f\u307e\u305fconfigure\u30b9\u30af\u30ea\u30d7\u30c8\u3092\u5b9f\u884c\u3059\u308b\u306e\u306f\u3044\u3044\u52a0\u6e1b\u5384\u4ecb\u306b\u611f\u3058\u308b\u304b\u3089\u3001\u3072\u3068\u3064\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u306e\u624b\u5f15\u304d\u3092\u3057\u305f\u305f\u3081\u3066\u304a\u3053 &#8230; <a title=\"Apache2.4.35\u3092\u30bd\u30fc\u30b9\u304b\u3089\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\" class=\"read-more\" href=\"https:\/\/www7390uo.sakura.ne.jp\/wordpress\/archives\/467\" aria-label=\"Apache2.4.35\u3092\u30bd\u30fc\u30b9\u304b\u3089\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb \u306b\u3064\u3044\u3066\u3055\u3089\u306b\u8aad\u3080\">\u7d9a\u304d\u3092\u8aad\u3080<\/a><\/p>\n","protected":false},"author":1,"featured_media":1178,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[162],"tags":[187,165],"class_list":["post-467","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-162","tag-apache","tag-165"],"views":3074,"_links":{"self":[{"href":"https:\/\/www7390uo.sakura.ne.jp\/wordpress\/wp-json\/wp\/v2\/posts\/467","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www7390uo.sakura.ne.jp\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www7390uo.sakura.ne.jp\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www7390uo.sakura.ne.jp\/wordpress\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www7390uo.sakura.ne.jp\/wordpress\/wp-json\/wp\/v2\/comments?post=467"}],"version-history":[{"count":0,"href":"https:\/\/www7390uo.sakura.ne.jp\/wordpress\/wp-json\/wp\/v2\/posts\/467\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www7390uo.sakura.ne.jp\/wordpress\/wp-json\/wp\/v2\/media\/1178"}],"wp:attachment":[{"href":"https:\/\/www7390uo.sakura.ne.jp\/wordpress\/wp-json\/wp\/v2\/media?parent=467"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www7390uo.sakura.ne.jp\/wordpress\/wp-json\/wp\/v2\/categories?post=467"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www7390uo.sakura.ne.jp\/wordpress\/wp-json\/wp\/v2\/tags?post=467"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}