MyBB Community Forums

Full Version: forum changes to directory listing when SSI
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I am trying to do server side includes (SSI) by adding 
    DirectoryIndex index.shtml index.html

to my apache config file /etc/apache2/apache2.conf

However whenever i do this, mybb directory turns into a directory listing instead of displaying mybb. Why is this? Everything else works fine other than mybb. I had to revert this, so it is proper, so it currently does not show the problem via website. But now i cannot point the start page to index.shtml

mybb is not in root, but in directory /forums
Quote:DirectoryIndex index.php index.shtml index.html

Give that a shot.
(2015-10-04, 09:19 PM)metulburr Wrote: [ -> ]I am trying to do server side includes (SSI) by adding 
    DirectoryIndex index.shtml index.html

to my apache config file /etc/apache2/apache2.conf

However whenever i do this, mybb directory turns into a directory listing instead of displaying mybb. Why is this? Everything else works fine other than mybb. I had to revert this, so it is proper, so it currently does not show the problem via website. But now i cannot point the start page to index.shtml

mybb is not in root, but in directory /forums

You should put that either in the virtual host file (usually better performance but not in your case) or directly in a .htaccess file. 

MyBB won't display because there is no shtml or html file to handle the request so it will just revert to directory listing, you should turn that feature off with:

Options -Indexes

Complete code:
Options -Indexes
DirectoryIndex index.shtml index.html index.php

Apache will look for the directory index in this order and deny access to the directory if none of them is found.
As others have said, Apache uses the DirectoryIndex directive to determine which resource to serve if a visitor just provides a URL which resolves to a directory. If nothing in that directive is found within the directory, Apache will serve up a directory listing if that directory's Options directive allows it; otherwise Apache will return a "Not Authorized" error.