{"id":39,"date":"2009-08-15T04:02:26","date_gmt":"2009-08-15T04:02:26","guid":{"rendered":"http:\/\/www.adriangrigoras.com\/blog\/?p=39"},"modified":"2009-08-15T04:02:26","modified_gmt":"2009-08-15T04:02:26","slug":"protect-a-location-from-apache","status":"publish","type":"post","link":"https:\/\/adriangrigoras.com\/blog\/protect-a-location-from-apache\/","title":{"rendered":"Protect a location from Apache"},"content":{"rendered":"<p>Sometimes, you need to protect a certain location with Http Access and users must enter username and password to view that location.<\/p>\n<p>A simple way to do this is from Apache configuration file or from .htaccess<\/p>\n<blockquote>\n<address>&lt;Location \/my_location&gt;<br \/>\nAllowOverride AuthConfig<br \/>\nAuthName &#8220;Please login!&#8221;<br \/>\nAuthType Basic<br \/>\nAuthUserFile \/passwd\/.htpasswd<\/p>\n<p>require valid-user<br \/>\n&lt;LIMIT GET&gt;<br \/>\nrequire my_user<br \/>\n&lt;\/LIMIT&gt;<br \/>\n&lt;\/Location&gt;<\/p>\n<\/address>\n<\/blockquote>\n<p>Cheers,<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Sometimes, you need to protect a certain location with Http Access and users must enter username and password to view that location. A simple way to do this is from Apache configuration file or from .htaccess &lt;Location \/my_location&gt; AllowOverride AuthConfig AuthName &#8220;Please login!&#8221; AuthType Basic AuthUserFile \/passwd\/.htpasswd require valid-user &lt;LIMIT GET&gt; require my_user &lt;\/LIMIT&gt; &lt;\/Location&gt;\u2026 <span class=\"read-more\"><a href=\"https:\/\/adriangrigoras.com\/blog\/protect-a-location-from-apache\/\">Read More &raquo;<\/a><\/span><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[],"class_list":["post-39","post","type-post","status-publish","format-standard","hentry","category-apache"],"_links":{"self":[{"href":"https:\/\/adriangrigoras.com\/blog\/wp-json\/wp\/v2\/posts\/39","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/adriangrigoras.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/adriangrigoras.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/adriangrigoras.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/adriangrigoras.com\/blog\/wp-json\/wp\/v2\/comments?post=39"}],"version-history":[{"count":0,"href":"https:\/\/adriangrigoras.com\/blog\/wp-json\/wp\/v2\/posts\/39\/revisions"}],"wp:attachment":[{"href":"https:\/\/adriangrigoras.com\/blog\/wp-json\/wp\/v2\/media?parent=39"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/adriangrigoras.com\/blog\/wp-json\/wp\/v2\/categories?post=39"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/adriangrigoras.com\/blog\/wp-json\/wp\/v2\/tags?post=39"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}