<input type="hidden" id="_wpnonce" name="_wpnonce" value="c8e038ba28" /><input type="hidden" name="_wp_http_referer" value="/blog/wp-json/wp/v2/posts/3480" /><input type="hidden" id="_wpnonce" name="_wpnonce" value="c8e038ba28" /><input type="hidden" name="_wp_http_referer" value="/blog/wp-json/wp/v2/posts/3480" />{"id":3480,"date":"2015-06-03T12:49:13","date_gmt":"2015-06-03T02:49:13","guid":{"rendered":"https:\/\/www.businesslegions.com\/blog\/?p=3480"},"modified":"2015-06-02T21:18:41","modified_gmt":"2015-06-02T11:18:41","slug":"how-to-disable-directory-browsing-in-wamp","status":"publish","type":"post","link":"https:\/\/www.businesslegions.com\/blog\/2015\/06\/03\/how-to-disable-directory-browsing-in-wamp\/","title":{"rendered":"How to disable directory browsing in WAMP"},"content":{"rendered":"<!--CusAds0--><p>If you&#8217;re using WAMP and are browsing a folder without an index.php or index.html file, the WAMP server will display all the files contained in that folder. Here&#8217;s an example:<\/p>\n<p><a href=\"https:\/\/cdn.businesslegions.com\/blog\/wp-content\/uploads\/2015\/06\/WAMP-Display-Directory-Listing.png?strip=all&w=2560\"><img decoding=\"async\" class=\"alignnone size-full wp-image-3482\" src=\"https:\/\/cdn.businesslegions.com\/blog\/wp-content\/uploads\/2015\/06\/WAMP-Display-Directory-Listing.png?strip=all\" alt=\"WAMP Display Directory Listing\" width=\"664\" height=\"414\" srcset=\"https:\/\/cdn.businesslegions.com\/blog\/wp-content\/uploads\/2015\/06\/WAMP-Display-Directory-Listing.png?strip=all 664w, https:\/\/cdn.businesslegions.com\/blog\/wp-content\/uploads\/2015\/06\/WAMP-Display-Directory-Listing-300x187.png?strip=all 300w, https:\/\/cdn.businesslegions.com\/blog\/wp-content\/uploads\/2015\/06\/WAMP-Display-Directory-Listing.png?strip=all&amp;w=132 132w, https:\/\/cdn.businesslegions.com\/blog\/wp-content\/uploads\/2015\/06\/WAMP-Display-Directory-Listing.png?strip=all&amp;w=398 398w, https:\/\/cdn.businesslegions.com\/blog\/wp-content\/uploads\/2015\/06\/WAMP-Display-Directory-Listing.png?strip=all&amp;w=531 531w, https:\/\/cdn.businesslegions.com\/blog\/wp-content\/uploads\/2015\/06\/WAMP-Display-Directory-Listing.png?strip=all&amp;w=450 450w\" sizes=\"(max-width: 664px) 100vw, 664px\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p>This can become a security risk as the visitor is able to browse and download all the files. In order to disable this you need to edit the httpd.conf file which can be found here: C:\\wamp\\bing\\apache\\apache[version]\\conf\\httpd.conf<\/p>\n<p>Look for the line<\/p>\n<div id=\"wpshdo_1\" class=\"wp-synhighlighter-outer\"><div id=\"wpshdt_1\" class=\"wp-synhighlighter-expanded\"><table border=\"0\" width=\"100%\"><tr><td align=\"left\" width=\"80%\"><a name=\"#codesyntax_1\"><\/a><a id=\"wpshat_1\" class=\"wp-synhighlighter-title\" href=\"#codesyntax_1\"  onClick=\"javascript:wpsh_toggleBlock(1)\" title=\"Click to show\/hide code block\">Source code<\/a><\/td><td align=\"right\"><a href=\"#codesyntax_1\" onClick=\"javascript:wpsh_code(1)\" title=\"Show code only\"><img decoding=\"async\" border=\"0\" style=\"border: 0 none\" src=\"https:\/\/cdn.businesslegions.com\/blog\/wp-content\/plugins\/wp-synhighlight\/themes\/default\/images\/code.png?strip=all&w=960\" \/><\/a>&nbsp;<a href=\"#codesyntax_1\" onClick=\"javascript:wpsh_print(1)\" title=\"Print code\"><img decoding=\"async\" border=\"0\" style=\"border: 0 none\" src=\"https:\/\/cdn.businesslegions.com\/blog\/wp-content\/plugins\/wp-synhighlight\/themes\/default\/images\/printer.png?strip=all&w=960\" \/><\/a>&nbsp;<a href=\"https:\/\/www.businesslegions.com\/blog\/wp-content\/plugins\/wp-synhighlight\/About.html\" target=\"_blank\" title=\"Show plugin information\"><img decoding=\"async\" border=\"0\" style=\"border: 0 none\" src=\"https:\/\/cdn.businesslegions.com\/blog\/wp-content\/plugins\/wp-synhighlight\/themes\/default\/images\/info.gif?strip=all&w=960\" \/><\/a>&nbsp;<\/td><\/tr><\/table><\/div><div id=\"wpshdi_1\" class=\"wp-synhighlighter-inner\" style=\"display: block;\"><pre class=\"php\" style=\"font-family:monospace;\">Options <span class=\"sy0\">-<\/span>Indexes<\/pre><\/div><\/div>\n<p>All you need to do is then add the # infront of the line so it looks like this:<\/p>\n<div id=\"wpshdo_2\" class=\"wp-synhighlighter-outer\"><div id=\"wpshdt_2\" class=\"wp-synhighlighter-expanded\"><table border=\"0\" width=\"100%\"><tr><td align=\"left\" width=\"80%\"><a name=\"#codesyntax_2\"><\/a><a id=\"wpshat_2\" class=\"wp-synhighlighter-title\" href=\"#codesyntax_2\"  onClick=\"javascript:wpsh_toggleBlock(2)\" title=\"Click to show\/hide code block\">Source code<\/a><\/td><td align=\"right\"><a href=\"#codesyntax_2\" onClick=\"javascript:wpsh_code(2)\" title=\"Show code only\"><img decoding=\"async\" border=\"0\" style=\"border: 0 none\" src=\"https:\/\/cdn.businesslegions.com\/blog\/wp-content\/plugins\/wp-synhighlight\/themes\/default\/images\/code.png?strip=all&w=960\" \/><\/a>&nbsp;<a href=\"#codesyntax_2\" onClick=\"javascript:wpsh_print(2)\" title=\"Print code\"><img decoding=\"async\" border=\"0\" style=\"border: 0 none\" src=\"https:\/\/cdn.businesslegions.com\/blog\/wp-content\/plugins\/wp-synhighlight\/themes\/default\/images\/printer.png?strip=all&w=960\" \/><\/a>&nbsp;<a href=\"https:\/\/www.businesslegions.com\/blog\/wp-content\/plugins\/wp-synhighlight\/About.html\" target=\"_blank\" title=\"Show plugin information\"><img decoding=\"async\" border=\"0\" style=\"border: 0 none\" src=\"https:\/\/cdn.businesslegions.com\/blog\/wp-content\/plugins\/wp-synhighlight\/themes\/default\/images\/info.gif?strip=all&w=960\" \/><\/a>&nbsp;<\/td><\/tr><\/table><\/div><div id=\"wpshdi_2\" class=\"wp-synhighlighter-inner\" style=\"display: block;\"><pre class=\"php\" style=\"font-family:monospace;\">Options <span class=\"sy0\">-<\/span>Indexes<\/pre><\/div><\/div>\n<p><a href=\"https:\/\/cdn.businesslegions.com\/blog\/wp-content\/uploads\/2015\/06\/WAMP-Disable-Directory-Browsing.png?strip=all&w=2560\"><img decoding=\"async\" class=\"alignnone size-full wp-image-3486\" src=\"https:\/\/cdn.businesslegions.com\/blog\/wp-content\/uploads\/2015\/06\/WAMP-Disable-Directory-Browsing.png?strip=all\" alt=\"WAMP Disable Directory Browsing\" width=\"709\" height=\"468\" srcset=\"https:\/\/cdn.businesslegions.com\/blog\/wp-content\/uploads\/2015\/06\/WAMP-Disable-Directory-Browsing.png?strip=all 709w, https:\/\/cdn.businesslegions.com\/blog\/wp-content\/uploads\/2015\/06\/WAMP-Disable-Directory-Browsing-300x198.png?strip=all 300w, https:\/\/cdn.businesslegions.com\/blog\/wp-content\/uploads\/2015\/06\/WAMP-Disable-Directory-Browsing.png?strip=all&amp;w=141 141w, https:\/\/cdn.businesslegions.com\/blog\/wp-content\/uploads\/2015\/06\/WAMP-Disable-Directory-Browsing.png?strip=all&amp;w=425 425w, https:\/\/cdn.businesslegions.com\/blog\/wp-content\/uploads\/2015\/06\/WAMP-Disable-Directory-Browsing.png?strip=all&amp;w=567 567w\" sizes=\"(max-width: 709px) 100vw, 709px\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p>Restart WAMP by clicking on the WAMP icon and selecting restart all.<\/p>\n<p><a href=\"https:\/\/cdn.businesslegions.com\/blog\/wp-content\/uploads\/2015\/06\/WAMP-Restart.png?strip=all&w=2560\"><img decoding=\"async\" class=\"alignnone size-full wp-image-3483\" src=\"https:\/\/cdn.businesslegions.com\/blog\/wp-content\/uploads\/2015\/06\/WAMP-Restart.png?strip=all&resize=183%2C293\" alt=\"WAMP Restart\" width=\"183\" height=\"293\" \/><\/a><\/p>\n<p>This will then disable the directory as shown below:<\/p>\n<p><a href=\"https:\/\/cdn.businesslegions.com\/blog\/wp-content\/uploads\/2015\/06\/WAMP-Forbidden-access.png?strip=all&w=2560\"><img decoding=\"async\" class=\"alignnone size-full wp-image-3487\" src=\"https:\/\/cdn.businesslegions.com\/blog\/wp-content\/uploads\/2015\/06\/WAMP-Forbidden-access.png?strip=all\" alt=\"WAMP Forbidden access\" width=\"573\" height=\"137\" srcset=\"https:\/\/cdn.businesslegions.com\/blog\/wp-content\/uploads\/2015\/06\/WAMP-Forbidden-access.png?strip=all 573w, https:\/\/cdn.businesslegions.com\/blog\/wp-content\/uploads\/2015\/06\/WAMP-Forbidden-access-300x72.png?strip=all 300w, https:\/\/cdn.businesslegions.com\/blog\/wp-content\/uploads\/2015\/06\/WAMP-Forbidden-access.png?strip=all&amp;w=114 114w, https:\/\/cdn.businesslegions.com\/blog\/wp-content\/uploads\/2015\/06\/WAMP-Forbidden-access.png?strip=all&amp;w=229 229w, https:\/\/cdn.businesslegions.com\/blog\/wp-content\/uploads\/2015\/06\/WAMP-Forbidden-access.png?strip=all&amp;w=458 458w\" sizes=\"(max-width: 573px) 100vw, 573px\" \/><\/a><\/p>\n<div class=\"lt-box\" style=\"border:1px solid #1d6a9e\"><div class=\"lt-box-title\" style=\"background-color:#2485C6;border-top:1px solid #a7cee8;text-shadow:1px 1px 0 #0b283b\">DO YOU LIKE WHAT YOU'VE READ?<\/div><div class=\"lt-box-content\">Join our subscription list and receive our content right in your mailbox. If you like to receive some Great deals our Freebies then subscribe now!\r\n\r\n<p><div class=\"tnp tnp-subscription \">\n<form method=\"post\" action=\"https:\/\/www.businesslegions.com\/blog\/wp-admin\/admin-ajax.php?action=tnp&amp;na=s\">\n<input type=\"hidden\" name=\"nlang\" value=\"\">\n<div class=\"tnp-field tnp-field-firstname\"><label for=\"tnp-1\">Name<\/label>\n<input class=\"tnp-name\" type=\"text\" name=\"nn\" id=\"tnp-1\" value=\"\" placeholder=\"\"><\/div>\n<div class=\"tnp-field tnp-field-email\"><label for=\"tnp-2\">Email<\/label>\n<input class=\"tnp-email\" type=\"email\" name=\"ne\" id=\"tnp-2\" value=\"\" placeholder=\"\" required><\/div>\n<div class=\"tnp-field tnp-field-button\" style=\"text-align: left\"><input class=\"tnp-submit\" type=\"submit\" value=\"Subscribe\" style=\"\">\n<\/div>\n<\/form>\n<\/div>\n<\/p>\r\n\r\n<\/div><\/div><!--CusAds0-->\n<div style=\"font-size: 0px; height: 0px; line-height: 0px; margin: 0; padding: 0; clear: both;\"><\/div>","protected":false},"excerpt":{"rendered":"<p>If you&#8217;re using WAMP and are browsing a folder without an index.php or index.html file, the WAMP server will display all the files contained in that folder. Here&#8217;s an example: &nbsp; This can become a security risk as the visitor is able to browse and download all the files. In order to disable this you [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":3486,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[1777,436,908,1609],"class_list":["post-3480","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-technology","tag-disable","tag-index","tag-need","tag-wamp"],"_links":{"self":[{"href":"https:\/\/www.businesslegions.com\/blog\/wp-json\/wp\/v2\/posts\/3480","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.businesslegions.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.businesslegions.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.businesslegions.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.businesslegions.com\/blog\/wp-json\/wp\/v2\/comments?post=3480"}],"version-history":[{"count":3,"href":"https:\/\/www.businesslegions.com\/blog\/wp-json\/wp\/v2\/posts\/3480\/revisions"}],"predecessor-version":[{"id":3488,"href":"https:\/\/www.businesslegions.com\/blog\/wp-json\/wp\/v2\/posts\/3480\/revisions\/3488"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.businesslegions.com\/blog\/wp-json\/wp\/v2\/media\/3486"}],"wp:attachment":[{"href":"https:\/\/www.businesslegions.com\/blog\/wp-json\/wp\/v2\/media?parent=3480"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.businesslegions.com\/blog\/wp-json\/wp\/v2\/categories?post=3480"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.businesslegions.com\/blog\/wp-json\/wp\/v2\/tags?post=3480"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}