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
Per VIRTUAL_HOST configuration files #106
Conversation
Wondering, if I defined multiple domains (e.g. |
Yes. I thought about clarifying that in the docs. It's the same situation
as with certs and htpasswd.
|
Docs updated. |
I'm not sure what to recommend for people using regex-based or other more complex |
Ah, I thought it would follow the same rules, wasn't entirely sure. Thanks a lot for this contribution, I think it will be very useful feature and I like this a lot more than having special "flags" or "environment-vars" for each feature! |
While I was working on this PR, I started having ideas about somehow using |
This looks good. Thanks for updating the docs too. I agree, the README is getting a little messy. For the custom config files, two questions:
Thoughts? |
I actually started looking into implementing the necessary function for Stepping back a bit, I think that both of your proposed changes sound like the sort of things that could lead to an increased support burden without substantial benefits. In the case of the first change, users of In the case of the second change, users will gain total control over the |
Good points. Not everything is overideable with this approach I think. I don't think you could override the The include is for both SSL and non-SSL. I'm not sure if it matters but adding SSL options would get included in the non-SSL block. Maybe that can be handled w/ having a There's been other requests to not redirect http->https. Not sure if an include could resolve that issue. I still think being able to generate the server block is useful. It could actually be a separate feature independent of this. The majority of the cases could be handled w/ this PR and anything not covered could be handled w/ a custom vhost template. Maybe a naming conventions like: |
I should have been clearer when I was talking about overriding. I was only referring to the other things that are currently set in the Implementing virtual path support requires grouping the backends that serve a particular path for a particular host into their own upstream and connecting each upstream to the appropriate Regarding the SSL thing, I did consider the fact that users might want to use a different config file for the HTTP and HTTPS blocks, but I wasn't sure what the right approach would be to support that. I'd probably lean toward supporting a I like the idea of having the custom Go template thing be able to replace the entire |
@md5 I think we can punt on separate SSL configs for now and address it later if there is an issue. |
Per VIRTUAL_HOST configuration files
👍 to dealing with the SSL thing if anyone complains about needing separate configs |
Awesome! |
This PR adds the ability to configuration Nginx settings on a per
VIRTUAL_HOST
basis by adding a configuration file under/etc/nginx/vhost.d
. As in the case of SSL configuration and basic authentication, the files in this directory are expected to be named after theVIRTUAL_HOST
value verbatim (without.conf
).I also added some documentation around providing custom Nginx configuration on a proxy-wide basis. The whole README.md is starting to feel pretty messy to me, so it may make sense at some point to do an editing pass on it as a whole or to move large parts of it into wiki pages.
Fixes #29, #36, #39, #70, #76, #87
Related #71