1

Hi is it possible to change this page its style, etc..?

Default index of page


EDIT # 1 Nov

With Lucio answer I got it working. I've set IndexStyleSheet to one specific location so it also will operate from the same file for all local domains.

IndexStyleSheet "http://localhost/autoindex.css"

But this is just one part of the answer for my question, I also wonder how I should modify the HTML. Because I want a wrapper and a menu with links to useful locations on my webserver.

Default autoindex sourcecode with an added stylesheet

3 Answers 3

2

You can check my project ABBA which does exactly what you want. It uses Bootswatch templates based on the well known Bootstrap framework.

It is fully responsive, with multiple templates and very easy to set up.

The source code is available on GitHub so you can fork it and tweak it.

It uses Jekyll (GitHub Pages) to generate distribution files.

1

I think you want to study the mod_autoindex section in the Apache documentation.

2
  • Ahh so that's how it's called! Anyway it doesn't seem to work to add "IndexStyleSheet" can you explain a little more about it?
    – luukvhoudt
    Oct 31, 2014 at 21:40
  • @Fleuv: Sorry, but it was quite some time since I worked with Apache. Please study Lucio's edited answer instead. Oct 31, 2014 at 21:55
1

There is a way thanks to Gunnar Hjalmarsson!

To change style

Use the IndexStyleSheet directive. For example:

IndexStyleSheet "/css/style.css"

The /etc/apache2/sites-enabled/your_site.conf file should looks like:

<VirtualHost *:80>
        ServerName something.com
        DocumentRoot /var/www/
        IndexStyleSheet "/css/style.css"
        ...
</VirtualHost>

And the /var/www/css/style.css stylesheet:

body { color: red; }

Result:

loading


Another more flexible solution..

Place an index.html file on the / directory with your own design and list directory functionality :-)

1
  • This is what I already have, but I and I'm sure many others don't like to do things like that manually.
    – luukvhoudt
    Oct 31, 2014 at 21:22

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .