# Apache: How can I override IndexIgnore?

## Robert S

I recently looked up a doc in /doc (apache), to discover that the file README.gz wasn't displayed, despite it being in the /usr/share/$PACKAGENAME directory.  My investigations revealed the following in my /etc/apache2/httpd.conf:

 *Quote:*   

> IndexIgnore .??* *~ *# HEADER* README* RCS CVS *,v *,t .svn

 

In other words, all files beginning with README are ignored.

I actually find it useful to view README files in my /doc location.

Is there any way that this can be overridden in /doc, without affecting any other locations?

----------

## halfgaar

Yes, with a ".htaccess" file. Look it up, and you'll find all you need to know.

----------

## Robert S

I have root access on my system and don't want to use .htaccess files.  To quote from the apache docs:

 *Quote:*   

> However, in general, use of .htaccess files should be avoided when possible. Any configuration that you would consider putting in a .htaccess file, can just as effectively be made in a <Directory> section in your main server configuration file.

 

----------

## Monkeh

uuhhh.. remove README* from the IndexIgnore line?

----------

## halfgaar

That quote from the apache docs should give you all the info you need. Check out your existing config files for those <Directory> directives, and you'll have an example to work with. I don't know however if you need to repeat the indexignore line, but without the readme, or if there is an indexinclude directive, or something similair. This should be easy enough to find out.

----------

## Robert S

It looks like there isn't a solution.  There seems to be a bit of discussion about this.  From the apache2 docs:

 *Quote:*   

> The IndexIgnore directive adds to the list of files to hide when listing a directory. File is a shell-style wildcard expression or full filename. Multiple IndexIgnore directives add to the list, rather than the replacing the list of ignored files. By default, the list contains . (the current directory).

 

Also - from http://marc2.theaimsgroup.com/?l=apache-httpd-users&m=114371168917114&w=2

 *Quote:*   

> > Why "surely"? The docs are pretty clear that it is an additive list. A quick look \
> 
> > at the source  (modules/generators/mod_autoindex.c, look for add_ignore method) \
> 
> > shows that it just pushes the pattern onto an array  every time it finds an \
> ...

 

Looks like I'll need to hack the default httpd.conf - which I'm never keen on doing.

----------

## PaulCompton

 *Robert S wrote:*   

> It looks like there isn't a solution.  There seems to be a bit of discussion about this. 
> 
> ....
> 
> Looks like I'll need to hack the default httpd.conf - which I'm never keen on doing.

 

The default httpd.conf? Just plain old httpd.conf   :Wink:  will be fine. Or possibly, actually, the entries in vhosts.d . I'm somewhat confused though - if you don't want to use .htaccess for it (which I can understand - it can be detrimental to performance for example) then it is clearly a matter for httpd.conf or one of the other conf files loaded by httpd.conf . What other option could there be? Am I missing something here?

Hey, what's the weather doing in the ACT right now? As an Aussie living in the north of Germany I'm somewhat confused weather-wise right now: this time last year we had really heavy snow, today it is 16 degrees outside. Seems as crazy here as it has been down home (Ballarat and Hobart).

----------

## Robert S

I mean good old /etc/apache2/httpd.conf.  I prefer not to tamper too much with this.

Re the weather in Canberra - it hasn't rained properly here for ages and ages.  Everything is dying.  We're set for stage 4 water restrictions soon.  :Sad: 

----------

## PaulCompton

 *Robert S wrote:*   

> I mean good old /etc/apache2/httpd.conf.  I prefer not to tamper too much with this.

 

Understandable. But a little tampering doesn't hurt... or is it a production system  :Very Happy:  ?

Seriously, though, I can't see any other option: it's .htaccess (if your httpd.conf allows overrides), httpd.conf, or the appropriate conf file in /etc/apache2/vhosts.d . Unlesss, as I say, I am missing something. Which, after only 2 coffees and no breakfast although its lunchtime, and having spent half the night trying to calm a newborn with "schreilust", is distinctly possible!

 *Robert S wrote:*   

> 
> 
> Re the weather in Canberra - it hasn't rained properly here for ages and ages.  Everything is dying.  We're set for stage 4 water restrictions soon. 

 

Not good. Sounds just like my family are saying Ballarat is right now. I remember the drought that broke in the summer of 95/96: I was moving house, all my possessions packed into a rented Daihatsu Charade, driving from Gosford down to Melbourne, when the rains began. Just driving up the last pass before the Murray and Albury/Wodonga. Ours was the last car to get through before the roads were closed. Whatever crops the drought hadn't killed were sorted by the flood.

----------

## Robert S

Don't think I'll lose any sleep over it.

I thought the flood was earlier than '95.  I was in Melbourne during the flood.  I wouldn't complain if we had one.

What does the keyboard signify?  Are you another pianist?

----------

## PaulCompton

 *Robert S wrote:*   

> 
> 
> I thought the flood was earlier than '95.  I was in Melbourne during the flood.  I wouldn't complain if we had one.
> 
> What does the keyboard signify?  Are you another pianist?

 

You're right, it was the 94/95 summer. Just went through it in my head again. It went on for some time, because I managed to find a place to live in Glenroy (eek) rather than Moonee Ponds (nicer but too expensive for me at the time) where my sister was, and that took a couple of months. I remember listening to News Radio reports on the flood having already moved into the new place.

Yes, I'm a pianist. My first loves (I am a musical bigamist) are the early romantic period and trad jazz, but my jazzband days ended about 3 years ago and these days I play only in church or when writing songs for church use. You? (We're going to be moved to Gentoo Chat soon at this rate...)

----------

