{"id":4429,"date":"2019-09-29T22:51:29","date_gmt":"2019-09-29T13:51:29","guid":{"rendered":"https:\/\/kumapress.com\/wp\/?p=4429"},"modified":"2019-12-23T21:09:35","modified_gmt":"2019-12-23T12:09:35","slug":"nginx%e3%81%a7%e3%83%af%e3%83%bc%e3%83%89%e3%83%97%e3%83%ac%e3%82%b9","status":"publish","type":"post","link":"https:\/\/kumapress.com\/?p=4429","title":{"rendered":"nginx\u3067\u30ef\u30fc\u30c9\u30d7\u30ec\u30b9"},"content":{"rendered":"<p><span style=\"font-size: 14pt;\">Apache\u74b0\u5883\u3067\u4f5c\u6210\u3055\u308c\u305f\u30ef\u30fc\u30c9\u30d7\u30ec\u30b9\u306e\u30b3\u30f3\u30c6\u30f3\u30c4\u3092nginx\u74b0\u5883\u306b\u79fb\u884c\u3055\u305b\u305f\u3093\u3067\u3059\u304c\u3001\u30e1\u30cb\u30e5\u30fc\u304c\u3059\u3079\u3066\u300cnot found\u300d\u306b\u3002\u3002\u3002<\/span><\/p>\n<p><span style=\"font-size: 14pt;\">\u539f\u56e0\u3068\u3057\u3066\u306f\u3001\u30d1\u30fc\u30de\u30ea\u30f3\u30af\u304c\u57fa\u672c\u4ee5\u5916\u306b\u306a\u3063\u3066\u3044\u305f\u305f\u3081\u3067\u3057\u305f\u3002\u3002<\/span><\/p>\n<p><span style=\"font-size: 14pt;\">\u203b\u3053\u308c\u304c\u308f\u304b\u308b\u307e\u3067\u3001\u518d\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u305f\u308a\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3044\u3058\u3063\u3066\u307f\u305f\u308aorz<\/span><\/p>\n<p><span style=\"font-size: 14pt;\">nginx\u3063\u3066htaccess\u304c\u4f7f\u3048\u306a\u3044\u3093\u3067\u3059\u306d\u3002\u3002\u4f7f\u3048\u306a\u3044\u3093\u3067\u3059\u3002\u3002\u3002<\/span><\/p>\n<p><span style=\"font-size: 14pt;\">\u305d\u306e\u305f\u3081\u3001htaccess\u306b\u66f8\u3044\u3066\u3044\u3044\u305f\u5185\u5bb9\u3092nginx.conf\u306b\u66f8\u3044\u3066\u3084\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002<\/span><\/p>\n\n\n<h2 class=\"wp-block-heading\">nginx.conf\u3092\u7de8\u96c6\u3057\u307e\u3059\u3002<\/h2>\n\n\n<p><span style=\"font-size: 14pt;\">SSL\u3067\u8a2d\u5b9a\u3057\u3066\u3044\u308b\u30b5\u30f3\u30d7\u30eb\u3067\u3059\u3002<\/span><\/p>\n<p><code>server {<\/code><br><code>listen 443 ssl http2 ;<\/code><br><code>listen [::]:443 ssl http2 ;<\/code><br><code>server_name exp.com;<\/code><br><code>root \/opt\/exp\/public_html;<\/code><br><code>index index.php index.html index.htm;<\/code><br><code>client_max_body_size 20M;<\/code><\/p>\n<p><code>ssl_certificate \/etc\/letsencrypt\/live\/exp.com\/fullchain.pem;<\/code><br><code>ssl_certificate_key \/etc\/letsencrypt\/live\/exp.com\/privkey.pem;<\/code><\/p>\n<p><code>ssl_session_cache shared:SSL:1m;<\/code><br><code>ssl_session_timeout 10m;<\/code><br><code>ssl_ciphers HIGH:!aNULL:!MD5;<\/code><br><code>ssl_prefer_server_ciphers on;<\/code><\/p>\n<p><code># Load configuration files for the default server block.<\/code><br><code>include \/etc\/nginx\/default.d\/*.conf;<\/code><\/p>\n<p><code>access_log \/var\/log\/nginx\/exp.com.ssl.log main;<\/code><br><code>error_log \/var\/log\/nginx\/exp.com.error.ssl.log warn;<\/code><\/p>\n<p># URL\u3067\u30c8\u30e9\u30a4\u3057\u3066\u3001\u898b\u3064\u304b\u3089\u306a\u3044\u5834\u5408\u306f@wordpress\u30ed\u30b1\u30fc\u30b7\u30e7\u30f3\u3078\u98db\u3070\u3059<br><code>location \/ {<\/code><br><code>&nbsp;try_files $uri $uri\/ @wordpress;<\/code><br><code>}<\/code><\/p>\n<p><code>error_page 404 \/404.html;<\/code><br><code>location = \/40x.html {<\/code><br><code>}<\/code><\/p>\n<p><code>error_page 500 502 503 504 \/50x.html;<\/code><br><code>location = \/50x.html {<\/code><br><code>}<\/code><\/p>\n<p><code>location ~ \\.php$ {<\/code><br><code>&nbsp;# \u901a\u5e38\u306e.php\u3067\u30a2\u30af\u30bb\u30b9\u3057\u3066\u304d\u3066\u3001\u898b\u3064\u304b\u3089\u306a\u3044\u5834\u5408\u306f@wordpress\u30ed\u30b1\u30fc\u30b7\u30e7\u30f3\u3078\u98db\u3070\u3059<br>&nbsp;try_files $uri @wordpress;<\/code><br><code>&nbsp;fastcgi_index index.php;<\/code><br><code>&nbsp;fastcgi_split_path_info ^(.+\\.php)(.*)$;<\/code><br><code>&nbsp;fastcgi_pass unix:\/var\/run\/php-fpm\/php-fpm.sock;<\/code><br><code>&nbsp;fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;<\/code><br><code>&nbsp;include fastcgi_params;<\/code><br><code>}<\/code><\/p><code>\n<\/code><p><code>#\u30ef\u30fc\u30c9\u30d7\u30ec\u30b9\u306eindex.php\u3078\u98db\u3070\u3059<\/code><br><code>location @wordpress {<\/code><br><code>&nbsp;fastcgi_index index.php;<\/code><br><code>&nbsp;fastcgi_split_path_info ^(.+\\.php)(.*)$;<\/code><br><code>&nbsp;fastcgi_pass unix:\/var\/run\/php-fpm\/php-fpm.sock;<\/code><br><code>&nbsp;fastcgi_param SCRIPT_FILENAME \/opt\/exp\/public_html\/index.php;<\/code><br><code>&nbsp;include fastcgi_params;<\/code><br><code>}<\/code><br><code>}<\/code><\/p>\n\n\n<h2 class=\"wp-block-heading\">\u3057\u3089\u3093\u304c\u306a\u3002\u3002\u3002\u3002<\/h2>\n\n\n<p><span style=\"font-size: 14pt;\">\u3044\u3001\u3044\u3084\u3002\u3002\u3002\u3002<\/span><\/p>\n<p><span style=\"font-size: 14pt;\">\u601d\u308f\u305a\u3002\u3002\u3002<\/span><\/p><aside class=\"row veu_insertAds after\"><div class=\"col-md-6\"><script async src=\"https:\/\/pagead2.googlesyndication.com\/pagead\/js\/adsbygoogle.js\"><\/script>\r\n<!-- \u7b2c 1 \u9762 - 2\uff08www.kumapress.com\uff09 -->\r\n<ins class=\"adsbygoogle\"\r\n     style=\"display:block\"\r\n     data-ad-client=\"ca-pub-5987681888830890\"\r\n     data-ad-slot=\"5379270693\"\r\n     data-ad-format=\"auto\"\r\n     data-full-width-responsive=\"true\"><\/ins>\r\n<script>\r\n     (adsbygoogle = window.adsbygoogle || []).push({});\r\n<\/script><\/div><div class=\"col-md-6\"><script async src=\"https:\/\/pagead2.googlesyndication.com\/pagead\/js\/adsbygoogle.js\"><\/script>\r\n<!-- \u7b2c 1 \u9762 - 1\uff08www.kumapress.com\uff09 -->\r\n<ins class=\"adsbygoogle\"\r\n     style=\"display:block\"\r\n     data-ad-client=\"ca-pub-5987681888830890\"\r\n     data-ad-slot=\"7353370294\"\r\n     data-ad-format=\"auto\"\r\n     data-full-width-responsive=\"true\"><\/ins>\r\n<script>\r\n     (adsbygoogle = window.adsbygoogle || []).push({});\r\n<\/script><\/div><\/aside>","protected":false},"excerpt":{"rendered":"<p>Apache\u74b0\u5883\u3067\u4f5c\u6210\u3055\u308c\u305f\u30ef\u30fc\u30c9\u30d7\u30ec\u30b9\u306e\u30b3\u30f3\u30c6\u30f3\u30c4\u3092nginx\u74b0\u5883\u306b\u79fb\u884c\u3055\u305b\u305f\u3093\u3067\u3059\u304c\u3001\u30e1\u30cb\u30e5\u30fc\u304c\u3059\u3079\u3066\u300cnot found\u300d\u306b\u3002\u3002\u3002 \u539f\u56e0\u3068\u3057\u3066\u306f\u3001\u30d1\u30fc\u30de\u30ea\u30f3\u30af\u304c\u57fa\u672c\u4ee5\u5916\u306b\u306a\u3063\u3066\u3044\u305f\u305f\u3081\u3067\u3057\u305f\u3002\u3002 \u203b\u3053\u308c\u304c\u308f\u304b\u308b\u307e\u3067 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"vkexunit_cta_each_option":"","footnotes":""},"categories":[126],"tags":[41,65],"class_list":["post-4429","post","type-post","status-publish","format-standard","hentry","category-blog-memo","tag-nginx","tag-wordpress"],"_links":{"self":[{"href":"https:\/\/kumapress.com\/index.php?rest_route=\/wp\/v2\/posts\/4429","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/kumapress.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/kumapress.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/kumapress.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/kumapress.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=4429"}],"version-history":[{"count":2,"href":"https:\/\/kumapress.com\/index.php?rest_route=\/wp\/v2\/posts\/4429\/revisions"}],"predecessor-version":[{"id":4671,"href":"https:\/\/kumapress.com\/index.php?rest_route=\/wp\/v2\/posts\/4429\/revisions\/4671"}],"wp:attachment":[{"href":"https:\/\/kumapress.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=4429"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kumapress.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=4429"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kumapress.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=4429"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}