{"id":534,"date":"2012-07-10T10:10:56","date_gmt":"2012-07-10T02:10:56","guid":{"rendered":"http:\/\/rmohan.com\/?p=534"},"modified":"2012-07-10T10:10:56","modified_gmt":"2012-07-10T02:10:56","slug":"how-to-disable-directory-browsing-in-apachehttpd","status":"publish","type":"post","link":"https:\/\/mohan.sg\/?p=534","title":{"rendered":"How to disable directory browsing in apache\/httpd?"},"content":{"rendered":"<h1>How to disable directory browsing in apache\/httpd?<\/h1>\n<p>&nbsp;<\/p>\n<p>How can I disable building of directory index in apache\/httpd? In other words, how to prevent users from seeing the contents of published directories?<\/p>\n<p>&nbsp;<\/p>\n<p>Actually you are totally right that you wish to disable this feature. One of the \u201cmust do\u2019s\u201d on setting a secure apache web server is to disable directory browsing. Usually apache comes with this feature enabled but its always a good idea to get it disabled unless you really need it.<\/p>\n<p>First of all find where is the main apache\u2019s config file <code>httpd.conf<\/code> is located. If you use Debian, it should be here: <code>\/etc\/apache\/httpd.conf<\/code>. Using some file editor like Vim or Nano open this file and find the line that looks as follows:<\/p>\n<p><code>Options Includes Indexes FollowSymLinks MultiViews<\/code><\/p>\n<p>then remove word <code>Indexes<\/code> and save the file. The line should look like this one:<\/p>\n<p><code>Options Includes FollowSymLinks MultiViews<\/code><\/p>\n<p>After it is done, restart apache (e.g. <code>\/etc\/init.d\/apache restart<\/code><\/p>\n","protected":false},"excerpt":{"rendered":"<p>How to disable directory browsing in apache\/httpd? <\/p>\n<p>&nbsp;<\/p>\n<p>How can I disable building of directory index in apache\/httpd? In other words, how to prevent users from seeing the contents of published directories?<\/p>\n<p>&nbsp;<\/p>\n<p>Actually you are totally right that you wish to disable this feature. One of the \u201cmust do\u2019s\u201d on setting a secure apache [&#8230;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[12],"tags":[],"_links":{"self":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/534"}],"collection":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=534"}],"version-history":[{"count":2,"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/534\/revisions"}],"predecessor-version":[{"id":536,"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/534\/revisions\/536"}],"wp:attachment":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=534"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=534"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=534"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}