{"id":5911,"date":"2020-09-06T19:29:10","date_gmt":"2020-09-06T10:29:10","guid":{"rendered":"http:\/\/hack.gpl.jp\/?p=5911"},"modified":"2021-06-02T05:43:58","modified_gmt":"2021-06-01T20:43:58","slug":"post-5911","status":"publish","type":"post","link":"https:\/\/hack.gpl.jp\/2020\/09\/06\/post-5911.html","title":{"rendered":"Termux\u306eapache2+php7+mariadb10 \u74b0\u5883\u3067wordpress\u306e\u8868\u793a\u30b9\u30b3\u30a2"},"content":{"rendered":"\n

\u3068\u308a\u3042\u3048\u305a\u3001\uff11\u3064\u306e\u6307\u6a19\u3068\u3057\u3066\u30e1\u30e2\u3057\u3066\u304a\u304f\u3053\u3068\u306b\u3057\u307e\u3059\u3002\u307e\u305a\u3001\u6539\u5584\u7d50\u679c\u304b\u3089\u3002\u30c7\u30fc\u30bf\u91cf\u306f\u3001\u4eca\u898b\u3066\u3044\u308b\u3053\u306e\u30d6\u30ed\u30b0\u306e\u904e\u53bb\u8a18\u4e8b\u3001\u7d04\uff14\uff10\uff10\u4ef6\u306e\u30c7\u30fc\u30bf\u3067\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\u306f\u3001Hew<\/a>\u3000\u3067\u3059\u3002TOP\u306e\u8868\u793a\u8a18\u4e8b\u6570\u306f\uff13\u3067\u3059\u3002\u30b9\u30de\u30db\u5074\u306f\u3001UmidigiF2\u306bapache2+php7+mariadb10\u306e\u74b0\u5883\u3068\u306a\u308a\u307e\u3059\u3002ClassicPress\u3067\u306f\u306a\u304f\u3001WordPress\u6700\u65b05.5.1\u3067\u3059\u3002<\/p>\n\n\n\n

\"WebPageTest_Test_Details_-_Tokyo___jh_gpl_jp__-_09_06_20_18_04_20\"<\/figure><\/div>\n\n\n\n

\u6539\u5584\u524d\u306f\u4ee5\u4e0b\u3067\u3059\u3002<\/p>\n\n\n\n

\"WebPageTest_Test_Details_-_Tokyo___jh_gpl_jp__-_09_05_20_15_15_05\"<\/figure>\n\n\n\n

2.2\u79d2\u304f\u3089\u3044\u304b\u3089\u30011.3\u79d2\u304f\u3089\u3044\u307e\u3067\u6539\u5584\u3057\u307e\u3057\u305f\u3002\u3053\u308c\u306f\u3001\u30ad\u30e3\u30c3\u30b7\u30e5\u5316\u306e\u52b9\u679c\u3067\u3059\u3002\u30ad\u30e3\u30c3\u30b7\u30e5\u3055\u305b\u308b\u306e\u306f\u3001\u4f55\u304c\u3044\u3044\u306e\u304b\u8ff7\u3044\u307e\u3057\u305f\u304c\u4e00\u756a\u30b7\u30f3\u30d7\u30eb\u305d\u3046\u306a\u3001\u300cSimple Cache<\/strong>\u300d\u3068\u3044\u3046\u306e\u3092\u4f7f\u3044\u307e\u3057\u305f\u3002<\/p>\n\n\n\n

\"\u30d5\u309a\u30e9\u30af\u3099\u30a4\u30f3_\u2039_JunkHack_\u2014_WordPress\"<\/a><\/figure>\n\n\n\n

Jetpack \u306e\u5168\u3066\u306e\u6a5f\u80fd\u3092\u8a66\u3057\u3066\u3044\u307e\u305b\u3093\u304c\u3001\u3068\u308a\u3042\u3048\u305a\u306f\u52d5\u3044\u3066\u3044\u308b\u611f\u3058\u3067\u3059\u3002\u8a2d\u5b9a\u3082\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u5358\u7d14\u3067\u3059\u3002\u624b\u52d5\u3067\u306e\u30ad\u30e3\u30c3\u30b7\u30e5\u524a\u9664\u306f\u8a2d\u5b9a\u753b\u9762\u306e\uff12\u7b87\u6240\u304b\u3089\u53ef\u80fd\u3067\u3059\u3002<\/p>\n\n\n\n

\"\u30b7\u30f3\u30d5\u309a\u30eb\u30ad\u30e3\u30c3\u30b7\u30e5\u2039JunkHack_\u2014_WordPress\"<\/figure>\n\n\n\n

nginx_1.19.2 \u3068\u3001php-fpm_7.4.9 \u306e\u7d44\u307f\u5408\u308f\u305b\u3067\u3082\u78ba\u8a8d\u3057\u3066\u307f\u305f\u3044\u3067\u3059\u306d\u3002<\/p>\n\n\n\n

Termux\u30d1\u30c3\u30b1\u30fc\u30b8\u5b89\u5b9a\u677f
https:\/\/grimler.se\/termux-packages-24\/arm\/<\/p><\/blockquote>\n\n\n\n

nginx\u306e1.19.2 \u306f\u30aa\u30d5\u30a3\u30b7\u30e3\u30eb\u5074<\/a>\u306f 2020\/08\/11 \u306b\u516c\u958b\u3057\u3066\u3044\u3066\u3001termux \u5074\u306f\u30018\/18 \u306a\u3093\u3067\u3061\u3083\u3093\u3068\u30e1\u30f3\u30c6\u30ca\u30f3\u30b9\u3055\u308c\u3066\u3044\u308b\u3088\u3046\u3067\u3059\u3002<\/p>\n\n\n\n

\u3068\u308a\u3042\u3048\u305a\u3001apache\u306ehttpd.conf\u306e\u30d1\u30c3\u30c1\u306f\u4ee5\u4e0b\u3067\u3059\u3002apache 2.4.46 \u306e\u30c7\u30d5\u30a9\u30eb\u30c8\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u3068\u306e\u5dee\u5206\u3067\u3059\u3002<\/p>\n\n\n\n

--- httpd.conf.org\t2020-08-09 07:55:34.000000000 +0900\n+++ httpd.conf\t2020-09-06 01:56:57.560924026 +0900\n@@ -63,8 +63,8 @@\n # Example:\n # LoadModule foo_module modules\/mod_foo.so\n #\n-#LoadModule mpm_prefork_module libexec\/apache2\/mod_mpm_prefork.so\n-LoadModule mpm_worker_module libexec\/apache2\/mod_mpm_worker.so\n+LoadModule mpm_prefork_module libexec\/apache2\/mod_mpm_prefork.so\n+#LoadModule mpm_worker_module libexec\/apache2\/mod_mpm_worker.so\n LoadModule authn_file_module libexec\/apache2\/mod_authn_file.so\n #LoadModule authn_dbm_module libexec\/apache2\/mod_authn_dbm.so\n #LoadModule authn_anon_module libexec\/apache2\/mod_authn_anon.so\n@@ -88,7 +88,7 @@\n #LoadModule cache_module libexec\/apache2\/mod_cache.so\n #LoadModule cache_disk_module libexec\/apache2\/mod_cache_disk.so\n #LoadModule cache_socache_module libexec\/apache2\/mod_cache_socache.so\n-#LoadModule socache_shmcb_module libexec\/apache2\/mod_socache_shmcb.so\n+LoadModule socache_shmcb_module libexec\/apache2\/mod_socache_shmcb.so\n #LoadModule socache_dbm_module libexec\/apache2\/mod_socache_dbm.so\n #LoadModule socache_memcache_module libexec\/apache2\/mod_socache_memcache.so\n #LoadModule socache_redis_module libexec\/apache2\/mod_socache_redis.so\n@@ -109,7 +109,7 @@\n #LoadModule substitute_module libexec\/apache2\/mod_substitute.so\n #LoadModule sed_module libexec\/apache2\/mod_sed.so\n #LoadModule charset_lite_module libexec\/apache2\/mod_charset_lite.so\n-#LoadModule deflate_module libexec\/apache2\/mod_deflate.so\n+LoadModule deflate_module libexec\/apache2\/mod_deflate.so\n LoadModule mime_module libexec\/apache2\/mod_mime.so\n LoadModule log_config_module libexec\/apache2\/mod_log_config.so\n #LoadModule log_debug_module libexec\/apache2\/mod_log_debug.so\n@@ -144,7 +144,7 @@\n #LoadModule session_dbd_module libexec\/apache2\/mod_session_dbd.so\n LoadModule slotmem_shm_module libexec\/apache2\/mod_slotmem_shm.so\n #LoadModule slotmem_plain_module libexec\/apache2\/mod_slotmem_plain.so\n-#LoadModule ssl_module libexec\/apache2\/mod_ssl.so\n+LoadModule ssl_module libexec\/apache2\/mod_ssl.so\n #LoadModule dialup_module libexec\/apache2\/mod_dialup.so\n #LoadModule http2_module libexec\/apache2\/mod_http2.so\n #LoadModule lbmethod_byrequests_module libexec\/apache2\/mod_lbmethod_byrequests.so\n@@ -168,7 +168,7 @@\n <\/IfModule>\n #LoadModule dav_fs_module libexec\/apache2\/mod_dav_fs.so\n #LoadModule dav_lock_module libexec\/apache2\/mod_dav_lock.so\n-#LoadModule vhost_alias_module libexec\/apache2\/mod_vhost_alias.so\n+LoadModule vhost_alias_module libexec\/apache2\/mod_vhost_alias.so\n LoadModule negotiation_module libexec\/apache2\/mod_negotiation.so\n LoadModule dir_module libexec\/apache2\/mod_dir.so\n #LoadModule imagemap_module libexec\/apache2\/mod_imagemap.so\n@@ -176,7 +176,7 @@\n #LoadModule speling_module libexec\/apache2\/mod_speling.so\n LoadModule userdir_module libexec\/apache2\/mod_userdir.so\n LoadModule alias_module libexec\/apache2\/mod_alias.so\n-#LoadModule rewrite_module libexec\/apache2\/mod_rewrite.so\n+LoadModule rewrite_module libexec\/apache2\/mod_rewrite.so\n \n <IfModule unixd_module>\n #\n@@ -242,8 +242,10 @@\n # documents. By default, all requests are taken from this directory, but\n # symbolic links and aliases may be used to point to other locations.\n #\n-DocumentRoot \"\/data\/data\/com.termux\/files\/usr\/share\/apache2\/default-site\/htdocs\"\n-<Directory \"\/data\/data\/com.termux\/files\/usr\/share\/apache2\/default-site\/htdocs\">\n+#DocumentRoot \"\/data\/data\/com.termux\/files\/usr\/share\/apache2\/default-site\/htdocs\"\n+DocumentRoot \"\/data\/data\/com.termux\/files\/home\/htdocs\"\n+#<Directory \"\/data\/data\/com.termux\/files\/usr\/share\/apache2\/default-site\/htdocs\">\n+<Directory \"\/data\/data\/com.termux\/files\/home\/htdocs\">\n     #\n     # Possible values for the Options directive are \"None\", \"All\",\n     # or any combination of:\n@@ -256,14 +258,14 @@\n     # http:\/\/httpd.apache.org\/docs\/2.4\/mod\/core.html#options\n     # for more information.\n     #\n-    Options Indexes FollowSymLinks\n+    Options FollowSymLinks\n \n     #\n     # AllowOverride controls what directives may be placed in .htaccess files.\n     # It can be \"All\", \"None\", or any combination of the keywords:\n     #   AllowOverride FileInfo AuthConfig Limit\n     #\n-    AllowOverride None\n+    AllowOverride All\n \n     #\n     # Controls who can get stuff from this server.\n@@ -276,7 +278,7 @@\n # is requested.\n #\n <IfModule dir_module>\n-    DirectoryIndex index.html\n+    DirectoryIndex index.php index.html\n <\/IfModule>\n \n #\n@@ -529,3 +531,22 @@\n SSLRandomSeed connect builtin\n <\/IfModule>\n \n+LoadModule php7_module libexec\/apache2\/libphp7.so\n+<FilesMatch \\.php\ngt;\n +   SetHandler application\/x-httpd-php\n +<\/FilesMatch>\n +<IfModule dir_module>\n +    DirectoryIndex index.php\n +<\/IfModule>\n +\n +<IfModule mod_deflate.c>\n +    DeflateCompressionLevel 1\n +    <IfModule mod_filter.c>\n +        FilterDeclare COMPRESS\n +        FilterProvider COMPRESS DEFLATE \"%{CONTENT_TYPE} =~ m#^text\/#i\"\n +        FilterProvider COMPRESS DEFLATE \"%{CONTENT_TYPE} =~ m#^application\/(atom\\+xml|javascript|json|rss\\+xml|xml|xhtml\\+xml)#i\"\n +        FilterProvider COMPRESS DEFLATE \"%{CONTENT_TYPE} =~ m#^image\/(svg\\+xml|vnd\\.microsoft\\.icon)#i\"\n +        FilterChain COMPRESS\n +        FilterProtocol COMPRESS DEFLATE change=yes;byteranges=no\n +    <\/IfModule>\n +<\/IfModule><\/code><\/pre>\n\n\n\n

\u30d1\u30c3\u30c1\u306e\u9069\u7528\u306f\u4e0a\u8a18\u3092\u30b3\u30d4\u30da\u3057\u3066p.txt \u306a\u3069\u306b\u4fdd\u5b58\u3001httpd.conf \u306b\u4ee5\u4e0b\u306e\u3088\u3046\u306b patch\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n\n\n\n

$ patch -u httpd.conf < p.txt<\/p><\/blockquote>\n\n\n\n

\u6210\u529f\u3059\u308c\u3070\u3001patching file httpd.conf\u3000\u306e\u3088\u3046\u306a\u8868\u793a\u3068\u306a\u308a\u307e\u3059\u3002<\/p>\n\n\n\n

mariadb \u306e\u30c1\u30e5\u30fc\u30cb\u30f3\u30b0\u3068\u304b\u306f\u3084\u3063\u3066\u306a\u3044\u3067\u3059\u3002PHP\u306f\u3001php.ini  \u306b\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u8a18\u8f09\u3057\u3066\u3042\u308a\u307e\u3059\u3002<\/p>\n\n\n\n

$ cat \/data\/data\/com.termux\/files\/usr\/lib\/php.ini
[PHP]<\/p>

upload_max_filesize = 64M
post_max_size = 64M
memory_limit = 64M<\/p><\/blockquote>\n\n\n\n

\u7d50\u69cb\u3001\u30b9\u30de\u30db\u3067\u3082\u52d5\u304f\u306a\u30fc\u3001\u3044\u3051\u305d\u3046\u3060\u306a\u30fc\u3063\u3066\u3044\u3046\u611f\u3058\u3067\u3059\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"

\u3068\u308a\u3042\u3048\u305a\u3001\uff11\u3064\u306e\u6307\u6a19\u3068\u3057\u3066\u30e1\u30e2\u3057\u3066\u304a\u304f\u3053\u3068\u306b\u3057\u307e\u3059\u3002\u307e\u305a\u3001\u6539\u5584\u7d50\u679c\u304b\u3089\u3002\u30c7\u30fc\u30bf\u91cf\u306f\u3001\u4eca\u898b\u3066\u3044\u308b\u3053\u306e\u30d6\u30ed\u30b0\u306e\u904e\u53bb\u8a18\u4e8b\u3001\u7d04\uff14\uff10\uff10\u4ef6\u306e\u30c7\u30fc\u30bf\u3067\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\u306f\u3001Hew\u3000\u3067\u3059\u3002TOP\u306e\u8868\u793a\u8a18\u4e8b\u6570\u306f\uff13\u3067\u3059\u3002\u30b9\u30de\u30db\u5074\u306f\u3001Umidig […]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"_uag_custom_page_level_css":"","footnotes":""},"categories":[14,47,83,32],"tags":[],"acf":[],"uagb_featured_image_src":{"full":false,"thumbnail":false,"medium":false,"medium_large":false,"large":false,"1536x1536":false,"2048x2048":false,"post-thumbnail":false},"uagb_author_info":{"display_name":"JunkHack","author_link":"https:\/\/hack.gpl.jp\/author\/junkhack\/"},"uagb_comment_info":0,"uagb_excerpt":"\u3068\u308a\u3042\u3048\u305a\u3001\uff11\u3064\u306e\u6307\u6a19\u3068\u3057\u3066\u30e1\u30e2\u3057\u3066\u304a\u304f\u3053\u3068\u306b\u3057\u307e\u3059\u3002\u307e\u305a\u3001\u6539\u5584\u7d50\u679c\u304b\u3089\u3002\u30c7\u30fc\u30bf\u91cf\u306f\u3001\u4eca\u898b\u3066\u3044\u308b\u3053\u306e\u30d6\u30ed\u30b0\u306e\u904e…","_links":{"self":[{"href":"https:\/\/hack.gpl.jp\/wp-json\/wp\/v2\/posts\/5911"}],"collection":[{"href":"https:\/\/hack.gpl.jp\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/hack.gpl.jp\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/hack.gpl.jp\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/hack.gpl.jp\/wp-json\/wp\/v2\/comments?post=5911"}],"version-history":[{"count":0,"href":"https:\/\/hack.gpl.jp\/wp-json\/wp\/v2\/posts\/5911\/revisions"}],"wp:attachment":[{"href":"https:\/\/hack.gpl.jp\/wp-json\/wp\/v2\/media?parent=5911"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/hack.gpl.jp\/wp-json\/wp\/v2\/categories?post=5911"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/hack.gpl.jp\/wp-json\/wp\/v2\/tags?post=5911"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}