Skip to content
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

Always set the root parameter in nginx::vhost resources. #359

Closed
wants to merge 1 commit into from
Closed

Always set the root parameter in nginx::vhost resources. #359

wants to merge 1 commit into from

Conversation

joshuaspence
Copy link

The root parameter should always be set to $www_root, even if use_default_location is set to true. This is a lot easier than the alternative of explicitly specifying www_root in all location blocks.

The `root` parameter should always be set to `$www_root`, even if
`use_default_location` is set to true. This is a lot easier than the
alternative of explicitly specifying `www_root` in all location blocks.
@janorn
Copy link
Contributor

janorn commented Jun 24, 2014

I think this PR will change the behavior. If you want to achieve this you should only specify this parameter:
use_default_location => false

Then you will not need to specify www_root for all location blocks. You will however need to specify a "/" location.
This functionality was added in #145

@janorn
Copy link
Contributor

janorn commented Jun 24, 2014

There are cases when you don't want to have root set on the vhost level but only on the location level.

@janorn
Copy link
Contributor

janorn commented Jun 25, 2014

I guess a possible way around this would be to add a new parameter www_root_default. And if either this is set or use_default_location is false add www_root.

@zachfi
Copy link
Contributor

zachfi commented Jul 1, 2014

-1 on this PR.

@jfryman
Copy link
Contributor

jfryman commented Jul 2, 2014

Can you give me a use case where #145 would not cover you?

@joshuaspence
Copy link
Author

Sorry, I don't see how #145 is related?

To me, this change makes sense. It could at least be toggled with an optional parameter. But it seems counter-intuitive that specifying use_default_location would disable the root directive for the parent block.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants