{"id":705,"date":"2007-05-22T21:08:48","date_gmt":"2007-05-23T02:08:48","guid":{"rendered":"http:\/\/softbeam.net\/hobby\/?p=705"},"modified":"2007-05-22T21:08:48","modified_gmt":"2007-05-23T02:08:48","slug":"access-control-to-the-web-site-directory","status":"publish","type":"post","link":"http:\/\/softbeam.net\/hobby\/?p=705","title":{"rendered":"access control to the web site directory"},"content":{"rendered":"<p>It can be done with .htaccess file, but in linux modifying httpd.conf, if you can access, seems more efficient:<\/p>\n<p>just below:<\/p>\n<p># Controls who can get stuff from this server.<br \/>\n#<br \/>\nOrder allow,deny<br \/>\nAllow from all<br \/>\nAllow from 127.0.0.1<\/p>\n<p>adding some lines like the following:<\/p>\n<p># blab blab &#8230;<br \/>\n&lt;Directory &#8220;\/path to you website\/the directory you want to control&#8221;&gt;<br \/>\nOrder deny,allow<br \/>\nDeny from All<br \/>\n#Allow from 127.0.0.1<\/p>\n<p>AuthType Basic<br \/>\nAuthName &#8220;Password Required&#8221;<br \/>\nAuthUserFile &#8220;\/somewhere\/your passwd file&#8221;<br \/>\nRequire valid-user<br \/>\n#  AuthGroupFile \/www\/passwords\/group.file<br \/>\n#  Require Group admins<\/p>\n<p>Allow from 127.0.0.1<br \/>\nSatisfy Any<br \/>\n&lt;\/Directory&gt;<br \/>\nthen in xterm, use htpasswd command:<\/p>\n<p>htpasswd &#8220;passwdfile&#8221; username<\/p>\n<p>at the prompt, input the password<\/p>\n<p>That&#8217;s it.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>It can be done with .htaccess file, but in linux modifying httpd.conf, if you can access, seems more efficient: just below: # Controls who can get stuff from this server. # Order allow,deny Allow from all Allow from 127.0.0.1 adding some lines like the following: # blab blab &#8230; &lt;Directory &#8220;\/path to you website\/the directory &hellip; <a href=\"http:\/\/softbeam.net\/hobby\/?p=705\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;access control to the web site directory&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-705","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"http:\/\/softbeam.net\/hobby\/index.php?rest_route=\/wp\/v2\/posts\/705","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/softbeam.net\/hobby\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/softbeam.net\/hobby\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/softbeam.net\/hobby\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/softbeam.net\/hobby\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=705"}],"version-history":[{"count":0,"href":"http:\/\/softbeam.net\/hobby\/index.php?rest_route=\/wp\/v2\/posts\/705\/revisions"}],"wp:attachment":[{"href":"http:\/\/softbeam.net\/hobby\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=705"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/softbeam.net\/hobby\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=705"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/softbeam.net\/hobby\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=705"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}