Apache2 directory listing issue

October 18, 2014 2.8k views

Hi,

I am trying to make a media source for XBMC, I have everything working so far and I can see all the files listed, but XBMC will not list the links and files. I know this is because of the formatting of the directory (Index of) page.

Mine loads as below:

http://magic.littlesmartbox.com

A working example would be:

http://fusion.tvaddons.ag

How do I get my directory to list the same as the working example above? Am I missing something?

Many thanks

Tyler

2 comments
2 Answers

I have a droplet running Apache2 on Ubuntu 14.04 and got here because this is the first result on the searches.

I had a different problem, I did not want my folders indexed, I wanted to prevent directory listing, and .htaccess was not working, so I went to:

/etc/apache2/sites-available

and edited my 000-default.conf file to the following:

<VirtualHost *:80>

    ServerAdmin webmaster@localhost
    DocumentRoot /var/www/mysite


    ErrorLog ${APACHE_LOG_DIR}/error.log
    CustomLog ${APACHE_LOG_DIR}/access.log combined

    <Directory /var/www/mysite>
        Options -Indexes
    </Directory>

</VirtualHost>

Fixed it, in the end I was using XBMC wrong to find the source, but you can turn off the fancy indexing sorting by using the below in a .htaccess file in the directory you want:

Options +Indexes
IndexOptions IgnoreClient

:)

Have another answer? Share your knowledge.