In my case I always make it a point to separate all my virtual domains into its own file name and name convention is relevant to the domain name that I wanted to add. So I've added a new sub virtual domain wherein the file name started with a letter "b" (the b.conf) - which comes before "d" (basically "default.conf"). Funny thing is that after putting the new file "b.conf" and reloading Apache2 daemon, my web domain started to act weird and instead of going to the default configuration as my primary settings it goes to the "b.conf". It took me two hours, a very frustrating trial and error before figuring out finally that "*.conf" had to do something with it. What happen was that Apache2 reads the directory's file/s configuration in an alphabetical order manner and whatever comes first will be its first/primary settings. Its very unexpected and somewhat also still "logical" and another lesson learned when it comes to administering Apache2's virtual domain.
Wednesday, April 9, 2008
Apache2's "Includes/*.conf" reading trick
Today I've encountered a very puzzling behavior of how Apache2 read its configuration files. In the man configuration file (httpd.conf) wherein you declare the "Includes" file/s parameter (that is usually got a default of "[some directory]/*.conf"), that should function as an extension of your configuration. And being as a standard administrator I always keep the "default.conf" file as my default.
Subscribe to:
Posts (Atom)