After server change, some directory handling code is no longer working. It seems to be that if I put a “HeaderName filename” directive in, the header goes in fine, but the listing becomes garbage characters. Without the header, it works fine.

I believe php is a fastcgi instead of mod now, as I had to change a handler name in our main htaccess file to get our basic web stuff to work, but no idea how that is related.

Any hints on what to do or other issues with autoindex after moving servers?
I have even tried a simple test header and it has the same problem.

Edit to add: The cgi handler seems to cause the issue. But I need that so still need a solution to mod_autoindex garbling the listing. I have a simple test set up at http://www.cmcboulder.org/doc_test/

As far as I can tell, there’s a conflict between “AddHandler php5-cgi .html” and having a HeaderName file that’s also HTML. (My guess is that it’s trying to run it through PHP, and that’s not working as expected.) I’d consider giving the HeaderName document some other extension (.inc, perhaps?) to keep PHP from trying to mess with it.

Well a partial fix…and more wierdness. The DH gurus tried using a HTTP header that did not accept compressed output and it worked, so we disabled mod_deflate on my site. Now it works but at a cost!

The HeaderName file was being served as compressed output and the file list was not.

But even with the workaround…When I use a HeaderName and ReadmeName with mod_autoindex, the sequence that comes out now is header, then footer, then the listing. So some strangeness still remains. I’m thinking this is apache bug at this point and thinking about ways around it.