Quantcast
Channel: Nginx Forum
Viewing all articles
Browse latest Browse all 53287

Variables and includes

$
0
0
Is it possible to use a variable from one configuration in a included
config file? Example:

set $a = "hello";
include test.conf;

[test.conf]
if ($a = "hello") {
set $a = "world";
}
# something that works with $a

Within the scope of the commands of test.conf, will $a be "hello" or
"world"? Currently my usage like this gives me a, "using unitialized
variable" warning.
--
Daniel

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx

Viewing all articles
Browse latest Browse all 53287

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>