{"id":654,"date":"2023-11-13T23:59:30","date_gmt":"2023-11-13T14:59:30","guid":{"rendered":"https:\/\/web.cloudfree.jp\/journal\/?p=654"},"modified":"2023-11-18T14:35:49","modified_gmt":"2023-11-18T05:35:49","slug":"cloudfree%e3%81%a7basic%e8%aa%8d%e8%a8%bc","status":"publish","type":"post","link":"https:\/\/web.cloudfree.jp\/journal\/cloudfree%e3%81%a7basic%e8%aa%8d%e8%a8%bc\/","title":{"rendered":"cloudfree\u3067BASIC\u8a8d\u8a3c"},"content":{"rendered":"<h3 style=\"padding-top:var(--wp--preset--spacing--20);padding-bottom:var(--wp--preset--spacing--20);\" class=\"wp-block-post-title\">cloudfree\u3067BASIC\u8a8d\u8a3c<\/h3>\n\n\n<p class=\"has-tertiary-color has-text-color has-background has-small-font-size\" style=\"background-color:#8d8dd8;margin-top:0;margin-right:0;margin-bottom:0;margin-left:0;padding-top:0;padding-right:0;padding-bottom:0;padding-left:0\">2023-11-13 \u8a18\u8f09<br>\u6982\u8981 : cloudfree\u30b5\u30fc\u30d0\u30fc\u3067\u30d5\u30a9\u30eb\u30c0\u306bBASIC\u8a8d\u8a3c\u3092\u8a2d\u5b9a\u3059\u308b<br>Keyword :  cloudfree, BASIC\u8a8d\u8a3c, apache, htaccess,<\/p>\n\n\n\n<p><br>cloudfree\u30b5\u30fc\u30d0\u306e\u30d5\u30a9\u30eb\u30c0\u306bBASIC\u8a8d\u8a3c\u3092\u304b\u3051\u3066\u307f\u307e\u3057\u305f\u3002<br>\u5bfe\u8c61\u306e\u30d5\u30a9\u30eb\u30c0\u3092<br>\/public_html\/downloadfiles\/needauth\/<br>\u3068\u3057\u307e\u3059\u3002<br><br>\u8a8d\u8a3c\u30e6\u30fc\u30b6\u30fc\u3092\u8a18\u8f09\u3059\u308b.htpasswd\u30d5\u30a1\u30a4\u30eb\u306e\u7f6e\u304d\u5834\u3067\u3059\u304c\u3001cloudfree\u306e\u5834\u5408\u3001public_html\u3068\u540c\u3058\u968e\u5c64\u306bhtpasswd\u3068\u3044\u3046\u540d\u306e\u30d5\u30a9\u30eb\u30c0\u3092\u4f5c\u3063\u3066\u304f\u308c\u3066\u307e\u3059\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"215\" height=\"226\" src=\"https:\/\/web.cloudfree.jp\/journal\/wp-content\/uploads\/2023\/11\/htpswd.jpg\" alt=\"\" class=\"wp-image-655\"\/><\/figure>\n\n\n\n<p>.htpasswd\u306f\u30b3\u30b3\u306b\u304a\u3044\u3066\u304f\u308c\u3001\u3068\u3044\u3046\u611f\u3058\u3067\u3059\u306d\u3002\u3069\u3053\u306b\u7f6e\u3044\u3066\u3082\u3088\u3044\u306e\u3067\u3059\u304c\u3001\u3053\u306e\u30d5\u30a1\u30a4\u30eb\u306e\u6240\u5728\u30d1\u30b9\u306f\u30b5\u30fc\u30d0\u30fc\u5185\u306e\u30eb\u30fc\u30c8\u30d5\u30a9\u30eb\u30c0\u304b\u3089\u306e\u30d1\u30b9\u306b\u306a\u308b\u70b9\u304c\u6ce8\u610f\u5fc5\u8981\u3067\u3059\u3002<br><br>\u624b\u9806<br>[1] .htaccess \u306bBASIC\u8a8d\u8a3c\u3092\u8a18\u8f09\u3057\u3066\u5f53\u8a72\u30d5\u30a9\u30eb\u30c0\u306b\u914d\u7f6e<br>[2] .htpasswd\u30d5\u30a1\u30a4\u30eb\u3092\u4f5c\u6210<br>[3] .htpasswd\u30d5\u30a1\u30a4\u30eb\u3092 htpasswd\u30d5\u30a9\u30eb\u30c0\u306b\u914d\u7f6e<br><br>\u307e\u305a\u306f<br>\/public_html\/downloadfiles\/needauth\/.htaccess<br>\u306e\u30d5\u30a1\u30a4\u30eb\u5185\u5bb9\u3068\u914d\u7f6e\u3002(3\u884c\u306eweb\u306f\u5404\u81ea\u306e\u30b5\u30fc\u30d0\u30fcID\u306b)<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-sql\" data-file=\".htaccess\" data-lang=\"SQL\" data-show-lang=\"1\"><code>AuthType Basic\nAuthName &quot;Please enter your ID and password&quot;\nAuthUserFile \/home\/web\/web.cloudfree.jp\/htpasswd\/downloadfiles_needauth.htpasswd\nrequire valid-user<\/code><\/pre><\/div>\n\n\n\n<p>.htpasswd \u306e\u30d5\u30a1\u30a4\u30eb\u540d\u3092\u3053\u3053\u3067\u306f<br>downloadfiles_needauth.htpasswd<br>\u3068\u3057\u3066\u3044\u307e\u3059\u3002<br>\u3069\u3053\u306e\u30d5\u30a9\u30eb\u30c0\u306e\u30e6\u30fc\u30b6\u30fc:\u30d1\u30b9\u30ef\u30fc\u30c9\u306a\u306e\u304b\u304c\u308f\u304b\u308b\u3088\u3046\u306b\u3002<br>.htpasswd \u3068\u3044\u3046\u540d\u524d\u306b\u9650\u3089\u308c\u308b\u5834\u5408\u3082\u3042\u308b\u304b\u3082\u3057\u308c\u307e\u305b\u3093\u304c\u3001cloudfree\u3067\u8a66\u3057\u305f\u3068\u3053\u308d\u3053\u308c\u3067\u8a8d\u8a3c\u3067\u304d\u307e\u3057\u305f\u3002<br><br>.htpasswd \u306e\u4e2d\u8eab\u306f<br>\u30e6\u30fc\u30b6\u30fcID:\u30d1\u30b9\u30ef\u30fc\u30c9<br>\u3068\u3044\u30461\u884c\u304c1\u30e6\u30fc\u30b6\u30fc\u3067\u3001\u305d\u306e\u7f85\u5217\u306a\u306e\u3067\u3059\u304c\u3001\u30d1\u30b9\u30ef\u30fc\u30c9\u3092\u5e73\u6587\u3067\u66f8\u304f\u3068\u30a8\u30e9\u30fc\u306b\u306a\u308a\u307e\u3057\u305f\u3002localhost\u3067\u306f\u3044\u3051\u307e\u3057\u305f\u304ccloudfree\u3067\u306f\u6697\u53f7\u5316\u5fc5\u9808\u306e\u3088\u3046\u3067\u3059\u3002<br>\u6697\u53f7\u5316\u306b\u306fApache24\\bin\u30d5\u30a9\u30eb\u30c0\u5185\u306b\u3042\u308bhtpasswd.exe\u3092\u4f7f\u3044\u307e\u3059\u3002<br>\u30a6\u30a7\u30d6\u3067\u624b\u8efd\u306b\u6697\u53f7\u5316\u3067\u304d\u308b\u30b5\u30a4\u30c8\u3082\u3042\u308b\u3088\u3046\u3067\u3059\u3002\u3057\u304b\u3057\u5909\u63db\u306e\u30d3\u30c3\u30b0\u30c7\u30fc\u30bf\u304c\u84c4\u3048\u3089\u308c\u3066\u3044\u3066\u3069\u3053\u304b\u3067\u4f7f\u308f\u308c\u308b\u304b\u3082\u3001\u3068\u3044\u3046\u53ef\u80fd\u6027\u3082\u306a\u304f\u306f\u306a\u3044\u3067\u3059\u3002<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-bash\" data-lang=\"Bash\" data-show-lang=\"1\"><code>C:\\pgm\\Apache24\\bin&gt;htpasswd.exe -c C:\\home\\web\\web.cloudfree.jp\\htpasswd\\downloadfiles.needauth.htpasswd user0001\nNew password: ********\nRe-type new password: ********\nAdding password for user user0001\n\nC:\\pgm\\Apache24\\bin&gt;htpasswd.exe C:\\home\\web\\web.cloudfree.jp\\htpasswd\\downloadfiles.needauth.htpasswd user0002\nNew password: ********\nRe-type new password: ********\nAdding password for user user0002<\/code><\/pre><\/div>\n\n\n\n<p>\u6700\u521d\u306e\u30e6\u30fc\u30b6\u30fc\u3068\u8ffd\u52a0\u306e\u30e6\u30fc\u30b6\u30fc\u3068\u3067\u3001-c \u304c\u9055\u3044\u307e\u3059\u3002<br>\u3053\u308c\u3067downloadfiles.needauth.htpasswd\u306e\u4e2d\u8eab\u306f\u4ee5\u4e0b\u3002<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-plain\"><code>user0001:$apr1$ONMezh89$WB5A.ZnX0K\/lNmGyMPfuN1\nuser0002:$apr1$BYbnWYYn$YbtDjcqkC5w3s5Bf3b542.<\/code><\/pre><\/div>\n\n\n\n<p>htpasswd.exe\u306ehelp\u306f\u4ee5\u4e0b\u3002<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-plain\"><code>C:\\pgm\\Apache24\\bin&gt;htpasswd.exe -h\nhtpasswd.exe: illegal option -- h\nUsage:\n        htpasswd [-cimBdpsDv] [-C cost] passwordfile username\n        htpasswd -b[cmBdpsDv] [-C cost] passwordfile username password\n\n        htpasswd -n[imBdps] [-C cost] username\n        htpasswd -nb[mBdps] [-C cost] username password\n -c  Create a new file.\n -n  Don&#39;t update file; display results on stdout.\n -b  Use the password from the command line rather than prompting for it.\n -i  Read password from stdin without verification (for script usage).\n -m  Force MD5 encryption of the password (default).\n -B  Force bcrypt encryption of the password (very secure).\n -C  Set the computing time used for the bcrypt algorithm\n     (higher is more secure but slower, default: 5, valid: 4 to 17).\n -d  Force CRYPT encryption of the password (8 chars max, insecure).\n -s  Force SHA encryption of the password (insecure).\n -p  Do not encrypt the password (plaintext, insecure).\n -D  Delete the specified user.\n -v  Verify password for the specified user.\nOn other systems than Windows and NetWare the &#39;-p&#39; flag will probably not work.\nThe SHA algorithm does not use a salt and is less secure than the MD5 algorithm.<\/code><\/pre><\/div>\n\n\n\n<p>.htaccess<br>downloadfiles.needauth.htpasswd<br>\u3092\u305d\u308c\u305e\u308c\u914d\u7f6e\u3057\u3066\u5b8c\u4e86\u3002<br>\u3061\u306a\u307f\u306bApach &amp; Windows \u306e\u74b0\u5883\u3060\u3068\u3001.htaccess\u8a18\u8f09\u306e\u30d1\u30b9<br>AuthUserFile \/home\/web\/web.cloudfree.jp\/htpasswd\/downloadfiles_needauth.htpasswd<br>\u306f\u5148\u982d\u306bC:\u3092\u3064\u3051\u3066\u3001C:\\\/home\/\uff5e\u3092\u63a2\u3057\u307e\u3059\u3002<br>\u3088\u3063\u3066\u30ed\u30fc\u30ab\u30eb\u306e\u30d5\u30a1\u30a4\u30eb\u3092 C:\/home\/web\/ \u914d\u4e0b\u306b\u6301\u3066\u3070\u3001BASIC\u8a8d\u8a3c\u95a2\u4fc2\u306e\u8a2d\u5b9a\u306f\u30b5\u30fc\u30d0\u30fc\u3068\u30ed\u30fc\u30ab\u30eb\u3001\u30d5\u30a1\u30a4\u30eb\u7de8\u96c6\u306a\u3057\u3067\u5171\u901a\u3057\u3066\u4f5c\u52d5\u3057\u307e\u3059\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>BASIC\u8a8d\u8a3c\u3002cloudfree\u3067\u306fpublic_html\u3068\u540c\u968e\u5c64\u306bhtpasswd\u30d5\u30a9\u30eb\u30c0\u3092\u7528\u610f\u3057\u3066\u304f\u308c\u3066\u307e\u3059\u3002<\/p>\n","protected":false},"author":1,"featured_media":656,"comment_status":"open","ping_status":"closed","sticky":false,"template":"wp-custom-template-x24-index","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[21,70,13,15,24],"_links":{"self":[{"href":"https:\/\/web.cloudfree.jp\/journal\/wp-json\/wp\/v2\/posts\/654"}],"collection":[{"href":"https:\/\/web.cloudfree.jp\/journal\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/web.cloudfree.jp\/journal\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/web.cloudfree.jp\/journal\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/web.cloudfree.jp\/journal\/wp-json\/wp\/v2\/comments?post=654"}],"version-history":[{"count":0,"href":"https:\/\/web.cloudfree.jp\/journal\/wp-json\/wp\/v2\/posts\/654\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/web.cloudfree.jp\/journal\/wp-json\/wp\/v2\/media\/656"}],"wp:attachment":[{"href":"https:\/\/web.cloudfree.jp\/journal\/wp-json\/wp\/v2\/media?parent=654"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/web.cloudfree.jp\/journal\/wp-json\/wp\/v2\/categories?post=654"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/web.cloudfree.jp\/journal\/wp-json\/wp\/v2\/tags?post=654"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}