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

use_default_location behavior is undocumented and confusing/counterintuitive #544

Open
cscheib opened this issue Jan 5, 2015 · 4 comments

Comments

@cscheib
Copy link

cscheib commented Jan 5, 2015

At best, its current default configuration seems a bad default to set - per nginx best practices, you should generally have your document root defined in the "server" stanza rather than the "location" stanza. One should be able to reasonably assume that to be the default behavior. reference

I couldn't find any documentation on this, even at the top of the file, and had to dig into the code to determine why root wasn't being set in the server stanza.

While the default behavior seems counterintuitive to me, it would be acceptable if there were more (any) documentation around the behaviors of this parameter, and how/when to work around them.

@wyardley
Copy link
Collaborator

wyardley commented Oct 8, 2016

I totally agree! At the least, the module should give a more correct (and useful) warning in cases where this causes problems. Or maybe there's a way to see if a '/' location exists for the vhost and suppress the default if so?

@wyardley
Copy link
Collaborator

wyardley commented Nov 7, 2016

btw, we're hoping to start work on documenting the main class in #941

@beezly
Copy link

beezly commented Feb 2, 2018

I just hit this too. The lack of documentation isn't great. I am very happy to write a PR for the documentation, but I'm not clear on why you would want the behaviour of use_default_location => true. Can anyone suggest?

@wyardley
Copy link
Collaborator

wyardley commented Feb 2, 2018

@beezly I think the idea is for the module to work "out of the box" with minimal configuration (by setting up that default location).

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

No branches or pull requests

3 participants