httpd
httpd copied to clipboard
httpd_config should not automatically append .conf
Currently, the httpd_config resource will automatically append .conf to the file name. That prevents this resource from being used with configuration files with other extensions. For instance, I have a file myauthentication.include that sets up some SSL client authentication and is reused/included in several configuration files.
There is a bit of convention collapse going on among the distros here... the "debian way" vs "the centos way" vs "...".
Turns out that the real source of truth for what's loaded is in the main config. https://github.com/chef-cookbooks/httpd/blob/master/templates/default/httpd.conf.erb#L59-L68
.conf vs .include is a rather arbitrary thing invented by (I forget).
That being said... there's not really a distinction between a module's load config and a higher level thing like a full site layout with vhosts and stuff... it's all just a "config".
I was toying around with the idea of an "httpd_site" that's just a wrapper around httpd_config that lays out .conf vs .whatever.. but I failed to see a point, got distracted, and started working on mysql 6.0.x ;)
Any reason to separate other than aesthetics here? -s
The .conf vs. include is something I invented. What I needed was basically a multi-level include. All the *.conf files get included by the main httpd.conf file. I'm using the .include extension specifically to prevent httpd.conf from including this particular file.
My own include contains stuff that goes inside a container; it wouldn't make sense to have it included directly from the main httpd.conf. Instead, a few of the .conf files will actually include my .include file.
The use case for me is setting up multiple password-protected directories. Rather than specifying the same LDAP configuration etc., I want to be able to update this once.
All this predates my move to chef - today, a template could also handle the same task.
Interesting. What about a filename extension resource parameter that defaults to 'conf', but is tweakable per-resource? -s
On Mon, Jan 12, 2015 at 3:40 PM, Kevin Keane [email protected] wrote:
The .conf vs. include is something I invented. What I needed was basically a multi-level include. All the *.conf files get included by the main httpd.conf file. I'm using the .include extension specifically to prevent httpd.conf from including this particular file.
My own include contains stuff that goes inside a container; it wouldn't make sense to have it included directly from the main httpd.conf. Instead, a few of the .conf files will actually include my .include file.
The use case for me is setting up multiple password-protected directories. Rather than specifying the same LDAP configuration etc., I want to be able to update this once.
All this predates my move to chef - today, a template could also handle the same task.
— Reply to this email directly or view it on GitHub https://github.com/chef-cookbooks/httpd/issues/15#issuecomment-69641644.
That would work and makes a lot of sense. Might be a bit confusing to somebody seeing it for the first time, but I think chef is a tool where a learning curve is not a bad thing.
Yep.
That's why we'd leave it as a "sane default" and not bring it up until the "advanced examples" section of the documentation.
-s
On Mon, Jan 12, 2015 at 3:48 PM, Kevin Keane [email protected] wrote:
That would work and makes a lot of sense. Might be a bit confusing to somebody seeing it for the first time, but I think chef is a tool where a learning curve is not a bad thing.
— Reply to this email directly or view it on GitHub https://github.com/chef-cookbooks/httpd/issues/15#issuecomment-69642982.
If someone wants to open up a PR for this we'd be amenable to merging it as per above discussion.