Forum Moderators: phranque

Message Too Old, No Replies

apache22/Includes

         

chowse

4:39 pm on Apr 25, 2009 (gmt 0)

10+ Year Member



Hi,
Could anyone tell me if Apache 2.2.11 will load files in /usr/local/etc/apache22/Includes by default, or must I have an "Include..." line in httpd.conf?
I have "Include etc/apache22/Includes/*.conf", but don't know if that's a default or not. I guess that loads those files.

I have no-accf.conf in that location, and I'm getting tons of "Request Missing an Accept Header" messages from mod_security.

This could be unrelated, but I need to know about loading those files.

Thanks,
Charles

Apache 2.2.11, FreeBSD-6.4-STABLE, mod_security v.2.5.9

Caterham

5:58 pm on Apr 25, 2009 (gmt 0)

10+ Year Member



Could anyone tell me if Apache 2.2.11 will load files in /usr/local/etc/apache22/Includes by default, or must I have an "Include..." line in httpd.conf?

The latter one.

I have "Include etc/apache22/Includes/*.conf"

If that line is not commented-out (#Include etc/...) all *.conf-files in that folder are included. But shouldn't there be a leading slash since your path looks like an absolute one and not a serverRoot relative one? -> Include /etc/apache22/...?

[edited by: Caterham at 6:01 pm (utc) on April 25, 2009]

chowse

8:18 pm on Apr 25, 2009 (gmt 0)

10+ Year Member



From my httpd.conf:

# Configuration and logfile names: If the filenames you specify for many
# of the server's control files begin with "/" (or "drive:/" for Win32), the
# server will use that explicit path. If the filenames do *not* begin
# with "/", the value of ServerRoot is prepended -- so "/var/log/foo.log"
# with ServerRoot set to "/usr/local" will be interpreted by the
# server as "/usr/local//var/log/foo.log".

Note the double slash in the path in the last line above.
apachectl -t reports "Syntax OK"
So I guess it doesn't need the leading slash.

Thanks for the reply,
Charles

Caterham

9:29 pm on Apr 25, 2009 (gmt 0)

10+ Year Member



so "/var/log/foo.log"
# with ServerRoot set to "/usr/local" will be interpreted by the
# server as "/usr/local//var/log/foo.log".

That is caused by a problem at compile time. @rel_logfiledir@ was not relative as it should have been, but absolute (/var/log/foo.log instead of log/foo.log). Self-defined compile-time option? That's why you get such misleading entries in the generated config file.

The text is correct; a path starting with a leading shash is not prepended with the ServerRoot but a path which does not start with a leading slash is treated to be relative to the ServerRoot, i.e. prepended with the server's root path.