If set variable unfamiliar language

I’ve seen code for virtual domains in the nginx.conf to handle setups
with WP Super Cache using an if condition that appears to assign a
variable value with “set” as shown in the example below.

Could someone provide me with a link, or links, where I can see some
examples of how this is used, how to use set, and what language it is
from, so I can write some of my own configurations using this approach?

if the requested file exists, return it immediately

           if (-f $request_filename) {
                   break;
           }

           set $supercache_file '';
           set $supercache_uri $request_uri;

           if ($request_method = POST) {
                   set $supercache_uri '';
           }

Using pretty permalinks, so bypass the cache for any query string

           if ($query_string) {
                   set $supercache_uri '';
           }

           if ($http_cookie ~* 

“comment_author_|wordpress|wp-postpass_” ) {
set $supercache_uri ‘’;
}

Posted at Nginx Forum:

I see Module ngx_http_rewrite_module now, but I am still
unsure about how some of the logic works. For example the follow rewrite
code block allows YOURLS to be properly used with Nginx, but I don’t see
how this flows logically.:

    if (!-f $request_filename){
      set $rule_0 1$rule_0;
    }
    if (!-d $request_filename){
      set $rule_0 2$rule_0;
    }
    if ($rule_0 = "21"){
    rewrite ^/([0-9a-z]+)/?$ /yourls-go.php?id=$1 last;
    }

Posted at Nginx Forum:

On Thu, Dec 17, 2009 at 5:48 PM, nerdgrind [email protected] wrote:

                rewrite ^/([0-9a-z]+)/?$ /yourls-go.php?id=$1 last;
                }

also read try_files for such task

location ~ ^/([\da-z]+)/?$
{
try_files $uri $uri/ /yourls-go.php?id=$1;
}

References for others:

http://wiki.nginx.org/NginxHttpCoreModule#try_files

Posted at Nginx Forum:

On Thu, Dec 17, 2009 at 5:05 PM, nerdgrind [email protected] wrote:

       set $supercache_file ‘’;

[email protected]
nginx Info Page


O< ascii ribbon campaign - stop html mail - www.asciiribbon.org