Welcome! Log In Create A New Profile

Advanced

Re: set variables within config

May 14, 2009 05:14PM
yeah i have a script to build some configs already. but to match
production i have to pull out the common stuff and put it into .conf
files, and then set $var something; include foo.conf; so that the
configs match on dev and production but the dynamic pieces are filled
in appropriately per user/environment.

On Thu, May 14, 2009 at 2:01 PM, Cliff Wells <cliff@develix.com> wrote:
> On Thu, 2009-05-14 at 13:39 -0700, Michael Shadle wrote:
>> On Thu, May 14, 2009 at 12:32 PM, Maxim Dounin <mdounin@mdounin.ru> wrote:
>>
>> > As of now nginx has no variables expanded during config loading -
>> > everything expaneded during request processing.  So using
>> > variables just to save some config lines is somewhat stupid as it
>> > means wasting lots of CPU time for every request.
>> >
>> > If you really need to simplify configs - it's easy to generate
>> > them using make and sed.
>>
>> This might be what Igor meant by "configuration macros"?
>
> If you wanted, you could probably even leverage some template engine
> (typically used for HTML generation, but often useful standalone) to
> generate configs.
>
> Cliff
>
>
>
Subject Author Posted

set variables within config

Jon Garvin May 14, 2009 12:59PM

Re: set variables within config

mike May 14, 2009 01:08PM

Re: set variables within config

Maxim Dounin May 14, 2009 03:32PM

Re: set variables within config

Jon Garvin May 14, 2009 04:16PM

Re: set variables within config

mike May 14, 2009 04:39PM

Re: set variables within config

Cliff Wells May 14, 2009 05:01PM

Re: set variables within config

mike May 14, 2009 05:14PM

Re: set variables within config

Dave Bailey May 14, 2009 05:46PM

Re: set variables within config

Igor Sysoev May 15, 2009 01:17AM

Re: set variables within config

mike May 15, 2009 01:32AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 73
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready