if set variable unfamiliar language

nerdgrind nginx-forum at nginx.us
Thu Dec 17 13:05:17 MSK 2009


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: http://forum.nginx.org/read.php?2,31203,31203#msg-31203




More information about the nginx mailing list