Templating nginx-kong.conf


#1

At the moment, to change default Nginx configurations which are loaded from kong prepare, we need to change actual implement of Nginx (two files, one general and other specific to Kong configs) and include both configurations in one file.
However, it would be nice to create two separate options to specify a template for nginx general config or nginx Kong configs.


#2

Does the custom templating functionality documented at https://getkong.org/docs/0.11.x/configuration/ meet your requirements? Or is there something specific to your use case that this doesn’t meet?


#3

Hi!

For starters, no discussion about the NGINX configuration should be made without first pointing out our long term solution, described here: A new way to install and configure Kong.

Creating two separate options could feel rather cumbersome. One is already confusing enough in my opinion… As a short-term solution, because it is less supportive of the “custom template” paradigm, I am inclined to be in favor of the work started by this PR, although, it doesn’t allow customizing ngx_lua directives already specified by nginx-kong.conf. The PR has been stale and is up for takers :slight_smile:

Regardless, we really intend to provide the solution described in my first link for long term, true NGINX integration for power-users.


#4

Yes, they met. However, what I reported is to be considered as a improvement, not a problem. Since we have now two separated files for Nginx, using templating functionality will break that. So, I want to be able to only change files separately.