{"id":1672,"date":"2019-01-12T09:42:24","date_gmt":"2019-01-12T00:42:24","guid":{"rendered":"https:\/\/test.ji0vwl.net\/?p=1672"},"modified":"2019-01-29T21:21:21","modified_gmt":"2019-01-29T12:21:21","slug":"apachewordpress-%e3%82%b5%e3%83%bc%e3%83%90%e3%83%bc%e3%81%8c%e8%90%bd%e3%81%a1%e3%82%8b%e3%81%ae%e3%81%a7%e5%ae%9a%e6%9c%9f%e7%9a%84%e3%81%ab%e5%86%8d%e8%b5%b7%e5%8b%95%e3%81%95%e3%81%9b%e3%81%a6","status":"publish","type":"post","link":"https:\/\/ji0vwl.net\/index.php\/2019\/01\/12\/1672\/","title":{"rendered":"Apache+WordPress \u30b5\u30fc\u30d0\u30fc\u304c\u843d\u3061\u308b\u306e\u3067\u5b9a\u671f\u7684\u306b\u518d\u8d77\u52d5\u3055\u305b\u3066\u307f\u305f"},"content":{"rendered":"<p><a href=\"https:\/\/test.ji0vwl.net\/index.php\/2018\/12\/24\/1384\/\">Blog\u7528Web\u30b5\u30fc\u30d0\u30fc\u3092Lightsail\u306b\u5f15\u3063\u8d8a\u3057<\/a>\u3057\u30662\u9031\u9593\u304f\u3089\u3044\u52d5\u304b\u3057\u307e\u3057\u305f\u304c\u3001\u30e1\u30e2\u30ea\u30ea\u30fc\u30af\u3092\u8d77\u3053\u3057\u3066\u5ea6\u3005\u6b62\u307e\u3063\u3066\u3044\u308b\u3053\u3068\u304c\u3042\u308a\u307e\u3059\u3002\u3044\u307e\u307e\u3067\u4f7f\u3063\u3066\u3044\u305f\u3055\u304f\u3089\u306eVPS CentOS6+Apache2.2\u306f\u6708\u306b2\u56deSSL\u8a3c\u660e\u66f8\u306e\u66f4\u65b0\u51e6\u7406\u306e\u3064\u3044\u3067\u306b\u518d\u8d77\u52d5\u3059\u308b\u3060\u3051\u3067\u5b89\u5b9a\u7a3c\u50cd\u3057\u3066\u3044\u305f\u306e\u3067\u3059\u304c\u3001\u4eca\u56de\u306f1\u65e5\u6301\u305f\u305a\u306b\u843d\u3061\u3066\u3044\u308b\u3053\u3068\u304c\u3042\u308a\u3001\u3069\u3046\u3082\u4e0d\u5b89\u5b9a\u3067\u3059\u3002<\/p>\n<p>\u6839\u672c\u539f\u56e0\u304c\u308f\u304b\u3089\u306a\u3044\u306e\u3067\u3001\u66ab\u5b9a\u7b56\u3068\u3057\u3066\u4ee5\u4e0b\u3092\u5b9f\u65bd\u3059\u308b\u3053\u3068\u306b\u3057\u307e\u3059<br \/>\n\u30fbSwap\u30e1\u30e2\u30ea\u30922GB\u21924GB\u306b\u5897\u52a0<br \/>\n\u30fb1\u6642\u9593\u306b1\u56de httpd\u306egraceful\u30ea\u30ed\u30fc\u30c9<br \/>\n\u30fb1\u65e5\u306b1\u56de httpd\u306e\u30ea\u30b9\u30bf\u30fc\u30c8\u5f8c\u3001Swap\u30e1\u30e2\u30ea\u306e\u30af\u30ea\u30a2\u3001\u30e1\u30e2\u30ea\u72b6\u6cc1\u3092\u81ea\u5206\u5b9b\u306b\u30e1\u30fc\u30eb<\/p>\n<p>\u77e5\u3089\u306a\u304b\u3063\u305f\u306e\u3067\u3059\u304c\u3001<a href=\"https:\/\/ex1.m-yabe.com\/archives\/2180\">restart\u3068graceful\u306f\u52d5\u304d\u304c\u9055\u3046<\/a>\u3088\u3046\u3067\u3001restart\u306f\u5f37\u5236\u7684\u306b\u518d\u8d77\u52d5\u3001graceful\u306f\u73fe\u5728\u306e\u51e6\u7406\u304c\u7d42\u308f\u3063\u3066\u304b\u3089\u5b89\u5168\u306b\u518d\u8d77\u52d5\u3067\u304d\u308b\u3068\u3044\u3046\u3053\u3068\u3067\u3001\u6bce\u6642graceful\u3092\u5b9f\u884c\u3059\u308b\u3053\u3068\u306b\u3057\u3066\u307f\u307e\u3057\u305f\u3002\u3053\u308c\u3067\u3057\u3070\u3089\u304f\u69d8\u5b50\u3092\u898b\u3066\u307f\u307e\u3059\u3002<\/p>\n<h4>1. 2GB Swap\u524a\u9664\u30014GB Swap\u518d\u4f5c\u6210<\/h4>\n<pre>$ sudo -i\r\n# swapoff \/swapfile\r\n# rm \/swapfile\r\n# dd if=\/dev\/zero of=\/swapfile bs=1M count=4096\r\n# mkswap \/swapfile\r\n# swapon \/swapfile\r\n# chmod 600 \/swapfile\r\n<\/pre>\n<h4>2. cron\u3067\u5b9a\u6642reload\uff08graceful\uff09\u51e6\u7406\u8ffd\u52a0<\/h4>\n<p>\u203b\u6ce8\uff1a\u79c1\u306ehttpd2\u306f reload = graceful\u306e\u52d5\u4f5c\u3092\u3059\u308b\u8a2d\u5b9a\u3067\u3059\u3002<\/p>\n<pre># vi \/etc\/cron.d\/dailyjobs\r\n-----------------------------------\r\n.\r\n.\r\n# run-parts\r\n00 * * * * root \/bin\/systemctl reload httpd2\r\n05 3 * * * root \/bin\/systemctl restart httpd2 &amp;&amp; swapoff -a &amp;&amp; swapon -a &amp;&amp; free -h\r\n.\r\n.\r\n-----------------------------------\r\n:wq\r\n<\/pre>\n<pre># systemctl restart crond\r\n<\/pre>\n<p>&nbsp;<\/p>\n<p>HTTP\/2\u3092\u6709\u52b9\u306b\u3059\u308b\u305f\u3081\u306b<a href=\"https:\/\/test.ji0vwl.net\/index.php\/2019\/01\/04\/1603\/\">Apache2.4.37<\/a>\u306eMPM\u306fprefork\u3067\u306f\u306a\u304fworker\uff08\u306a\u305c\u304bevent\u304c\u7121\u3044\u30fb\u30fb\u30fb\u8981\u8abf\u67fb\uff09\u3067\u52d5\u304b\u3057\u3066\u3044\u308b\u306e\u3067\u3059\u304c\u3001\u30c1\u30e5\u30fc\u30cb\u30f3\u30b0\u304c\u5fc5\u8981\u304b\u3082\u3057\u308c\u307e\u305b\u3093\u3002<\/p>\n<p>\u304a\u307e\u3058\u306a\u3044\u3067\u3001mpm_worker\u306e\u8a2d\u5b9a\u3092\u3061\u3087\u3063\u3068\u4fee\u6b63\u3002\u6570\u5024\u306b\u6839\u62e0\u306f\u3042\u308a\u307e\u305b\u3093\u3002<\/p>\n<pre># vi \/usr\/local\/httpd2\/conf\/extra\/httpd-mpm.conf\r\n-----------------------------------\r\n.\r\n.\r\n&lt;IfModule mom_worker_module&gt;\r\n    StartServers             1\r\n    MinSpareThreads         25\r\n    MaxSpareThreads        100\r\n    ThreadsPerChild         25\r\n    MaxRequestWorkers      100\r\n    MaxConnectionsPerChild 2000\r\n&lt;\/IfModule&gt;\r\n.\r\n.\r\n------------------------------------\r\n:wq\r\n<\/pre>\n<pre># systemctl reload httpd2\r\n<\/pre>\n<p>\u30ec\u30f3\u30bf\u30eb\u30b5\u30fc\u30d0\u30fc\u307f\u305f\u3044\u306bWeb\u30b5\u30fc\u30d0\u30fc\u3092\u5b89\u5b9a\u7684\u306b\u7dad\u6301\u904b\u7528\u3059\u308b\u306e\u3063\u3066\u3001\u3059\u3054\u3044\u4e8b\u306a\u3093\u3060\u306a\u3041\u30fb\u30fb\u30fb\u3068\u611f\u3058\u308b\u4eca\u65e5\u3053\u306e\u9803\u3067\u3059\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Blog\u7528Web\u30b5\u30fc\u30d0\u30fc\u3092Lightsail\u306b\u5f15\u3063\u8d8a\u3057\u3057\u30662\u9031\u9593\u304f\u3089\u3044\u52d5\u304b\u3057\u307e\u3057\u305f\u304c\u3001\u30e1\u30e2\u30ea\u30ea\u30fc\u30af\u3092\u8d77\u3053\u3057\u3066\u5ea6\u3005\u6b62\u307e\u3063\u3066\u3044\u308b\u3053\u3068\u304c\u3042\u308a\u307e\u3059\u3002\u3044\u307e\u307e\u3067\u4f7f\u3063\u3066\u3044\u305f\u3055\u304f\u3089\u306eVPS CentOS6+Apache2.2\u306f\u6708\u306b2\u56deS &hellip; <a href=\"https:\/\/ji0vwl.net\/index.php\/2019\/01\/12\/1672\/\" class=\"more-link\">\u7d9a\u304d\u3092\u8aad\u3080 <span class=\"screen-reader-text\">Apache+WordPress \u30b5\u30fc\u30d0\u30fc\u304c\u843d\u3061\u308b\u306e\u3067\u5b9a\u671f\u7684\u306b\u518d\u8d77\u52d5\u3055\u305b\u3066\u307f\u305f<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-1672","post","type-post","status-publish","format-standard","hentry","category-server"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/ji0vwl.net\/index.php\/wp-json\/wp\/v2\/posts\/1672","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ji0vwl.net\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ji0vwl.net\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ji0vwl.net\/index.php\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/ji0vwl.net\/index.php\/wp-json\/wp\/v2\/comments?post=1672"}],"version-history":[{"count":0,"href":"https:\/\/ji0vwl.net\/index.php\/wp-json\/wp\/v2\/posts\/1672\/revisions"}],"wp:attachment":[{"href":"https:\/\/ji0vwl.net\/index.php\/wp-json\/wp\/v2\/media?parent=1672"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ji0vwl.net\/index.php\/wp-json\/wp\/v2\/categories?post=1672"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ji0vwl.net\/index.php\/wp-json\/wp\/v2\/tags?post=1672"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}