{"id":3169,"date":"2021-10-19T10:50:54","date_gmt":"2021-10-19T10:50:54","guid":{"rendered":"https:\/\/ownwebservers.com\/kb\/?p=3169"},"modified":"2021-10-19T10:50:54","modified_gmt":"2021-10-19T10:50:54","slug":"how-to-resolve-the-apache-error-no-matching-directoryindex","status":"publish","type":"post","link":"https:\/\/ownwebservers.com\/kb\/how-to-resolve-the-apache-error-no-matching-directoryindex\/","title":{"rendered":"How to Resolve the Apache Error: No matching DirectoryIndex?"},"content":{"rendered":"<p>You might face this error while attempting to access applications that have an index.php file (or different index file), however not an index.html or different such as \u2018directory index\u2019 file.<\/p>\n<p>For example, phpMyAdmin contains of index.php file when installation, however not an index.html file.<\/p>\n<p>With the below command Apache is by default get configured:<\/p>\n<blockquote><p>DirectoryIndex index.html<\/p><\/blockquote>\n<p>The directory files that are named index.html Apache will only check for that .<\/p>\n<p>Apache gives the below error, While trying to access phpMyAdmin:<\/p>\n<blockquote><p>[autoindex:error] [pid 20115] [client 10.30.6.80:50800] AH01276: Cannot serve directory \/usr\/share\/phpMyAdmin\/: No matching DirectoryIndex (index.html) found, and server-generated directory index forbidden by Options directive<\/p><\/blockquote>\n<p>In this case, add\u00a0<strong>index.php<\/strong>\u00a0to the\u00a0<strong>DirectoryIndex<\/strong>\u00a0directive.<\/p>\n<blockquote><p><span class=\"crayon-v\">vim<\/span> <span class=\"crayon-o\">\/<\/span><span class=\"crayon-v\">etc<\/span><span class=\"crayon-o\">\/<\/span><span class=\"crayon-v\">httpd<\/span><span class=\"crayon-o\">\/<\/span><span class=\"crayon-v\">conf<\/span><span class=\"crayon-o\">\/<\/span><span class=\"crayon-v\">httpd<\/span><span class=\"crayon-sy\">.<\/span><span class=\"crayon-v\">conf<\/span><\/p><\/blockquote>\n<div id=\"crayon-616e9dff75241848704448\" class=\"crayon-syntax crayon-theme-classic crayon-font-monaco crayon-os-pc print-yes notranslate\" data-settings=\" minimize scroll-mouseover\">\n<div class=\"crayon-plain-wrap\">\n<div id=\"crayon-616e9dff75241848704448\" class=\"crayon-syntax crayon-theme-classic crayon-font-monaco crayon-os-pc print-yes notranslate\" data-settings=\" minimize scroll-mouseover\">\n<div class=\"crayon-main\"><strong>Change the below line:<\/strong><\/div>\n<\/div>\n<\/div>\n<\/div>\n<div id=\"crayon-616e9dff75245118451805\" class=\"crayon-syntax crayon-theme-classic crayon-font-monaco crayon-os-pc print-yes notranslate\" data-settings=\" minimize scroll-mouseover\">\n<div class=\"crayon-plain-wrap\">\n<div class=\"crayon-nums-content\">\n<div class=\"crayon-num\" data-line=\"crayon-616e9dff75245118451805-1\"><\/div>\n<\/div>\n<div class=\"crayon-pre\">\n<blockquote>\n<div id=\"crayon-616e9dff75245118451805-1\" class=\"crayon-line\"><span class=\"crayon-e\">DirectoryIndex <\/span><span class=\"crayon-v\">index<\/span><span class=\"crayon-sy\">.<\/span><span class=\"crayon-v\">html<\/span><\/div>\n<\/blockquote>\n<\/div>\n<\/div>\n<div class=\"crayon-main\"><\/div>\n<\/div>\n<p><strong>to:<\/strong><\/p>\n<div id=\"crayon-616e9dff75248385015842\" class=\"crayon-syntax crayon-theme-classic crayon-font-monaco crayon-os-pc print-yes notranslate\" data-settings=\" minimize scroll-mouseover\">\n<div class=\"crayon-plain-wrap\">\n<div class=\"crayon-pre\">\n<blockquote>\n<div id=\"crayon-616e9dff75248385015842-1\" class=\"crayon-line\"><span class=\"crayon-e\">DirectoryIndex <\/span><span class=\"crayon-v\">index<\/span><span class=\"crayon-sy\">.<\/span><span class=\"crayon-e\">html <\/span><span class=\"crayon-v\">index<\/span><span class=\"crayon-sy\">.<\/span><span class=\"crayon-v\">php<\/span><\/div>\n<\/blockquote>\n<\/div>\n<\/div>\n<div class=\"crayon-main\"><\/div>\n<\/div>\n<p>Now exit and save the file using the command :<strong>wq<\/strong>\u00a0.<\/p>\n<p>Ensure to restart Apache:<\/p>\n<div id=\"crayon-616e9dff7524c503523254\" class=\"crayon-syntax crayon-theme-classic crayon-font-monaco crayon-os-pc print-yes notranslate\" data-settings=\" minimize scroll-mouseover\">\n<div class=\"crayon-plain-wrap\">\n<div class=\"crayon-pre\">\n<blockquote>\n<div id=\"crayon-616e9dff7524c503523254-1\" class=\"crayon-line\"><span class=\"crayon-e\">systemctl <\/span><span class=\"crayon-e\">restart <\/span><span class=\"crayon-v\">httpd<\/span><\/div>\n<\/blockquote>\n<\/div>\n<\/div>\n<div><\/div>\n<div class=\"crayon-main\"><span style=\"font-weight: 300;\">That&#8217;s all ! You have now learned to solve the Apache Error: No matching DirectoryIndex.<\/span><\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>You might face this error while attempting to access applications that have an index.php file (or different index file), however not an index.html or different such as \u2018directory index\u2019 file. For example, phpMyAdmin contains of index.php file when installation, however not an index.html file. With the below command Apache is by default get configured: DirectoryIndex [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[24],"tags":[],"class_list":["post-3169","post","type-post","status-publish","format-standard","hentry","category-web-hosting"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v15.2.1 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>How to Resolve the Apache Error: No matching DirectoryIndex? - OWS KB<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/ownwebservers.com\/kb\/how-to-resolve-the-apache-error-no-matching-directoryindex\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Resolve the Apache Error: No matching DirectoryIndex? - OWS KB\" \/>\n<meta property=\"og:description\" content=\"You might face this error while attempting to access applications that have an index.php file (or different index file), however not an index.html or different such as \u2018directory index\u2019 file. For example, phpMyAdmin contains of index.php file when installation, however not an index.html file. With the below command Apache is by default get configured: DirectoryIndex [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/ownwebservers.com\/kb\/how-to-resolve-the-apache-error-no-matching-directoryindex\/\" \/>\n<meta property=\"og:site_name\" content=\"OWS KB\" \/>\n<meta property=\"article:published_time\" content=\"2021-10-19T10:50:54+00:00\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\">\n\t<meta name=\"twitter:data1\" content=\"admin\">\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\">\n\t<meta name=\"twitter:data2\" content=\"1 minute\">\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebSite\",\"@id\":\"https:\/\/ownwebservers.com\/kb\/#website\",\"url\":\"https:\/\/ownwebservers.com\/kb\/\",\"name\":\"OWS KB\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":\"https:\/\/ownwebservers.com\/kb\/?s={search_term_string}\",\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/ownwebservers.com\/kb\/how-to-resolve-the-apache-error-no-matching-directoryindex\/#webpage\",\"url\":\"https:\/\/ownwebservers.com\/kb\/how-to-resolve-the-apache-error-no-matching-directoryindex\/\",\"name\":\"How to Resolve the Apache Error: No matching DirectoryIndex? - OWS KB\",\"isPartOf\":{\"@id\":\"https:\/\/ownwebservers.com\/kb\/#website\"},\"datePublished\":\"2021-10-19T10:50:54+00:00\",\"dateModified\":\"2021-10-19T10:50:54+00:00\",\"author\":{\"@id\":\"https:\/\/ownwebservers.com\/kb\/#\/schema\/person\/4a40fe3fe17a08ddd1d7c113668e75f2\"},\"breadcrumb\":{\"@id\":\"https:\/\/ownwebservers.com\/kb\/how-to-resolve-the-apache-error-no-matching-directoryindex\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/ownwebservers.com\/kb\/how-to-resolve-the-apache-error-no-matching-directoryindex\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/ownwebservers.com\/kb\/how-to-resolve-the-apache-error-no-matching-directoryindex\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"item\":{\"@type\":\"WebPage\",\"@id\":\"https:\/\/ownwebservers.com\/kb\/\",\"url\":\"https:\/\/ownwebservers.com\/kb\/\",\"name\":\"Home\"}},{\"@type\":\"ListItem\",\"position\":2,\"item\":{\"@type\":\"WebPage\",\"@id\":\"https:\/\/ownwebservers.com\/kb\/how-to-resolve-the-apache-error-no-matching-directoryindex\/\",\"url\":\"https:\/\/ownwebservers.com\/kb\/how-to-resolve-the-apache-error-no-matching-directoryindex\/\",\"name\":\"How to Resolve the Apache Error: No matching DirectoryIndex?\"}}]},{\"@type\":\"Person\",\"@id\":\"https:\/\/ownwebservers.com\/kb\/#\/schema\/person\/4a40fe3fe17a08ddd1d7c113668e75f2\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\/\/ownwebservers.com\/kb\/#personlogo\",\"inLanguage\":\"en-US\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/ba5db5841d48bd7517bb2583e13983e6d2fa56a4099a0b3c61ad2daefc321303?s=96&d=mm&r=g\",\"caption\":\"admin\"},\"sameAs\":[\"https:\/\/ownwebservers.com\/kb\"]}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","_links":{"self":[{"href":"https:\/\/ownwebservers.com\/kb\/wp-json\/wp\/v2\/posts\/3169","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ownwebservers.com\/kb\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ownwebservers.com\/kb\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ownwebservers.com\/kb\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ownwebservers.com\/kb\/wp-json\/wp\/v2\/comments?post=3169"}],"version-history":[{"count":1,"href":"https:\/\/ownwebservers.com\/kb\/wp-json\/wp\/v2\/posts\/3169\/revisions"}],"predecessor-version":[{"id":3170,"href":"https:\/\/ownwebservers.com\/kb\/wp-json\/wp\/v2\/posts\/3169\/revisions\/3170"}],"wp:attachment":[{"href":"https:\/\/ownwebservers.com\/kb\/wp-json\/wp\/v2\/media?parent=3169"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ownwebservers.com\/kb\/wp-json\/wp\/v2\/categories?post=3169"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ownwebservers.com\/kb\/wp-json\/wp\/v2\/tags?post=3169"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}