Feature Req: Include Pipe

Bob Ippolito bob at redivi.com
Tue Oct 3 01:41:53 MSD 2006


On 10/2/06, Cliff Wells <cliff at develix.com> wrote:
> On Mon, 2006-10-02 at 14:07 -0400, Jonathan Dance wrote:
> > Hello again,
> >
> > I was wondering what people might think about adding pipe support to
> > the include directive (yes, I'm a config file junkie). This might be a
> > good alternative to using the internal nginx variables - people could
> > simply use a language of their choice (via the shebang line) to
> > execute a script which would output their desired configuration.
> >
> > From nginx's perspective, I see this as:
> >
> > include |/etc/nginx/conf.sh;
> >
> > The "|" would indicate that nginx should treat /etc/nginx/conf.sh as a
> > pipe. It would then popen() on /etc/conf/conf.sh, read the output, and
> > then parse the results.
>
> I think I'd rather see database support, i.e. storing configuration
> within PostgreSQL or MySQL.  This gives you the same abilities as your
> "include pipe" concept (externally scriptable) but also makes it easier
> to put management front-ends in place (web or GUI tools).
>
> Of course, you could also do it your way and have your script read from
> a database, but I think simply having database support is more direct.

That would be a pretty bad idea. A pipe is a much better way to go for
this sort of thing, though you might as well just write out a config
file instead of wedging pipe support in. Piped logs would be more
convenient than using signals to rotate, though.

Including database support directly into nginx doesn't really make
anything easier; it would make it less flexible, more bloated, and
harder to build/maintain.

-bob





More information about the nginx mailing list