{"id":1605,"date":"2014-12-23T22:58:05","date_gmt":"2014-12-23T13:58:05","guid":{"rendered":"http:\/\/pcok.jp\/?p=1605"},"modified":"2015-01-13T14:48:15","modified_gmt":"2015-01-13T05:48:15","slug":"nginx-conf%e3%82%92%e5%85%ac%e9%96%8b%e3%81%97%e3%81%a6%e3%81%bf%e3%82%8b","status":"publish","type":"post","link":"https:\/\/pcok.jp\/?p=1605","title":{"rendered":"nginx.conf\u3092\u516c\u958b\u3057\u3066\u307f\u308b"},"content":{"rendered":"\n<!-- Quick Adsense WordPress Plugin: http:\/\/quickadsense.com\/ -->\n<div class=\"e022e136dd4f5a651d7fbc204035043e\" data-index=\"2\" style=\"float: none; margin:10px 0 10px 0; text-align:center;\">\n<script async src=\"\/\/pagead2.googlesyndication.com\/pagead\/js\/adsbygoogle.js\"><\/script>\r\n<!-- \u8a18\u4e8b\u4e0a -->\r\n<ins class=\"adsbygoogle\"\r\n     style=\"display:inline-block;width:728px;height:90px\"\r\n     data-ad-client=\"ca-pub-9371408123332718\"\r\n     data-ad-slot=\"8970774656\"><\/ins>\r\n<script>\r\n(adsbygoogle = window.adsbygoogle || []).push({});\r\n<\/script>\n<\/div>\n<p>\u79c1\u306f\u30a6\u30a7\u30d6\u30b5\u30fc\u30d0\u30fc\u306bnginx\u3092\u5c0e\u5165\u3057\u3066\u3044\u307e\u3059\u3002nginx\u306f\u305d\u3082\u305d\u3082\u9ad8\u901f\u306a\u30b5\u30fc\u30d0\u30fc\u3068\u3057\u3066\u6709\u540d\u3067\u3059\u304c\u3001\u30b5\u30a4\u30c8\u8868\u793a\u306e\u30d1\u30d5\u30a9\u30fc\u30de\u30f3\u30b9\u3092\u4e0a\u3052\u308b\u305f\u3081\u306b\u8272\u3005\u30ab\u30b9\u30bf\u30de\u30a4\u30ba\u3092\u884c\u3063\u3066\u3044\u307e\u3059\u3002\u305d\u3053\u3067\u3001\u79c1\u304c\u4f7f\u3063\u3066\u3044\u308b\u8a2d\u5b9a\u3092\u516c\u958b\u3057\u3066\u307f\u3088\u3046\u304b\u306a\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n<p>\u4e00\u5fdc\u3053\u306e\u8a2d\u5b9a\u3067PageSpeed Insights\u306e\u30c1\u30a7\u30c3\u30af\u3067\u306f\u6700\u3082\u30b9\u30b3\u30a2\u304c\u826f\u304b\u3063\u305f\u306f\u305a\u3002\u591a\u5206\u3002\u3082\u3061\u308d\u3093\u30e6\u30fc\u30b6\u30fc\u306a\u3069\u306f\u9069\u5b9c\u66f8\u304d\u63db\u3048\u3066\u304f\u3060\u3055\u3044\u306d\u3002<\/p>\n<blockquote><p>user www-data;<br \/>\nworker_processes auto;<br \/>\nworker_rlimit_nofile 100000;<br \/>\npid \/run\/nginx.pid;<\/p>\n<p>events {<br \/>\nworker_connections 2048;<br \/>\nmulti_accept on;<br \/>\nuse epoll;<br \/>\n}<\/p>\n<p>http {<\/p>\n<p>##<br \/>\n# Basic Settings<br \/>\n##<\/p>\n<p>sendfile on;<br \/>\ntcp_nopush on;<br \/>\ntcp_nodelay on;<\/p>\n<p>keepalive_timeout 10;<br \/>\nclient_header_timeout 10;<br \/>\nclient_body_timeout 10;<br \/>\nreset_timedout_connection on;<br \/>\nsend_timeout 10;<\/p>\n<p>limit_conn_zone $binary_remote_addr zone=addr:5m;<br \/>\nlimit_conn addr 100;<\/p>\n<p>types_hash_max_size 2048;<br \/>\nserver_tokens off;<\/p>\n<p># server_names_hash_bucket_size 64;<br \/>\n# server_name_in_redirect off;<\/p>\n<p>include \/etc\/nginx\/mime.types;<br \/>\ndefault_type application\/octet-stream;<br \/>\ncharset UTF-8;<\/p>\n<p>##<br \/>\n# Logging Settings<br \/>\n##<\/p>\n<p>access_log \/var\/log\/nginx\/access.log;<br \/>\nlog_format main &#8216;$remote_addr &#8211; $remote_user [$time_local] &#8220;$request&#8221; &#8216;<br \/>\n&#8216;&#8221;$status&#8221; $body_bytes_sent &#8220;$http_referer&#8221; &#8216;<br \/>\n&#8216;&#8221;$http_user_agent&#8221; &#8220;$http_x_forwarded_for&#8221; &#8220;$gzip_ratio&#8221;&#8216;;<br \/>\nerror_log \/var\/log\/nginx\/error.log;<\/p>\n<p>##<br \/>\n# Gzip Settings<br \/>\n##<\/p>\n<p>gzip on;<br \/>\ngzip_disable &#8220;msie6&#8221;;<\/p>\n<p>gzip_vary on;<br \/>\ngzip_proxied any;<br \/>\ngzip_comp_level 6;<br \/>\ngzip_buffers 8 8k;<br \/>\ngzip_min_length 1000;<br \/>\ngzip_http_version 1.0;<br \/>\ngzip_types text\/plain text\/css application\/json application\/x-javascript text\/xml application\/xml application\/xml+rss text\/javascript;<\/p>\n<p>open_file_cache max=100000 inactive=20s;<br \/>\nopen_file_cache_valid 30s;<br \/>\nopen_file_cache_min_uses 2;<br \/>\nopen_file_cache_errors on;<\/p>\n<p>##<br \/>\n# nginx-naxsi config<br \/>\n##<br \/>\n# Uncomment it if you installed nginx-naxsi<br \/>\n##<\/p>\n<p>#include \/etc\/nginx\/naxsi_core.rules;<\/p>\n<p>##<br \/>\n# nginx-passenger config<br \/>\n##<br \/>\n# Uncomment it if you installed nginx-passenger<br \/>\n##<\/p>\n<p>#passenger_root \/usr;<br \/>\n#passenger_ruby \/usr\/bin\/ruby;<\/p>\n<p>##<br \/>\n# Virtual Host Configs<br \/>\n##<\/p>\n<p>include \/etc\/nginx\/conf.d\/*.conf;<br \/>\ninclude \/etc\/nginx\/sites-enabled\/*;<br \/>\n}<\/p><\/blockquote>\n<p>\u4e3b\u306a\u5909\u66f4\u70b9\u306f\u30ed\u30b0\u306e\u5f62\u5f0f\u3068gzip\u5727\u7e2e\u306e\u8a2d\u5b9a\u3060\u3068\u601d\u3044\u307e\u3059\u3002worker\u95a2\u4fc2\u306f\u304b\u306a\u308a\u591a\u3081\u306b\u3068\u3063\u3066\u3044\u308b\u306e\u3067\u3001\u30de\u30b7\u30f3\u30b9\u30da\u30c3\u30af\u306b\u3088\u3063\u3066\u8abf\u6574\u3057\u3066\u304f\u3060\u3055\u3044\u306d\u3002\u30ed\u30b0\u306e\u5f62\u5f0f\u306f\u3001apache\u3068\u540c\u3058\u5f62\u5f0f\u306b\u3057\u3066\u308b\u3093\u3060\u3063\u305f\u304b\u306a\u2026\uff1fwebalizer\u3067\u89e3\u6790\u3067\u304d\u308b\u5f62\u5f0f\u3067\u4fdd\u5b58\u3055\u305b\u3066\u3044\u307e\u3059\u3002webalizer\u4f7f\u3063\u3066\u3044\u306a\u3044\u65b9\u306f\u3053\u3093\u306a\u3053\u3068\u3057\u306a\u304f\u3066\u304a\u3063\u3051\u30fc\u3002\uff08accesslog\u3068errorlog\u306e\u9593\u306e\u4e09\u884c\u524a\u9664\uff09<\/p>\n<p>gzip\u5727\u7e2e\u306f\u6709\u52b9\u306b\u3057\u3066\u304a\u304f\u3068\u3001\u30da\u30fc\u30b8\u3092\u5727\u7e2e\u3057\u3066\u8ee2\u9001\u91cf\u3092\u6e1b\u3089\u3057\u3001\u8868\u793a\u901f\u5ea6\u3092\u6539\u5584\u3059\u308b\u3053\u3068\u304c\u51fa\u6765\u307e\u3059\u3002PageSpeed Insights\u306e\u30b9\u30b3\u30a2\u306b\u95a2\u308f\u3063\u3066\u304f\u308b\u306e\u3067\u3001\u9069\u7528\u3057\u3066\u307f\u3066\u3082\u3044\u3044\u306e\u3067\u306f\u306a\u3044\u3067\u3057\u3087\u3046\u304b\u3002<\/p>\n<p>\u7d30\u304b\u3044\u89e3\u8aac\u304c\u306a\u304f\u3066\u7533\u3057\u8a33\u306a\u3044\u3067\u3059\u304c\u3001\u7d39\u4ecb\u3060\u3051\u3057\u3066\u304a\u304d\u307e\u3059\u3002<\/p>\n\n<div style=\"font-size: 0px; height: 0px; line-height: 0px; margin: 0; padding: 0; clear: both;\"><\/div>","protected":false},"excerpt":{"rendered":"<p>\u79c1\u306f\u30a6\u30a7\u30d6\u30b5\u30fc\u30d0\u30fc\u306bnginx\u3092\u5c0e\u5165\u3057\u3066\u3044\u307e\u3059\u3002nginx\u306f\u305d\u3082\u305d\u3082\u9ad8\u901f\u306a\u30b5\u30fc\u30d0\u30fc\u3068\u3057\u3066\u6709\u540d\u3067\u3059\u304c\u3001\u30b5\u30a4\u30c8\u8868\u793a\u306e\u30d1\u30d5\u30a9\u30fc\u30de\u30f3\u30b9\u3092\u4e0a\u3052\u308b\u305f\u3081\u306b\u8272\u3005\u30ab\u30b9\u30bf\u30de\u30a4\u30ba\u3092\u884c\u3063\u3066\u3044\u307e\u3059\u3002\u305d\u3053\u3067\u3001\u79c1\u304c\u4f7f\u3063\u3066\u3044\u308b\u8a2d\u5b9a\u3092\u516c\u958b\u3057\u3066\u307f\u3088\u3046\u304b\u306a\u3068 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[78],"tags":[1410],"_links":{"self":[{"href":"https:\/\/pcok.jp\/index.php?rest_route=\/wp\/v2\/posts\/1605"}],"collection":[{"href":"https:\/\/pcok.jp\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/pcok.jp\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/pcok.jp\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/pcok.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1605"}],"version-history":[{"count":2,"href":"https:\/\/pcok.jp\/index.php?rest_route=\/wp\/v2\/posts\/1605\/revisions"}],"predecessor-version":[{"id":1608,"href":"https:\/\/pcok.jp\/index.php?rest_route=\/wp\/v2\/posts\/1605\/revisions\/1608"}],"wp:attachment":[{"href":"https:\/\/pcok.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1605"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/pcok.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1605"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/pcok.jp\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1605"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}