{"id":273,"date":"2015-09-06T15:13:21","date_gmt":"2015-09-06T06:13:21","guid":{"rendered":"http:\/\/www.cotegg.com\/blog\/?p=273"},"modified":"2015-09-06T15:13:21","modified_gmt":"2015-09-06T06:13:21","slug":"%e3%80%90nginx%e3%80%91%e3%81%9d%e3%81%86%e3%81%a0%ef%bc%81basic%e8%aa%8d%e8%a8%bc%e3%82%92%e6%8e%9b%e3%81%91%e3%82%88%e3%81%86","status":"publish","type":"post","link":"https:\/\/www.cotegg.com\/blog\/?p=273","title":{"rendered":"\u3010nginx\u3011\u305d\u3046\u3060\uff01Basic\u8a8d\u8a3c\u3092\u639b\u3051\u3088\u3046"},"content":{"rendered":"<p>\u3069\u3046\u3082\u3001\u4e2d\u7530\u3067\u3059\u3002<\/p>\n<p>nginx\u3067\u30d9\u30fc\u30b7\u30c3\u30af\u8a8d\u8a3c\u3092\u304b\u3051\u308b\u65b9\u6cd5\u3067\u3059\u3002<br \/>\n\u3053\u308c\u304b\u3089\u3082\u3088\u304f\u3042\u308a\u305d\u3046\u306a\u306e\u3067\u30e1\u30e2\u308b\u30e1\u30e2\u308b\u3002<\/p>\n<blockquote><p>\n  \u74b0\u5883<br \/>\n  CentOS 7<br \/>\n  nginx 1.8.0\n<\/p><\/blockquote>\n<h5>htpasswd\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/h5>\n<p><code>$ sudo yum install httpd-tools<\/code><\/p>\n<h5>\u30d1\u30b9\u30ef\u30fc\u30c9\u306e\u8a2d\u5b9a<\/h5>\n<blockquote><p>\n  \u8a8d\u8a3c\u7528\u30d5\u30a1\u30a4\u30eb\u306f\u2026 <code>\/etc\/nginx\/.htpasswd<\/code> \u3053\u308c\u306b\u3059\u308b\u305c\n<\/p><\/blockquote>\n<p><code>$ cd \/etc\/nginx<\/code><br \/>\n<code>$ sudo htpasswd -c .htpasswd &lt;user name&gt;<\/code><\/p>\n<h5>nginx\u8a2d\u5b9a<\/h5>\n<p>location\u3068\u304b\u306e\u4e2d\u306b\u3053\u308c\u3092\u8ffd\u52a0<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\nauth_basic &quot;Restricted&quot;;\r\nauth_basic_user_file \/etc\/nginx\/.htpasswd;\r\n<\/pre>\n<p>\u3053\u308c\u3067\u30c0\u30a4\u30b8\u30e7\u30a6\u30d6\u306d<\/p>\n<blockquote><p>\n  \u611f\u8b1d\u30b5\u30a4\u30c8<br \/>\n  http:\/\/easyramble.com\/nginx-basic-auth.html\n<\/p><\/blockquote>\n","protected":false},"excerpt":{"rendered":"<p>\u3069\u3046\u3082\u3001\u4e2d\u7530\u3067\u3059\u3002 nginx\u3067\u30d9\u30fc\u30b7\u30c3\u30af\u8a8d\u8a3c\u3092\u304b\u3051\u308b\u65b9\u6cd5\u3067\u3059\u3002 \u3053\u308c\u304b\u3089\u3082\u3088\u304f &#8230; <\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"inline_featured_image":false,"footnotes":""},"categories":[7],"tags":[22,18],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.13 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>\u3010nginx\u3011\u305d\u3046\u3060\uff01Basic\u8a8d\u8a3c\u3092\u639b\u3051\u3088\u3046 | \u30b3\u30fc\u30c6\u30c3\u30b0\u306e\u30d0\u30b1\u30c4<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.cotegg.com\/blog\/?p=273\" \/>\n<meta property=\"og:locale\" content=\"ja_JP\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u3010nginx\u3011\u305d\u3046\u3060\uff01Basic\u8a8d\u8a3c\u3092\u639b\u3051\u3088\u3046 | \u30b3\u30fc\u30c6\u30c3\u30b0\u306e\u30d0\u30b1\u30c4\" \/>\n<meta property=\"og:description\" content=\"\u3069\u3046\u3082\u3001\u4e2d\u7530\u3067\u3059\u3002 nginx\u3067\u30d9\u30fc\u30b7\u30c3\u30af\u8a8d\u8a3c\u3092\u304b\u3051\u308b\u65b9\u6cd5\u3067\u3059\u3002 \u3053\u308c\u304b\u3089\u3082\u3088\u304f ...\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.cotegg.com\/blog\/?p=273\" \/>\n<meta property=\"og:site_name\" content=\"\u30b3\u30fc\u30c6\u30c3\u30b0\u306e\u30d0\u30b1\u30c4\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/COTegg.japan\/\" \/>\n<meta property=\"article:published_time\" content=\"2015-09-06T06:13:21+00:00\" \/>\n<meta name=\"author\" content=\"\u4e2d\u7530 \u6b69\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@cotegg_japan\" \/>\n<meta name=\"twitter:site\" content=\"@cotegg_japan\" \/>\n<meta name=\"twitter:label1\" content=\"\u57f7\u7b46\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"\u4e2d\u7530 \u6b69\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.cotegg.com\/blog\/?p=273#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.cotegg.com\/blog\/?p=273\"},\"author\":{\"name\":\"\u4e2d\u7530 \u6b69\",\"@id\":\"https:\/\/www.cotegg.com\/blog\/#\/schema\/person\/bee6afc3e5cc03652345976570794aef\"},\"headline\":\"\u3010nginx\u3011\u305d\u3046\u3060\uff01Basic\u8a8d\u8a3c\u3092\u639b\u3051\u3088\u3046\",\"datePublished\":\"2015-09-06T06:13:21+00:00\",\"dateModified\":\"2015-09-06T06:13:21+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.cotegg.com\/blog\/?p=273\"},\"wordCount\":27,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/www.cotegg.com\/blog\/#organization\"},\"keywords\":[\"basic\",\"nginx\"],\"articleSection\":[\"\u6280\u8853\"],\"inLanguage\":\"ja\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.cotegg.com\/blog\/?p=273#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.cotegg.com\/blog\/?p=273\",\"url\":\"https:\/\/www.cotegg.com\/blog\/?p=273\",\"name\":\"\u3010nginx\u3011\u305d\u3046\u3060\uff01Basic\u8a8d\u8a3c\u3092\u639b\u3051\u3088\u3046 | \u30b3\u30fc\u30c6\u30c3\u30b0\u306e\u30d0\u30b1\u30c4\",\"isPartOf\":{\"@id\":\"https:\/\/www.cotegg.com\/blog\/#website\"},\"datePublished\":\"2015-09-06T06:13:21+00:00\",\"dateModified\":\"2015-09-06T06:13:21+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/www.cotegg.com\/blog\/?p=273#breadcrumb\"},\"inLanguage\":\"ja\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.cotegg.com\/blog\/?p=273\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.cotegg.com\/blog\/?p=273#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.cotegg.com\/blog\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u3010nginx\u3011\u305d\u3046\u3060\uff01Basic\u8a8d\u8a3c\u3092\u639b\u3051\u3088\u3046\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.cotegg.com\/blog\/#website\",\"url\":\"https:\/\/www.cotegg.com\/blog\/\",\"name\":\"COTegg\u306e\u30d0\u30b1\u30c4\",\"description\":\"- Bucket of cotegg -\",\"publisher\":{\"@id\":\"https:\/\/www.cotegg.com\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.cotegg.com\/blog\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"ja\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.cotegg.com\/blog\/#organization\",\"name\":\"COTegg Inc.\",\"url\":\"https:\/\/www.cotegg.com\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"ja\",\"@id\":\"https:\/\/www.cotegg.com\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.cotegg.com\/blog\/wp-content\/uploads\/2015\/07\/logo_color1_yoko-e1436354651882.png\",\"contentUrl\":\"https:\/\/www.cotegg.com\/blog\/wp-content\/uploads\/2015\/07\/logo_color1_yoko-e1436354651882.png\",\"width\":176,\"height\":60,\"caption\":\"COTegg Inc.\"},\"image\":{\"@id\":\"https:\/\/www.cotegg.com\/blog\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/COTegg.japan\/\",\"https:\/\/twitter.com\/cotegg_japan\",\"https:\/\/www.instagram.com\/cotegg_japan\/\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.cotegg.com\/blog\/#\/schema\/person\/bee6afc3e5cc03652345976570794aef\",\"name\":\"\u4e2d\u7530 \u6b69\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"ja\",\"@id\":\"https:\/\/www.cotegg.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/ce4d0b00ef87081854562ad73f762659?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/ce4d0b00ef87081854562ad73f762659?s=96&d=mm&r=g\",\"caption\":\"\u4e2d\u7530 \u6b69\"},\"sameAs\":[\"http:\/\/www.cotegg.com\"],\"url\":\"https:\/\/www.cotegg.com\/blog\/?author=2\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"\u3010nginx\u3011\u305d\u3046\u3060\uff01Basic\u8a8d\u8a3c\u3092\u639b\u3051\u3088\u3046 | \u30b3\u30fc\u30c6\u30c3\u30b0\u306e\u30d0\u30b1\u30c4","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.cotegg.com\/blog\/?p=273","og_locale":"ja_JP","og_type":"article","og_title":"\u3010nginx\u3011\u305d\u3046\u3060\uff01Basic\u8a8d\u8a3c\u3092\u639b\u3051\u3088\u3046 | \u30b3\u30fc\u30c6\u30c3\u30b0\u306e\u30d0\u30b1\u30c4","og_description":"\u3069\u3046\u3082\u3001\u4e2d\u7530\u3067\u3059\u3002 nginx\u3067\u30d9\u30fc\u30b7\u30c3\u30af\u8a8d\u8a3c\u3092\u304b\u3051\u308b\u65b9\u6cd5\u3067\u3059\u3002 \u3053\u308c\u304b\u3089\u3082\u3088\u304f ...","og_url":"https:\/\/www.cotegg.com\/blog\/?p=273","og_site_name":"\u30b3\u30fc\u30c6\u30c3\u30b0\u306e\u30d0\u30b1\u30c4","article_publisher":"https:\/\/www.facebook.com\/COTegg.japan\/","article_published_time":"2015-09-06T06:13:21+00:00","author":"\u4e2d\u7530 \u6b69","twitter_card":"summary_large_image","twitter_creator":"@cotegg_japan","twitter_site":"@cotegg_japan","twitter_misc":{"\u57f7\u7b46\u8005":"\u4e2d\u7530 \u6b69"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.cotegg.com\/blog\/?p=273#article","isPartOf":{"@id":"https:\/\/www.cotegg.com\/blog\/?p=273"},"author":{"name":"\u4e2d\u7530 \u6b69","@id":"https:\/\/www.cotegg.com\/blog\/#\/schema\/person\/bee6afc3e5cc03652345976570794aef"},"headline":"\u3010nginx\u3011\u305d\u3046\u3060\uff01Basic\u8a8d\u8a3c\u3092\u639b\u3051\u3088\u3046","datePublished":"2015-09-06T06:13:21+00:00","dateModified":"2015-09-06T06:13:21+00:00","mainEntityOfPage":{"@id":"https:\/\/www.cotegg.com\/blog\/?p=273"},"wordCount":27,"commentCount":0,"publisher":{"@id":"https:\/\/www.cotegg.com\/blog\/#organization"},"keywords":["basic","nginx"],"articleSection":["\u6280\u8853"],"inLanguage":"ja","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.cotegg.com\/blog\/?p=273#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.cotegg.com\/blog\/?p=273","url":"https:\/\/www.cotegg.com\/blog\/?p=273","name":"\u3010nginx\u3011\u305d\u3046\u3060\uff01Basic\u8a8d\u8a3c\u3092\u639b\u3051\u3088\u3046 | \u30b3\u30fc\u30c6\u30c3\u30b0\u306e\u30d0\u30b1\u30c4","isPartOf":{"@id":"https:\/\/www.cotegg.com\/blog\/#website"},"datePublished":"2015-09-06T06:13:21+00:00","dateModified":"2015-09-06T06:13:21+00:00","breadcrumb":{"@id":"https:\/\/www.cotegg.com\/blog\/?p=273#breadcrumb"},"inLanguage":"ja","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.cotegg.com\/blog\/?p=273"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.cotegg.com\/blog\/?p=273#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.cotegg.com\/blog"},{"@type":"ListItem","position":2,"name":"\u3010nginx\u3011\u305d\u3046\u3060\uff01Basic\u8a8d\u8a3c\u3092\u639b\u3051\u3088\u3046"}]},{"@type":"WebSite","@id":"https:\/\/www.cotegg.com\/blog\/#website","url":"https:\/\/www.cotegg.com\/blog\/","name":"COTegg\u306e\u30d0\u30b1\u30c4","description":"- Bucket of cotegg -","publisher":{"@id":"https:\/\/www.cotegg.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.cotegg.com\/blog\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"ja"},{"@type":"Organization","@id":"https:\/\/www.cotegg.com\/blog\/#organization","name":"COTegg Inc.","url":"https:\/\/www.cotegg.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"ja","@id":"https:\/\/www.cotegg.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.cotegg.com\/blog\/wp-content\/uploads\/2015\/07\/logo_color1_yoko-e1436354651882.png","contentUrl":"https:\/\/www.cotegg.com\/blog\/wp-content\/uploads\/2015\/07\/logo_color1_yoko-e1436354651882.png","width":176,"height":60,"caption":"COTegg Inc."},"image":{"@id":"https:\/\/www.cotegg.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/COTegg.japan\/","https:\/\/twitter.com\/cotegg_japan","https:\/\/www.instagram.com\/cotegg_japan\/"]},{"@type":"Person","@id":"https:\/\/www.cotegg.com\/blog\/#\/schema\/person\/bee6afc3e5cc03652345976570794aef","name":"\u4e2d\u7530 \u6b69","image":{"@type":"ImageObject","inLanguage":"ja","@id":"https:\/\/www.cotegg.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/ce4d0b00ef87081854562ad73f762659?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/ce4d0b00ef87081854562ad73f762659?s=96&d=mm&r=g","caption":"\u4e2d\u7530 \u6b69"},"sameAs":["http:\/\/www.cotegg.com"],"url":"https:\/\/www.cotegg.com\/blog\/?author=2"}]}},"_links":{"self":[{"href":"https:\/\/www.cotegg.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/273"}],"collection":[{"href":"https:\/\/www.cotegg.com\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.cotegg.com\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.cotegg.com\/blog\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.cotegg.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=273"}],"version-history":[{"count":2,"href":"https:\/\/www.cotegg.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/273\/revisions"}],"predecessor-version":[{"id":275,"href":"https:\/\/www.cotegg.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/273\/revisions\/275"}],"wp:attachment":[{"href":"https:\/\/www.cotegg.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=273"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.cotegg.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=273"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.cotegg.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=273"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}