I'd love to globally customize the HTML and CSS of the default Apache2 directory listing. How could I do this? Is there a folder with the "skeleton" of this HTML?

1 Answer 1


Solved: https://stackoverflow.com/questions/30880975/how-to-style-directory-listings-with-apache-mod-autoindex-using-namewidth-html#55087425

Enable the autoindex mod, then add a stylesheet in the home (/) directory of your vhost like so:

<VirtualHost *:80>
# all other config
<IfModule mod_autoindex.c>
    IndexOptions FancyIndexing
    HeaderName header.html
    IndexStyleSheet /css.css
# all other config

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.