{"id":6,"date":"2013-01-07T12:01:00","date_gmt":"2013-01-07T11:01:00","guid":{"rendered":"http:\/\/www.codenicer.com\/?p=6"},"modified":"2026-05-10T19:20:02","modified_gmt":"2026-05-10T17:20:02","slug":"htaccess-based-authentication-with-apache","status":"publish","type":"post","link":"https:\/\/www.codenicer.com\/?p=6","title":{"rendered":".htaccess based authentication with apache"},"content":{"rendered":"\n<p>Put this in .htaccess file<\/p>\n\n\n\n<p><code><code>AuthUserFile path_goes_here<br>AuthGroupFile \/dev\/null<br>AuthName EnterPassword<br>AuthType Basic<br>require valid-user<\/code><\/code><\/p>\n\n\n\n<p>File with usernames and passwords can be generated with <strong>htpasswd <em>path username<\/em><\/strong> utility from command line, or use the following line to display hashed pairs in console <strong>htpasswd <em>-n username<\/em><\/strong><\/p>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Put this in .htaccess file AuthUserFile path_goes_hereAuthGroupFile \/dev\/nullAuthName EnterPasswordAuthType Basicrequire valid-user File with usernames and passwords can be generated with htpasswd path username utility from command line, or use the following line to display hashed pairs in console htpasswd -n username<\/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":[5,4],"class_list":["post-6","post","type-post","status-publish","format-standard","hentry","category-uncategorized","tag-htaccess","tag-apache"],"_links":{"self":[{"href":"https:\/\/www.codenicer.com\/index.php?rest_route=\/wp\/v2\/posts\/6","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.codenicer.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.codenicer.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.codenicer.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.codenicer.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=6"}],"version-history":[{"count":1,"href":"https:\/\/www.codenicer.com\/index.php?rest_route=\/wp\/v2\/posts\/6\/revisions"}],"predecessor-version":[{"id":8,"href":"https:\/\/www.codenicer.com\/index.php?rest_route=\/wp\/v2\/posts\/6\/revisions\/8"}],"wp:attachment":[{"href":"https:\/\/www.codenicer.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=6"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.codenicer.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=6"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.codenicer.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=6"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}