On Thu, Nov 10, 2016 at 06:46:10PM -0500, ulik wrote: Hi there,
> Here is what I want to do, in nginx conf language: > # root when path query arg is present > if ($arg_path) { > root /var/www/example/$arg_path; > } > > # root when path query arg is not present (default) > if (!$arg_path) { > root /var/www/example/default; > } You can use "map" to set a variable, and then use that variable in the "root" directive. That way you can avoid trying to have "root" within "if". Something like map $arg_path $root_bit { default $arg_path; "" default; } and then later root /var/www/example/$root_bit; Cheers, f -- Francis Daly fran...@daoine.org _______________________________________________ nginx mailing list nginx@nginx.org http://mailman.nginx.org/mailman/listinfo/nginx