httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sander Smeenk <ssme...@freshdot.net>
Subject [users@httpd] mods-enabled/dir.conf & conf.d/ files
Date Thu, 07 Mar 2013 13:51:38 GMT
Hi,

I'm running Apache 2.2.22(-1ubuntu1.2) on Ubuntu Precise GNU/Linux.
Apache is not picking up the 'DirectoryIndex' configuration from the
conf.d/ directory as i will illustrate below:

Default installation has /etc/apache2/mods-available/dir.{load,conf}
symlinked in /etc/apache2/mods-enabled/. Nothing wrong with that, sane
defaults are configured and i have my own perference in conf.d/myconfig
like so:

| root@mybox:/etc/apache2# grep -ri DirectoryIndex .
| ./mods-available/dir.conf:          DirectoryIndex index.html index.cgi index.pl index.php
index.xhtml index.htm
| ./mods-enabled/dir.conf:          DirectoryIndex index.html index.cgi index.pl index.php
index.xhtml index.htm
| ./conf.d/myconfig:DirectoryIndex index.php index.pl index.html

In /etc/apache2/apache2.conf the order of 'Includes' is:

| root@mybox:/etc/apache2# grep "Include" apache2.conf
| # Include module configuration:
| Include mods-enabled/*.load
| Include mods-enabled/*.conf
| # Include all the user configurations:
| Include httpd.conf
| # Include ports listing
| Include ports.conf
| # Include of directories ignores editors' and dpkg's backup files,
| # Include generic snippets of statements
| Include conf.d/
| # Include the virtual host configurations:
| Include sites-enabled/

And to my knowledge, Apache parses it's configuration top-to-bottom.
If i put 'FUBAR' in conf.d/myconfig, Apache fails to start so it does
parse the file...

I noticed Apache does not pick up the DirectoryIndex setting from
conf.d/myconfig and sticks with the one found in mods-enabled/dir.conf.

My site's DocumentRoot has both an index.html and index.php file.  If i
leave the stock config for dir.conf with my conf.d/myconfig file, Apache
shows me the index.html, if i remove mods-enabled/dir.conf and reload
Apache it gives me the index.php.

Is this a bug in Apache? Or am i doing something wrong?
I discovered this with mpm-itk and reproduced it with mpm-prefork.

Thanks for your time.

With regards,
-Sander.
-- 
| You dig around for a while but you fail to find any treasure.
| 4096R/20CC6CD2 - 6D40 1A20 B9AA 87D4 84C7  FBD6 F3A9 9442 20CC 6CD2

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message