{"id":2422,"date":"2013-11-29T15:00:24","date_gmt":"2013-11-29T06:00:24","guid":{"rendered":"https:\/\/www.united-bears.co.jp\/blog\/?p=2422"},"modified":"2013-11-28T17:15:37","modified_gmt":"2013-11-28T08:15:37","slug":"apache-2-2-x-%e3%81%a7%e3%83%99%e3%83%bc%e3%82%b7%e3%83%83%e3%82%af%e8%aa%8d%e8%a8%bc1-%ef%bd%9e%e3%83%95%e3%82%a1%e3%82%a4%e3%83%ab%e3%82%92%e5%88%a9%e7%94%a8%e3%81%99%e3%82%8b%ef%bd%9e","status":"publish","type":"post","link":"https:\/\/www.united-bears.co.jp\/blog\/archives\/2422","title":{"rendered":"Apache 2.2.x \u3067\u30d9\u30fc\u30b7\u30c3\u30af\u8a8d\u8a3c(1) \uff5e\u30d5\u30a1\u30a4\u30eb\u3092\u5229\u7528\u3059\u308b\uff5e"},"content":{"rendered":"<p>Apache 2.2.x \u306b\u306f\u3001\u3055\u307e\u3056\u307e\u306a\u8a8d\u8a3c\u30e2\u30b8\u30e5\u30fc\u30eb\u304c\u3042\u308b\u3002\u4e00\u822c\u7684\u306a\u306e\u306f<a href=\"http:\/\/httpd.apache.org\/docs\/2.2\/ja\/mod\/mod_authn_file.html\" targt=\"_blanK\" target=\"_blank\">mod_authn_file<\/a>\u3092\u4f7f\u7528\u3057\u3066\u3001\u30c6\u30ad\u30b9\u30c8\u30d5\u30a1\u30a4\u30eb\u3067\u7ba1\u7406\u3059\u308b\u65b9\u6cd5\u3060\u308d\u3046\u3002<\/p>\n<p>\u30c6\u30ad\u30b9\u30c8\u30d5\u30a1\u30a4\u30eb\u3092\u5229\u7528\u3057\u305f\u57fa\u672c\u8a8d\u8a3c\u306f\u3001\u8907\u6570\u306e\u30e2\u30b8\u30e5\u30fc\u30eb\u3092\u7d4c\u7531\u3057\u3066\u884c\u308f\u308c\u308b\u3002<\/p>\n<ol>\n<li>AuthType Basic \u306b\u3088\u308a mod_auth_basic \u304c\u8d77\u52d5<\/li>\n<li>AuthBasicProvider file \u306b\u3088\u308a mod_authn_file \u304c\u8d77\u52d5\u3057\u3001AuthUserFile \u30c7\u30a3\u30ec\u30af\u30c6\u30a3\u30d6\u306b\u6307\u5b9a\u3055\u308c\u305f\u30d5\u30a1\u30a4\u30eb\u3092\u8aad\u3080<\/li>\n<li>Require \u306e\u5b9a\u7fa9\u306b\u5f93\u3063\u3066\u3001mod_authz_user \u304c\u627f\u8a8d<\/li>\n<\/ol>\n<p>\u30c6\u30ad\u30b9\u30c8\u30d5\u30a1\u30a4\u30eb\u3092\u4f7f\u3063\u3066\u30d9\u30fc\u30b7\u30c3\u30af\u8a8d\u8a3c\u3092\u884c\u3063\u3066\u3044\u308b\u5834\u5408\u3001\u4e00\u822c\u7684\u306b\u306f\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u8a2d\u5b9a\u3092\u884c\u3046\u3002<br \/>\n\u691c\u8a3c\u74b0\u5883\u306f\u3001Cent OS 6.4 \u3068 Apache 2.2.15\u3001MySQL 5.1.69\u3060\u3002<\/p>\n<pre>\r\n#\u57fa\u672c\u8a8d\u8a3c\r\nLoadModule auth_basic_module modules\/mod_auth_basic.so\r\n#\u30db\u30b9\u30c8\u540d\/IP\u30a2\u30c9\u30ec\u30b9\u306b\u3088\u308b\u5236\u5fa1\r\nLoadModule authz_host_module modules\/mod_authz_host.so\r\n#\u30e6\u30fc\u30b6\u30fc\u540d\u306b\u3088\u308b\u627f\u8a8d\r\nLoadModule authz_user_module modules\/mod_authz_user.so\r\n#\u30b0\u30eb\u30fc\u30d7\u540d\u306b\u3088\u308b\u627f\u8a8d\r\nLoadModule authz_groupfile_module modules\/mod_authz_groupfile.so\r\n#\u30c6\u30ad\u30b9\u30c8\u30d5\u30a1\u30a4\u30eb\u3092\u7528\u3044\u305f\u30e6\u30fc\u30b6\u8a8d\u8a3c\r\nLoadModule authn_file_module modules\/mod_authn_file.so\r\n\r\n...\r\n\r\n&lt;Directory \"\/var\/www\/html\"&gt;\r\n    Options FollowSymLinks\r\n    AllowOverride None\r\n    \r\n    AuthType Basic\r\n    AuthBasicProvider file\r\n    AuthUserFile \/etc\/httpd\/conf\/passwd\r\n    AuthGroupFile \/dev\/null\r\n    AuthName \"Authentication Area\"\r\n    Require valid-user\r\n\r\n    Order allow,deny\r\n    Allow from all\r\n&lt;\/Directory&gt;\r\n<\/pre>\n<p>\u300c\/etc\/httpd\/conf\/passwd\u300d\u30d5\u30a1\u30a4\u30eb\u306f\u3001\u30e6\u30fc\u30b6\u30fc ID \u3068\u30d1\u30b9\u30ef\u30fc\u30c9\u306e\u4e00\u89a7\u3092\u683c\u7d0d\u3057\u305f\u30d5\u30a1\u30a4\u30eb\u3067\u3001htpasswd \u3067\u751f\u6210\u3059\u308b\u3002<\/p>\n<pre>\r\nhtpasswd -c \/etc\/httpd\/conf\/passwd user1\r\n<\/pre>\n<p>\u30e6\u30fc\u30b6\u30fc\u306e\u8ffd\u52a0\u3084\u524a\u9664\u3082\u3067\u304d\u308b\u305f\u3081\u3001\u30e6\u30fc\u30b6\u30fc\u6570\u304c\u5c11\u306a\u3044\u5834\u5408\u306f\u30d5\u30a1\u30a4\u30eb\u3092\u5229\u7528\u3057\u305f\u65b9\u304c\u697d\u3060\u308d\u3046\u3002\u9006\u306b\u30e6\u30fc\u30b6\u30fc\u6570\u304c\u5897\u3048\u308b\u3068\u3001\u30e6\u30fc\u30b6\u30fc\u306e\u691c\u7d22\u306b\u6642\u9593\u304c\u304b\u304b\u308b\u3088\u3046\u306b\u306a\u308a\u9045\u304f\u306a\u308b\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Apache 2.2.x \u306b\u306f\u3001\u3055\u307e\u3056\u307e\u306a\u8a8d\u8a3c\u30e2\u30b8\u30e5\u30fc\u30eb\u304c\u3042\u308b\u3002\u4e00\u822c\u7684\u306a\u306e\u306fmod_authn_file\u3092\u4f7f\u7528\u3057\u3066\u3001\u30c6\u30ad\u30b9\u30c8\u30d5\u30a1\u30a4\u30eb\u3067\u7ba1\u7406\u3059\u308b\u65b9\u6cd5\u3060\u308d\u3046\u3002 \u30c6\u30ad\u30b9\u30c8\u30d5\u30a1\u30a4\u30eb\u3092\u5229\u7528\u3057\u305f\u57fa\u672c\u8a8d\u8a3c\u306f\u3001\u8907\u6570\u306e\u30e2\u30b8\u30e5\u30fc\u30eb\u3092\u7d4c\u7531\u3057\u3066 [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[15],"tags":[],"class_list":["post-2422","post","type-post","status-publish","format-standard","hentry","category-server"],"_links":{"self":[{"href":"https:\/\/www.united-bears.co.jp\/blog\/wp-json\/wp\/v2\/posts\/2422","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.united-bears.co.jp\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.united-bears.co.jp\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.united-bears.co.jp\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.united-bears.co.jp\/blog\/wp-json\/wp\/v2\/comments?post=2422"}],"version-history":[{"count":12,"href":"https:\/\/www.united-bears.co.jp\/blog\/wp-json\/wp\/v2\/posts\/2422\/revisions"}],"predecessor-version":[{"id":2434,"href":"https:\/\/www.united-bears.co.jp\/blog\/wp-json\/wp\/v2\/posts\/2422\/revisions\/2434"}],"wp:attachment":[{"href":"https:\/\/www.united-bears.co.jp\/blog\/wp-json\/wp\/v2\/media?parent=2422"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.united-bears.co.jp\/blog\/wp-json\/wp\/v2\/categories?post=2422"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.united-bears.co.jp\/blog\/wp-json\/wp\/v2\/tags?post=2422"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}