{"id":1068,"date":"2025-01-14T11:00:44","date_gmt":"2025-01-14T08:00:44","guid":{"rendered":"https:\/\/wafatech.sa\/blog\/linux\/linux-security\/disabling-directory-listing-on-your-linux-server-a-step-by-step-guide\/"},"modified":"2025-01-14T11:00:44","modified_gmt":"2025-01-14T08:00:44","slug":"disabling-directory-listing-on-your-linux-server-a-step-by-step-guide","status":"publish","type":"post","link":"https:\/\/wafatech.sa\/blog\/linux\/linux-security\/disabling-directory-listing-on-your-linux-server-a-step-by-step-guide\/","title":{"rendered":"Disabling Directory Listing on Your Linux Server: A Step-by-Step Guide"},"content":{"rendered":"<p><br \/>\n<\/p>\n<p>In the world of web hosting, ensuring the security and privacy of your web server is paramount. One common vulnerability that can expose sensitive information is the ability for users to view directory listings. By default, many web servers are configured to display a list of files when a directory doesn\u2019t contain an index file, potentially revealing your website&#8217;s structure and sensitive files. In this article, we&#8217;ll guide you through the steps to disable directory listing on your Linux server using Apache and Nginx, the two most popular web servers.<\/p>\n<p><\/p>\n<h2>Why Disable Directory Listing?<\/h2>\n<p><\/p>\n<p>Disabling directory listing is crucial for several reasons:<\/p>\n<p><\/p>\n<ol><\/p>\n<li><strong>Security<\/strong>: It prevents unauthorized users from accessing directories that contain sensitive files.<\/li>\n<p><\/p>\n<li><strong>Privacy<\/strong>: It hides the structure of your web application from potential attackers.<\/li>\n<p><\/p>\n<li><strong>User Experience<\/strong>: It promotes a cleaner, user-friendly experience by guiding users to specific content rather than exposing them to a list of files.<\/li>\n<p>\n<\/ol>\n<p><\/p>\n<h2>Prerequisites<\/h2>\n<p><\/p>\n<ul><\/p>\n<li>A Linux server with Apache or Nginx installed.<\/li>\n<p><\/p>\n<li>SSH access to your server.<\/li>\n<p><\/p>\n<li>Basic knowledge of navigating the Linux filesystem.<\/li>\n<p>\n<\/ul>\n<p><\/p>\n<h2>Disabling Directory Listing in Apache<\/h2>\n<p><\/p>\n<h3>Step 1: Access Your Server<\/h3>\n<p><\/p>\n<p>Use SSH to connect to your server:<\/p>\n<p><\/p>\n<pre><code class=\"language-bash\">ssh username@your_server_ip<\/code><\/pre>\n<p><\/p>\n<h3>Step 2: Locate the Apache Configuration File<\/h3>\n<p><\/p>\n<p>The primary configuration file for Apache is usually located at:<\/p>\n<p><\/p>\n<ul><\/p>\n<li><strong>Debian\/Ubuntu<\/strong>: <code>\/etc\/apache2\/apache2.conf<\/code><\/li>\n<p><\/p>\n<li><strong>CentOS\/RHEL<\/strong>: <code>\/etc\/httpd\/conf\/httpd.conf<\/code><\/li>\n<p>\n<\/ul>\n<p><\/p>\n<p>You may also need to check the <code>.htaccess<\/code> file in your web directory if it exists.<\/p>\n<p><\/p>\n<h3>Step 3: Edit the configuration file<\/h3>\n<p><\/p>\n<p>Open the configuration file in your preferred text editor, for example using <code>nano<\/code>:<\/p>\n<p><\/p>\n<pre><code class=\"language-bash\">sudo nano \/etc\/apache2\/apache2.conf<\/code><\/pre>\n<p><\/p>\n<h3>Step 4: Modify Directory Options<\/h3>\n<p><\/p>\n<p>Locate the section that contains the <code>&lt;Directory&gt;<\/code> directive for your web root (typically <code>\/var\/www\/html<\/code>).<\/p>\n<p><\/p>\n<p>Change or add the <code>Options<\/code> directive to <strong>not<\/strong> include <code>Indexes<\/code>. It should look like this:<\/p>\n<p><\/p>\n<pre><code class=\"language-apache\">&lt;Directory \/var\/www\/html&gt;<br \/>\n    Options -Indexes<br \/>\n    AllowOverride None<br \/>\n    Require all granted<br \/>\n&lt;\/Directory&gt;<\/code><\/pre>\n<p><\/p>\n<p>If you are using an <code>.htaccess<\/code> file, you can also add the same line there:<\/p>\n<p><\/p>\n<pre><code class=\"language-apache\">Options -Indexes<\/code><\/pre>\n<p><\/p>\n<h3>Step 5: Restart Apache<\/h3>\n<p><\/p>\n<p>After making the changes, save the file and exit the text editor (in nano, press <code>CTRL + X<\/code>, then <code>Y<\/code>, then <code>Enter<\/code>). Restart Apache to apply the changes:<\/p>\n<p><\/p>\n<pre><code class=\"language-bash\">sudo systemctl restart apache2<\/code><\/pre>\n<p><\/p>\n<p>or<\/p>\n<p><\/p>\n<pre><code class=\"language-bash\">sudo systemctl restart httpd<\/code><\/pre>\n<p><\/p>\n<h3>Step 6: Test Your Configuration<\/h3>\n<p><\/p>\n<p>Navigate to a directory on your website that does not have an index file. Instead of a list of files, you should see a &quot;403 Forbidden&quot; error or a custom error page.<\/p>\n<p><\/p>\n<h2>Disabling Directory Listing in Nginx<\/h2>\n<p><\/p>\n<h3>Step 1: Access Your Server<\/h3>\n<p><\/p>\n<p>Connect to your server via SSH:<\/p>\n<p><\/p>\n<pre><code class=\"language-bash\">ssh username@your_server_ip<\/code><\/pre>\n<p><\/p>\n<h3>Step 2: Locate the Nginx Configuration File<\/h3>\n<p><\/p>\n<p>Nginx configuration files are typically found in:<\/p>\n<p><\/p>\n<ul><\/p>\n<li>Default location: <code>\/etc\/nginx\/nginx.conf<\/code><\/li>\n<p><\/p>\n<li>Server-specific configuration: <code>\/etc\/nginx\/sites-available\/your_domain<\/code><\/li>\n<p>\n<\/ul>\n<p><\/p>\n<h3>Step 3: Edit the Configuration File<\/h3>\n<p><\/p>\n<p>Open the configuration file with a text editor:<\/p>\n<p><\/p>\n<pre><code class=\"language-bash\">sudo nano \/etc\/nginx\/nginx.conf<\/code><\/pre>\n<p><\/p>\n<h3>Step 4: Update the <code>location<\/code> Block<\/h3>\n<p><\/p>\n<p>Within the appropriate <code>server<\/code> block, look for the <code>location<\/code> directive. Ensure that the <code>autoindex<\/code> option is set to <code>off<\/code>:<\/p>\n<p><\/p>\n<pre><code class=\"language-nginx\">server {<br \/>\n    listen 80;<br \/>\n    server_name your_domain;<br \/>\n<br \/>\n    location \/ {<br \/>\n        root   \/var\/www\/html;<br \/>\n        index  index.html index.htm;<br \/>\n        autoindex off;  # This disables directory listing<br \/>\n    }<br \/>\n<br \/>\n    # additional configurations...<br \/>\n}<\/code><\/pre>\n<p><\/p>\n<h3>Step 5: Save and Test Configuration<\/h3>\n<p><\/p>\n<p>Save the changes and exit the editor. You can test the Nginx configuration for syntax errors:<\/p>\n<p><\/p>\n<pre><code class=\"language-bash\">sudo nginx -t<\/code><\/pre>\n<p><\/p>\n<h3>Step 6: Restart Nginx<\/h3>\n<p><\/p>\n<p>If the test is successful, restart Nginx to apply the changes:<\/p>\n<p><\/p>\n<pre><code class=\"language-bash\">sudo systemctl restart nginx<\/code><\/pre>\n<p><\/p>\n<h3>Step 7: Test Your Configuration<\/h3>\n<p><\/p>\n<p>Just like with Apache, check a directory without an index file. You should see a &quot;403 Forbidden&quot; error, indicating that directory listing has been successfully disabled.<\/p>\n<p><\/p>\n<h2>Conclusion<\/h2>\n<p><\/p>\n<p>Disabling directory listing is a simple yet effective way to secure your Linux web server. By following the steps outlined in this guide, you can protect sensitive information and enhance your website&#8217;s privacy. Regularly reviewing your server&#8217;s configuration and applying best practices will further safeguard your web applications from potential threats.<\/p>\n<p><\/p>\n<p>If you found this guide useful, stay tuned for more tutorials and tips on how to secure and optimize your Linux server for maximum performance. Happy hosting!<\/p>\n\n","protected":false},"excerpt":{"rendered":"<p>In the world of web hosting, ensuring the security and privacy of your web server is paramount. One common vulnerability that can expose sensitive information is the ability for users to view directory listings. By default, many web servers are configured to display a list of files when a directory doesn\u2019t contain an index file, [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":1069,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_et_pb_use_builder":"","_et_pb_old_content":"","_et_gb_content_width":"","inline_featured_image":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[22],"tags":[715,267,233,265,716,266,279],"class_list":["post-1068","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-linux-security","tag-directory","tag-disabling","tag-guide","tag-linux","tag-listing","tag-server","tag-stepbystep","et-has-post-format-content","et_post_format-et-post-format-standard"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v26.5 (Yoast SEO v27.3) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>Disabling Directory Listing on Your Linux Server: A Step-by-Step Guide - WafaTech Blogs<\/title>\n<meta name=\"description\" content=\"Disabling Directory Listing on Your Linux Server: A Step-by-Step Guide %\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/wafatech.sa\/blog\/linux\/linux-security\/disabling-directory-listing-on-your-linux-server-a-step-by-step-guide\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Disabling Directory Listing on Your Linux Server: A Step-by-Step Guide\" \/>\n<meta property=\"og:description\" content=\"Disabling Directory Listing on Your Linux Server: A Step-by-Step Guide %\" \/>\n<meta property=\"og:url\" content=\"https:\/\/wafatech.sa\/blog\/linux\/linux-security\/disabling-directory-listing-on-your-linux-server-a-step-by-step-guide\/\" \/>\n<meta property=\"og:site_name\" content=\"WafaTech Blogs\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/people\/WafaTech\/61560546351289\/\" \/>\n<meta property=\"article:published_time\" content=\"2025-01-14T08:00:44+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/wafatech.sa\/blog\/wp-content\/uploads\/2024\/06\/logo_big.webp\" \/>\n\t<meta property=\"og:image:width\" content=\"2221\" \/>\n\t<meta property=\"og:image:height\" content=\"482\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/webp\" \/>\n<meta name=\"author\" content=\"WafaTech SA\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@wafatech_sa\" \/>\n<meta name=\"twitter:site\" content=\"@wafatech_sa\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"WafaTech SA\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":[\"Article\",\"BlogPosting\"],\"@id\":\"https:\\\/\\\/wafatech.sa\\\/blog\\\/linux\\\/linux-security\\\/disabling-directory-listing-on-your-linux-server-a-step-by-step-guide\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/wafatech.sa\\\/blog\\\/linux\\\/linux-security\\\/disabling-directory-listing-on-your-linux-server-a-step-by-step-guide\\\/\"},\"author\":{\"name\":\"WafaTech SA\",\"@id\":\"https:\\\/\\\/wafatech.sa\\\/blog\\\/#\\\/schema\\\/person\\\/1a5761fc0feb63ab59d295d7c2648f06\"},\"headline\":\"Disabling Directory Listing on Your Linux Server: A Step-by-Step Guide\",\"datePublished\":\"2025-01-14T08:00:44+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/wafatech.sa\\\/blog\\\/linux\\\/linux-security\\\/disabling-directory-listing-on-your-linux-server-a-step-by-step-guide\\\/\"},\"wordCount\":571,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/wafatech.sa\\\/blog\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/wafatech.sa\\\/blog\\\/linux\\\/linux-security\\\/disabling-directory-listing-on-your-linux-server-a-step-by-step-guide\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/wafatech.sa\\\/blog\\\/wp-content\\\/uploads\\\/2025\\\/01\\\/Disabling-Directory-Listing-on-Your-Linux-Server-A-Step-by-Step-Guide.png\",\"keywords\":[\"Directory\",\"Disabling\",\"Guide\",\"Linux\",\"Listing\",\"Server\",\"StepbyStep\"],\"articleSection\":[\"Linux Security\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/wafatech.sa\\\/blog\\\/linux\\\/linux-security\\\/disabling-directory-listing-on-your-linux-server-a-step-by-step-guide\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/wafatech.sa\\\/blog\\\/linux\\\/linux-security\\\/disabling-directory-listing-on-your-linux-server-a-step-by-step-guide\\\/\",\"url\":\"https:\\\/\\\/wafatech.sa\\\/blog\\\/linux\\\/linux-security\\\/disabling-directory-listing-on-your-linux-server-a-step-by-step-guide\\\/\",\"name\":\"Disabling Directory Listing on Your Linux Server: A Step-by-Step Guide - WafaTech Blogs\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/wafatech.sa\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/wafatech.sa\\\/blog\\\/linux\\\/linux-security\\\/disabling-directory-listing-on-your-linux-server-a-step-by-step-guide\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/wafatech.sa\\\/blog\\\/linux\\\/linux-security\\\/disabling-directory-listing-on-your-linux-server-a-step-by-step-guide\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/wafatech.sa\\\/blog\\\/wp-content\\\/uploads\\\/2025\\\/01\\\/Disabling-Directory-Listing-on-Your-Linux-Server-A-Step-by-Step-Guide.png\",\"datePublished\":\"2025-01-14T08:00:44+00:00\",\"description\":\"Disabling Directory Listing on Your Linux Server: A Step-by-Step Guide %\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/wafatech.sa\\\/blog\\\/linux\\\/linux-security\\\/disabling-directory-listing-on-your-linux-server-a-step-by-step-guide\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/wafatech.sa\\\/blog\\\/linux\\\/linux-security\\\/disabling-directory-listing-on-your-linux-server-a-step-by-step-guide\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/wafatech.sa\\\/blog\\\/linux\\\/linux-security\\\/disabling-directory-listing-on-your-linux-server-a-step-by-step-guide\\\/#primaryimage\",\"url\":\"https:\\\/\\\/wafatech.sa\\\/blog\\\/wp-content\\\/uploads\\\/2025\\\/01\\\/Disabling-Directory-Listing-on-Your-Linux-Server-A-Step-by-Step-Guide.png\",\"contentUrl\":\"https:\\\/\\\/wafatech.sa\\\/blog\\\/wp-content\\\/uploads\\\/2025\\\/01\\\/Disabling-Directory-Listing-on-Your-Linux-Server-A-Step-by-Step-Guide.png\",\"width\":1024,\"height\":1024,\"caption\":\"linux server disabling directory listing\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/wafatech.sa\\\/blog\\\/linux\\\/linux-security\\\/disabling-directory-listing-on-your-linux-server-a-step-by-step-guide\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/wafatech.sa\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Disabling Directory Listing on Your Linux Server: A Step-by-Step Guide\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/wafatech.sa\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/wafatech.sa\\\/blog\\\/\",\"name\":\"WafaTech Blogs\",\"description\":\"Smart Technologies\",\"publisher\":{\"@id\":\"https:\\\/\\\/wafatech.sa\\\/blog\\\/#organization\"},\"alternateName\":\"WafaTech\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/wafatech.sa\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/wafatech.sa\\\/blog\\\/#organization\",\"name\":\"WafaTech Blogs\",\"alternateName\":\"WafaTech\",\"url\":\"https:\\\/\\\/wafatech.sa\\\/blog\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/wafatech.sa\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/wafatech.sa\\\/blog\\\/wp-content\\\/uploads\\\/2024\\\/06\\\/logo_big.webp\",\"contentUrl\":\"https:\\\/\\\/wafatech.sa\\\/blog\\\/wp-content\\\/uploads\\\/2024\\\/06\\\/logo_big.webp\",\"width\":2221,\"height\":482,\"caption\":\"WafaTech Blogs\"},\"image\":{\"@id\":\"https:\\\/\\\/wafatech.sa\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/people\\\/WafaTech\\\/61560546351289\\\/\",\"https:\\\/\\\/x.com\\\/wafatech_sa\",\"https:\\\/\\\/www.youtube.com\\\/@wafatech-sa\",\"https:\\\/\\\/www.linkedin.com\\\/company\\\/wafatech\\\/\"],\"description\":\"WafaTech, a leading Saudi IT services provider, specializes in cloud solutions, connectivity, and ICT services. Offering secure cloud infrastructure, high-speed internet, and ICT solutions like hosting, backup, and disaster recovery, WafaTech operates a Tier 3 data center at KAUST with ISO certifications. Regulated by CST, the company is committed to innovation, security, and customer satisfaction, empowering businesses in the digital age.\",\"email\":\"sales@wafatech.sa\",\"legalName\":\"Al-Wafa Al-Dhakia For Information Technology LLC\",\"foundingDate\":\"2013-01-08\",\"numberOfEmployees\":{\"@type\":\"QuantitativeValue\",\"minValue\":\"11\",\"maxValue\":\"50\"}},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/wafatech.sa\\\/blog\\\/#\\\/schema\\\/person\\\/1a5761fc0feb63ab59d295d7c2648f06\",\"name\":\"WafaTech SA\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/fde877f001a2e0497276edc0684d3ba2a416c0de8caeb8e785076a1b1b932b3a?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/fde877f001a2e0497276edc0684d3ba2a416c0de8caeb8e785076a1b1b932b3a?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/fde877f001a2e0497276edc0684d3ba2a416c0de8caeb8e785076a1b1b932b3a?s=96&d=mm&r=g\",\"caption\":\"WafaTech SA\"},\"url\":\"https:\\\/\\\/wafatech.sa\\\/blog\\\/author\\\/omer-yaseen\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Disabling Directory Listing on Your Linux Server: A Step-by-Step Guide - WafaTech Blogs","description":"Disabling Directory Listing on Your Linux Server: A Step-by-Step Guide %","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/wafatech.sa\/blog\/linux\/linux-security\/disabling-directory-listing-on-your-linux-server-a-step-by-step-guide\/","og_locale":"en_US","og_type":"article","og_title":"Disabling Directory Listing on Your Linux Server: A Step-by-Step Guide","og_description":"Disabling Directory Listing on Your Linux Server: A Step-by-Step Guide %","og_url":"https:\/\/wafatech.sa\/blog\/linux\/linux-security\/disabling-directory-listing-on-your-linux-server-a-step-by-step-guide\/","og_site_name":"WafaTech Blogs","article_publisher":"https:\/\/www.facebook.com\/people\/WafaTech\/61560546351289\/","article_published_time":"2025-01-14T08:00:44+00:00","og_image":[{"width":2221,"height":482,"url":"https:\/\/wafatech.sa\/blog\/wp-content\/uploads\/2024\/06\/logo_big.webp","type":"image\/webp"}],"author":"WafaTech SA","twitter_card":"summary_large_image","twitter_creator":"@wafatech_sa","twitter_site":"@wafatech_sa","twitter_misc":{"Written by":"WafaTech SA","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":["Article","BlogPosting"],"@id":"https:\/\/wafatech.sa\/blog\/linux\/linux-security\/disabling-directory-listing-on-your-linux-server-a-step-by-step-guide\/#article","isPartOf":{"@id":"https:\/\/wafatech.sa\/blog\/linux\/linux-security\/disabling-directory-listing-on-your-linux-server-a-step-by-step-guide\/"},"author":{"name":"WafaTech SA","@id":"https:\/\/wafatech.sa\/blog\/#\/schema\/person\/1a5761fc0feb63ab59d295d7c2648f06"},"headline":"Disabling Directory Listing on Your Linux Server: A Step-by-Step Guide","datePublished":"2025-01-14T08:00:44+00:00","mainEntityOfPage":{"@id":"https:\/\/wafatech.sa\/blog\/linux\/linux-security\/disabling-directory-listing-on-your-linux-server-a-step-by-step-guide\/"},"wordCount":571,"commentCount":0,"publisher":{"@id":"https:\/\/wafatech.sa\/blog\/#organization"},"image":{"@id":"https:\/\/wafatech.sa\/blog\/linux\/linux-security\/disabling-directory-listing-on-your-linux-server-a-step-by-step-guide\/#primaryimage"},"thumbnailUrl":"https:\/\/wafatech.sa\/blog\/wp-content\/uploads\/2025\/01\/Disabling-Directory-Listing-on-Your-Linux-Server-A-Step-by-Step-Guide.png","keywords":["Directory","Disabling","Guide","Linux","Listing","Server","StepbyStep"],"articleSection":["Linux Security"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/wafatech.sa\/blog\/linux\/linux-security\/disabling-directory-listing-on-your-linux-server-a-step-by-step-guide\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/wafatech.sa\/blog\/linux\/linux-security\/disabling-directory-listing-on-your-linux-server-a-step-by-step-guide\/","url":"https:\/\/wafatech.sa\/blog\/linux\/linux-security\/disabling-directory-listing-on-your-linux-server-a-step-by-step-guide\/","name":"Disabling Directory Listing on Your Linux Server: A Step-by-Step Guide - WafaTech Blogs","isPartOf":{"@id":"https:\/\/wafatech.sa\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/wafatech.sa\/blog\/linux\/linux-security\/disabling-directory-listing-on-your-linux-server-a-step-by-step-guide\/#primaryimage"},"image":{"@id":"https:\/\/wafatech.sa\/blog\/linux\/linux-security\/disabling-directory-listing-on-your-linux-server-a-step-by-step-guide\/#primaryimage"},"thumbnailUrl":"https:\/\/wafatech.sa\/blog\/wp-content\/uploads\/2025\/01\/Disabling-Directory-Listing-on-Your-Linux-Server-A-Step-by-Step-Guide.png","datePublished":"2025-01-14T08:00:44+00:00","description":"Disabling Directory Listing on Your Linux Server: A Step-by-Step Guide %","breadcrumb":{"@id":"https:\/\/wafatech.sa\/blog\/linux\/linux-security\/disabling-directory-listing-on-your-linux-server-a-step-by-step-guide\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/wafatech.sa\/blog\/linux\/linux-security\/disabling-directory-listing-on-your-linux-server-a-step-by-step-guide\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/wafatech.sa\/blog\/linux\/linux-security\/disabling-directory-listing-on-your-linux-server-a-step-by-step-guide\/#primaryimage","url":"https:\/\/wafatech.sa\/blog\/wp-content\/uploads\/2025\/01\/Disabling-Directory-Listing-on-Your-Linux-Server-A-Step-by-Step-Guide.png","contentUrl":"https:\/\/wafatech.sa\/blog\/wp-content\/uploads\/2025\/01\/Disabling-Directory-Listing-on-Your-Linux-Server-A-Step-by-Step-Guide.png","width":1024,"height":1024,"caption":"linux server disabling directory listing"},{"@type":"BreadcrumbList","@id":"https:\/\/wafatech.sa\/blog\/linux\/linux-security\/disabling-directory-listing-on-your-linux-server-a-step-by-step-guide\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/wafatech.sa\/blog\/"},{"@type":"ListItem","position":2,"name":"Disabling Directory Listing on Your Linux Server: A Step-by-Step Guide"}]},{"@type":"WebSite","@id":"https:\/\/wafatech.sa\/blog\/#website","url":"https:\/\/wafatech.sa\/blog\/","name":"WafaTech Blogs","description":"Smart Technologies","publisher":{"@id":"https:\/\/wafatech.sa\/blog\/#organization"},"alternateName":"WafaTech","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/wafatech.sa\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/wafatech.sa\/blog\/#organization","name":"WafaTech Blogs","alternateName":"WafaTech","url":"https:\/\/wafatech.sa\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/wafatech.sa\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/wafatech.sa\/blog\/wp-content\/uploads\/2024\/06\/logo_big.webp","contentUrl":"https:\/\/wafatech.sa\/blog\/wp-content\/uploads\/2024\/06\/logo_big.webp","width":2221,"height":482,"caption":"WafaTech Blogs"},"image":{"@id":"https:\/\/wafatech.sa\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/people\/WafaTech\/61560546351289\/","https:\/\/x.com\/wafatech_sa","https:\/\/www.youtube.com\/@wafatech-sa","https:\/\/www.linkedin.com\/company\/wafatech\/"],"description":"WafaTech, a leading Saudi IT services provider, specializes in cloud solutions, connectivity, and ICT services. Offering secure cloud infrastructure, high-speed internet, and ICT solutions like hosting, backup, and disaster recovery, WafaTech operates a Tier 3 data center at KAUST with ISO certifications. Regulated by CST, the company is committed to innovation, security, and customer satisfaction, empowering businesses in the digital age.","email":"sales@wafatech.sa","legalName":"Al-Wafa Al-Dhakia For Information Technology LLC","foundingDate":"2013-01-08","numberOfEmployees":{"@type":"QuantitativeValue","minValue":"11","maxValue":"50"}},{"@type":"Person","@id":"https:\/\/wafatech.sa\/blog\/#\/schema\/person\/1a5761fc0feb63ab59d295d7c2648f06","name":"WafaTech SA","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/fde877f001a2e0497276edc0684d3ba2a416c0de8caeb8e785076a1b1b932b3a?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/fde877f001a2e0497276edc0684d3ba2a416c0de8caeb8e785076a1b1b932b3a?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/fde877f001a2e0497276edc0684d3ba2a416c0de8caeb8e785076a1b1b932b3a?s=96&d=mm&r=g","caption":"WafaTech SA"},"url":"https:\/\/wafatech.sa\/blog\/author\/omer-yaseen\/"}]}},"jetpack_featured_media_url":"https:\/\/wafatech.sa\/blog\/wp-content\/uploads\/2025\/01\/Disabling-Directory-Listing-on-Your-Linux-Server-A-Step-by-Step-Guide.png","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wafatech.sa\/blog\/wp-json\/wp\/v2\/posts\/1068","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wafatech.sa\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/wafatech.sa\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/wafatech.sa\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/wafatech.sa\/blog\/wp-json\/wp\/v2\/comments?post=1068"}],"version-history":[{"count":0,"href":"https:\/\/wafatech.sa\/blog\/wp-json\/wp\/v2\/posts\/1068\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/wafatech.sa\/blog\/wp-json\/wp\/v2\/media\/1069"}],"wp:attachment":[{"href":"https:\/\/wafatech.sa\/blog\/wp-json\/wp\/v2\/media?parent=1068"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/wafatech.sa\/blog\/wp-json\/wp\/v2\/categories?post=1068"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/wafatech.sa\/blog\/wp-json\/wp\/v2\/tags?post=1068"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}