Giter Site home page Giter Site logo

ngx_http_expr_module's Introduction

Name

ngx_http_expr_module - lazy computed complex variables.

Table of Contents

Status

This library is production ready.

Description

Module makes possible declare complex variables with lazy computation. This is may be used to choose access_log format dynamically.

Back to TOC

Synopsis

http {
    log_format  main  $format;

    access_log  logs/access.log  main;

    expr_max_hash_size 10240;

    server {
        listen 4444;

        location /test1 {
            expr $format '1111 $remote_addr - $remote_user [$time_local] "$request" $status $request_time $upstream_addr';
            return 200 test1;
        }

        location /test2 {
            expr $format '2222 $remote_addr - $remote_user [$time_local] "$request" $status $request_time $upstream_addr';
            return 200 test2;
        }

        location /test3 {
            expr $format '3333 $remote_addr - $remote_user [$time_local] "$request" $status $request_time $upstream_addr';
            echo_exec @inner1;
        }

        location @inner1 {
            echo_exec @inner2;
        }

        location @inner2 {
            return 200 $uri;
        }
    }
}

Back to TOC

Configuration directives

expr

  • syntax: expr $var <complex value>
  • context: location

Declare complex variable with lazy computation.

Directive is not support inheritance.

Back to TOC

expr_max_hash_size

  • syntax: expr $var <complex value>
  • default: 1024
  • minimum: 256
  • context: http,server,location

Maximum number of locations per variable.

Back to TOC

ngx_http_expr_module's People

Contributors

zigzagak avatar

Stargazers

Georgy Shelkovy avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.