1 message in ru.sysoev.nginxWhy no top-level set?
FromSent OnAttachments
Marcin KasperskiApr 30, 2008 3:06 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:Why no top-level set?Actions...
From:Marcin Kasperski (Marc@public.gmane.org)
Date:Apr 30, 2008 3:06:21 am
List:ru.sysoev.nginx

For some reason, the set directive is available only within server block. Wouldn't it be possible to handle set's also on the top level?

Motivation? Well, some use case:

set logdir /my/log/dir; error_log $log_dir/error.log

# ... http { # ... server { access_log $log_dir/access.log combined;

Similarly one could set crucial ports, hostnames etc once and reuse them thorough the file.

Another possibility - one could write whole server config using variables for directories, ports etc, then include it into files which would just set those variables differently (and - say - reuse the same config on different machines).