Repository navigation
nginx service: add commonHttpConfig option - #23279
Conversation
|
@mbbx6spp, thanks for your PR! By analyzing the history of the files in this pull request, we identified @globin, @domenkozar and @fadenb to be potential reviewers. |
|
We've using Are there options that have to be defined before the |
|
@fpletz when I use (when I use the virtualHosts declarative form and not managing my own Of course, if I add a global |
|
Just to bump this because I don't think the use case is understood. Checking nginx config file shows this Hopefully that illustrates the problem with |
|
Also, this should be backported to 17.03 at least. |
|
How about |
|
Is this going to make it into 17.03? @globin if you want to change it to prependHttpConfig you should make sure it goes all the way on the top. I didn't want to mess with the ordering too much. If it changes, please provide an update here and update the docs. |
|
Yes, you're right. @globin and I discussed this a few minutes ago and we'll go with your suggestion. Thanks! This will be backported to 17.03. |
(cherry picked from commit 251b9ca) cc NixOS#23279
cc NixOS#23279 (cherry picked from commit 7151e74)
Motivation for this change
For users of the
nginxmodule that use the declarativevirtualHostsstructure there must be a way to define common definitions likelog_formatbefore using them inside of theserverorlocationcontext blocks of the generated virtual hosts that is also at thehttpcontext block scope. Currently the NixOS nginx module does not offer a solution that doesn't require me to manage raw config files for my virtual hosts (I get anemergbecause when I try to append the http config viaappendHttpConfigit shows up after the virtual host generated usage).I added a
nginxmodule VM test to very this works. Seenixos/tests/nginx.nix.Things done
(nix.useSandbox on NixOS,
or option
build-use-sandboxinnix.confon non-NixOS)
nix-shell -p nox --run "nox-review wip"./result/bin/)