{"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"],"_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}]}}