-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for setting UserDir in Virual Hosts #2192
Conversation
apache::vhost is a typethat may have no external impact to Forge modules. This module is declared in 173 of 578 indexed public
|
ddba1e0
to
fb4f598
Compare
We can only set this setting at the VirtualHost level by relying on the `custom_fragment` parameter, which does not scale when we want to enable UserDir for a single VHost because we have to manually disable it on all other VHosts. With this change, one can ensure UserDir is active only on specific VHost with something like: ``` Apache::Vhost { userdir => 'disabled', } apache::vhost { 'example.com': # [...] userdir => 'enabled', } ``` A specific `userdir` parameter avoid clashes that would prevent this technique to be effective with `custom_fragment`.
fb4f598
to
ec74a8e
Compare
Hum, just realized that class { 'apache::mod::userdir':
custom_fragment => @(CONFIG),
UserDir disabled
| CONFIG
}
apache::vhost { 'example.com':
# [...]
custom_fragment => @(CONFIG),
UserDir enabled
| CONFIG
} I think this change allow a more readable configuration (as described above) so maybe this change still make sense? |
Thanks @smortex for submitting the PR. Ohh you are right. We can use |
This PR has been marked as stale because it has been open for a while and has had no recent activity. If this PR is still important to you please drop a comment below and we will add this to our backlog to complete. Otherwise, it will be closed in 7 days. |
@smortex Hey sorry for the wait on a review on this. |
@david22swan Yeah, I see this PR from time to time and have mixed feelings about it: relying on If you think it is a waste of time, feel free to close this PR, otherwise I will be a happy user of this feature one it is merged 😉 |
@smortex Talked it over and we're good with this change so gonna go ahead and merge. |
We can only set this setting at the VirtualHost level by relying on the
custom_fragment
parameter, which does not scale when we want to enableUserDir for a single VHost because we have to manually disable it on all
other VHosts.
With this change, one can ensure UserDir is active only on specific
VHost with something like:
A specific
userdir
parameter avoid clashes that would prevent thistechnique to be effective with
custom_fragment
.