{"id":111,"date":"2011-06-03T15:22:36","date_gmt":"2011-06-03T15:22:36","guid":{"rendered":"http:\/\/pixert.com\/blog\/?p=111"},"modified":"2011-08-11T06:02:14","modified_gmt":"2011-08-11T06:02:14","slug":"how-to-disable-directory-browsing","status":"publish","type":"post","link":"https:\/\/pixert.com\/blog\/how-to-disable-directory-browsing\/","title":{"rendered":"How to disable directory browsing?"},"content":{"rendered":"<p><a href=\"https:\/\/i0.wp.com\/pixert.com\/blog\/wp-content\/uploads\/2011\/03\/feather-small.gif\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"71\" data-permalink=\"https:\/\/pixert.com\/blog\/how-to-find-apache-version-on-linux\/feather-small\/\" data-orig-file=\"https:\/\/i0.wp.com\/pixert.com\/blog\/wp-content\/uploads\/2011\/03\/feather-small.gif?fit=203%2C61&amp;ssl=1\" data-orig-size=\"203,61\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;}\" data-image-title=\"Apache\" data-image-description=\"\" data-image-caption=\"\" data-medium-file=\"https:\/\/i0.wp.com\/pixert.com\/blog\/wp-content\/uploads\/2011\/03\/feather-small.gif?fit=203%2C61&amp;ssl=1\" data-large-file=\"https:\/\/i0.wp.com\/pixert.com\/blog\/wp-content\/uploads\/2011\/03\/feather-small.gif?fit=203%2C61&amp;ssl=1\" class=\"alignright size-full wp-image-71\" title=\"Apache\" src=\"https:\/\/i0.wp.com\/pixert.com\/blog\/wp-content\/uploads\/2011\/03\/feather-small.gif?resize=203%2C61\" alt=\"\" width=\"203\" height=\"61\" \/><\/a>One of the must do on setting a secure Apache webserver is to disable directory browsing. This could prevent the server from showing a listing of the existing files if there&#8217;s no index in one folder.<\/p>\n<p>Disable directory browsing via .htaccess<br \/>\nAdd in the .htaccess file the following<\/p>\n<pre class=\"brush: bash; title: Code Block; notranslate\" title=\"Code Block\">\r\nOptions -Indexes\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>One of the must do on setting a secure Apache webserver is to disable directory browsing. This could prevent the server from showing a listing of the existing files if there&#8217;s no index in one folder. Disable directory browsing via .htaccess Add in the .htaccess file the following Options -Indexes<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[8,13,5],"tags":[9,15,49,56,6,7],"class_list":["post-111","post","type-post","status-publish","format-standard","hentry","category-centos","category-cpanel","category-wordpress","tag-centos-2","tag-cpanel-2","tag-htaccess","tag-security","tag-wordpress-2","tag-wp"],"aioseo_notices":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/p1pvi1-1N","jetpack-related-posts":[{"id":62,"url":"https:\/\/pixert.com\/blog\/how-to-disable-phpinfo\/","url_meta":{"origin":111,"position":0},"title":"How to disable phpinfo","author":"Pixel Insert \/ Pixert","date":"March 22, 2011","format":false,"excerpt":"The phpinfo() function is a very powerful one, \u00a0you can learn quite a lot about your PHP installation.\u00a0Some server administrators may choose to disable the PHP function phpinfo() for security reasons, because it displays information which can be used to compromise the server that your site is running on. You\u2026","rel":"","context":"In &quot;CentOS&quot;","block_context":{"text":"CentOS","link":"https:\/\/pixert.com\/blog\/category\/centos\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/pixert.com\/blog\/wp-content\/uploads\/2011\/03\/php.gif?resize=350%2C200","width":350,"height":200},"classes":[]},{"id":149,"url":"https:\/\/pixert.com\/blog\/redirect-https-to-http-on-your-site-with-htaccess\/","url_meta":{"origin":111,"position":1},"title":"Redirect https to http on your site with .htaccess","author":"Pixel Insert \/ Pixert","date":"October 19, 2011","format":false,"excerpt":"You can use the following snippet to avoid having duplicate listings in the search engines or when your site showing security errors on your browser [bash] Options +FollowSymlinks RewriteEngine on RewriteCond %{SERVER_PORT} ^443$ RewriteRule ^(.*)$ http:\/\/www.yourdomain.com\/$1 [R=301,L] [\/bash]","rel":"","context":"In &quot;CentOS&quot;","block_context":{"text":"CentOS","link":"https:\/\/pixert.com\/blog\/category\/centos\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/pixert.com\/blog\/wp-content\/uploads\/2011\/03\/cpanel-logo.gif?resize=350%2C200","width":350,"height":200},"classes":[]},{"id":117,"url":"https:\/\/pixert.com\/blog\/hide-the-apache-web-server-version-number\/","url_meta":{"origin":111,"position":2},"title":"Hide the Apache Web Server Version number","author":"Pixel Insert \/ Pixert","date":"June 6, 2011","format":false,"excerpt":"There are two config directives that controls Apache version. The\u00a0ServerSignature directive adds a line containing the Apache HTTP Server server version and the ServerName to any server-generated documents, such as error messages sent back to clients. The\u00a0ServerTokens directive controls whether Server response header field which is sent back to clients\u2026","rel":"","context":"In &quot;CentOS&quot;","block_context":{"text":"CentOS","link":"https:\/\/pixert.com\/blog\/category\/centos\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/pixert.com\/blog\/wp-content\/uploads\/2011\/03\/feather-small.gif?resize=350%2C200","width":350,"height":200},"classes":[]},{"id":163,"url":"https:\/\/pixert.com\/blog\/moving-wordpress-blog-from-a-subdomain-to-a-subfolder\/","url_meta":{"origin":111,"position":3},"title":"Moving WordPress blog from a subdomain to a subfolder","author":"Pixel Insert \/ Pixert","date":"November 25, 2011","format":false,"excerpt":"I had this blog and this main site on same domain, pixert.com a year ago. I got high traffic to same domain. I separated the blog from main site after serious problems occurred. I made pixert.com\/blog for blog and pixert.com for main site That's a mistake I should \u00a0not done.\u2026","rel":"","context":"In &quot;cPanel&quot;","block_context":{"text":"cPanel","link":"https:\/\/pixert.com\/blog\/category\/cpanel\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/pixert.com\/blog\/wp-content\/uploads\/2011\/03\/wordpresslogo-300x68.png?resize=350%2C200","width":350,"height":200},"classes":[]},{"id":86,"url":"https:\/\/pixert.com\/blog\/protect-htaccess-file\/","url_meta":{"origin":111,"position":4},"title":"Protect .htaccess file","author":"Pixel Insert \/ Pixert","date":"April 5, 2011","format":false,"excerpt":"When avisitor tries to obtain access to .htaccess file, server automatically generates a 403 forbidden error. However, we can apply an extra layer of security to .htaccess Add the following [text] # Protect the htaccess file <Files .htaccess> Order Allow,Deny Deny from all <\/Files> [\/text] Note: htaccess file permissions is\u2026","rel":"","context":"In &quot;CentOS&quot;","block_context":{"text":"CentOS","link":"https:\/\/pixert.com\/blog\/category\/centos\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/pixert.com\/blog\/wp-content\/uploads\/2011\/03\/lock-150x150.jpg?resize=350%2C200","width":350,"height":200},"classes":[]},{"id":162,"url":"https:\/\/pixert.com\/blog\/web-page-compression-enable-gzip-encoding-and-caching\/","url_meta":{"origin":111,"position":5},"title":"Web Page Compression: Enable gzip Encoding and Caching","author":"Pixel Insert \/ Pixert","date":"November 10, 2011","format":false,"excerpt":"Website load is one factor Google been considered to rank websites in their search engine. The next tutorial explain a step to improve loading time in your website.\u00a0This step is focusing on gzip encoding and caching, it compress the content from your server to the client browser. The reduced file\u2026","rel":"","context":"In &quot;CentOS&quot;","block_context":{"text":"CentOS","link":"https:\/\/pixert.com\/blog\/category\/centos\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"jetpack_sharing_enabled":true,"jetpack_likes_enabled":true,"_links":{"self":[{"href":"https:\/\/pixert.com\/blog\/wp-json\/wp\/v2\/posts\/111","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/pixert.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/pixert.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/pixert.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/pixert.com\/blog\/wp-json\/wp\/v2\/comments?post=111"}],"version-history":[{"count":0,"href":"https:\/\/pixert.com\/blog\/wp-json\/wp\/v2\/posts\/111\/revisions"}],"wp:attachment":[{"href":"https:\/\/pixert.com\/blog\/wp-json\/wp\/v2\/media?parent=111"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/pixert.com\/blog\/wp-json\/wp\/v2\/categories?post=111"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/pixert.com\/blog\/wp-json\/wp\/v2\/tags?post=111"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}