Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

How do I make a directory listing in apache show the ./hidden files? I tried both

    <Directory /var/www/*>
            Options Indexes FollowSymLinks MultiViews
            AllowOverride None
            Order allow,deny
            allow from all
    </Directory>

and

    <Directory /var/www/>
            Options Indexes FollowSymLinks MultiViews
            AllowOverride None
            Order allow,deny
            allow from all
    </Directory>

but neither show the hidden files

share|improve this question

2 Answers 2

up vote 5 down vote accepted

Somewhere you have an IndexIgnore directive (mods-enabled/autoindex.conf?) that adds dotfiles to the list of files to ignore (mine has .??*) . Once a pattern has been added to the ignore list, it can't be removed.

share|improve this answer
    
brilliant! thanks –  Claudiu Mar 10 '11 at 21:58
    
Do you know, if this can be configured "locally", so to solve this problem? –  Emanuel Berg Dec 26 '12 at 21:16
1  
@EmanuelBerg the directive says it's valid in VirtualHost and .htaccess so it's possible to set it "locally" keeping in mind that you cannot unset filenames added at higher levels, so you'd need to completely remove global configuration. –  DerfK Dec 27 '12 at 4:23
    
To be able to list .htaccess .htpasswd files you also have to add explicit listing using the <Files> directive; see /etc/apache2/apache2.conf where these files are set to be hidden: ' <Files ~ "^\.ht"> Order allow,deny Allow from all Satisfy all </Files>' –  Daniel Sokolowski Feb 7 '13 at 21:07

To amend DerfK's answer: in apahce 2.4 you can, in fact, reset IndexIgnore via a new directive, IndexIgnoreReset

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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