7 messages in ru.sysoev.nginxRe: Feature Req: Include Pipe
FromSent OnAttachments
Jonathan DanceOct 2, 2006 11:06 am 
Cliff WellsOct 2, 2006 2:32 pm 
Bob IppolitoOct 2, 2006 2:41 pm 
Jonathan DanceOct 2, 2006 3:00 pm 
Jonathan VanascoOct 2, 2006 3:49 pm 
Jonathan DanceOct 3, 2006 8:46 am 
Bob IppolitoOct 3, 2006 10:27 am 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:Re: Feature Req: Include PipeActions...
From:Bob Ippolito (bob-@public.gmane.org)
Date:Oct 2, 2006 2:41:30 pm
List:ru.sysoev.nginx

On 10/2/06, Cliff Wells <clif@public.gmane.org> 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