Nginx module needs ability to supply a complete template instead of generated one

I looked through the forums and the docs and multiple web searches, it seems that a lot of issues could be resolved (including mine) of having the ability to specify a template for Nginx directives. The generated one, while it works for some cases, is flawed in many regards. Compound this with it generating and overwriting existing modified directives has caused many a lot of grief.

What I would propose is a option to provide a user created template for the directives and eliminate the automatically generated one.

Status: 
Active

Comments

It would be tricky to allow the template to be defined entirely using substitution, because some of the params are generated using logic more complex than the template format can express.

What changes did you want to make exactly?

For complex params we can use multiline block as substitution, eg {$FCGI_PARAMS}.

I need to use php-fpm host and port in several places of my custom nginx config, but can't do this, so I must manually edit nginx. Also I need domain name & user as substitution variables.

One option, if you're just making a few small changes to the default config, is to write a script that gets run after domain creation to automate the edits you want.