{"id":404,"date":"2015-06-29T18:24:35","date_gmt":"2015-06-29T18:24:35","guid":{"rendered":"https:\/\/www.eskimo.com\/support\/?page_id=404"},"modified":"2015-07-15T01:28:19","modified_gmt":"2015-07-15T01:28:19","slug":"password-protected-pages","status":"publish","type":"page","link":"https:\/\/www.eskimo.com\/support\/web-space\/password-protected-pages\/","title":{"rendered":"Password Protected Pages"},"content":{"rendered":"<p style=\"text-align: center;\"><span style=\"font-family: arial,helvetica,sans-serif; font-size: 20pt; color: #008000;\">Password Protected Pages<\/span><\/p>\n<p><strong><span style=\"font-family: arial,helvetica,sans-serif; font-size: 14pt;\">Password File<\/span><\/strong><\/p>\n<p><span style=\"font-family: arial,helvetica,sans-serif; font-size: 12pt;\">\u00a0\u00a0\u00a0\u00a0 You can password protect a portion or all of your website. Two files are required for this, a password file containing usernames and encrypted passwords, and an &#8220;.htaccess&#8221; file.<\/span><\/p>\n<p><span style=\"font-family: arial,helvetica,sans-serif; font-size: 12pt;\">\u00a0\u00a0\u00a0\u00a0 <span style=\"color: #800000;\">The password file should be located outside of web accessible space <\/span> because if someone can download the file, they can run a password guessing program like Crack on it and find many poorly chosen passwords. The Apache web server needs to be able to access this file but it should not be in a place where it can be served to the public.<\/span><\/p>\n<p><span style=\"font-family: arial,helvetica,sans-serif; font-size: 12pt;\">\u00a0\u00a0\u00a0\u00a0 To create this file, use htpasswd. If the password file doesn&#8217;t yet exist, type:<\/span><\/p>\n<pre><span style=\"font-size: 12pt;\">     htpasswd -c filename user\r\n<\/span><\/pre>\n<p><span style=\"font-family: arial,helvetica,sans-serif; font-size: 12pt;\">\u00a0\u00a0\u00a0\u00a0 This will create a file named filename with the first user and encrypted password.<\/span><\/p>\n<p><span style=\"font-family: arial,helvetica,sans-serif; font-size: 12pt;\">\u00a0\u00a0\u00a0\u00a0 To add additional users to an existing password file type:<\/span><\/p>\n<pre><span style=\"font-size: 12pt;\">     htpasswd filename user\r\n<\/span><\/pre>\n<p><span style=\"font-family: arial,helvetica,sans-serif; font-size: 12pt;\">\u00a0\u00a0\u00a0\u00a0 To delete a user you can either edit the file and just delete the line in question, or you can use htpasswd to do it:<\/span><\/p>\n<pre><span style=\"font-size: 12pt;\">     htpasswd filename -D user\r\n<\/span><\/pre>\n<p><strong><span style=\"font-family: arial,helvetica,sans-serif; font-size: 14pt;\">The &#8220;.htaccess&#8221; File<\/span><\/strong><\/p>\n<p><span style=\"font-family: arial,helvetica,sans-serif; font-size: 12pt;\">\u00a0\u00a0\u00a0\u00a0 The second file required to password protect a portion of your web site is a file called &#8220;.htaccess&#8221;. This is placed in the directory to be protected. This file tells the web server where to find the &#8220;.htpasswd&#8221; file and what form of authentication to apply. This example shows how to use password authentication to protect a portion of your web space. It is also possible to limit access using groups, by domain name, or by address space. The format of the &#8220;.htaccess&#8221; file is:<\/span><\/p>\n<pre><span style=\"font-size: 12pt;\">     AuthUserFile \/home\/login\/.htpasswd\r\n     AuthGroupFile \/dev\/null\r\n     AuthName ByPassword\r\n     AuthType Basic\r\n\r\n     &lt;Limit GET PUT POST&gt;\r\n     require valid-user\r\n     &lt;\/Limit&gt;\r\n<\/span><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Password Protected Pages Password File \u00a0\u00a0\u00a0\u00a0 You can password protect a portion or all of your website. Two files are required for this, a password file containing usernames and encrypted passwords, and an &#8220;.htaccess&#8221; file. \u00a0\u00a0\u00a0\u00a0 The password file should &hellip; <a href=\"https:\/\/www.eskimo.com\/support\/web-space\/password-protected-pages\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"parent":377,"menu_order":0,"comment_status":"open","ping_status":"open","template":"showcase.php","meta":{"footnotes":""},"class_list":["post-404","page","type-page","status-publish","hentry","wpautop"],"_links":{"self":[{"href":"https:\/\/www.eskimo.com\/support\/wp-json\/wp\/v2\/pages\/404","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.eskimo.com\/support\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.eskimo.com\/support\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.eskimo.com\/support\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.eskimo.com\/support\/wp-json\/wp\/v2\/comments?post=404"}],"version-history":[{"count":0,"href":"https:\/\/www.eskimo.com\/support\/wp-json\/wp\/v2\/pages\/404\/revisions"}],"up":[{"embeddable":true,"href":"https:\/\/www.eskimo.com\/support\/wp-json\/wp\/v2\/pages\/377"}],"wp:attachment":[{"href":"https:\/\/www.eskimo.com\/support\/wp-json\/wp\/v2\/media?parent=404"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}