Coder Social home page Coder Social logo

nginx-token's Introduction

Introduction

nginx-token is a token module for nginx based on memcache.


Install

$ git clone git://github.com/roast/nginx-token.git
$ wget 'http://sysoev.ru/nginx/nginx-0.7.65.tar.gz'
$ tar -xzvf nginx-0.7.65.tar.gz
$ cd nginx-0.0.7.65/
$ ./configure --add-module=/absolute/path/to/the/nginx-token/
$ make
$ make install


Directives

*token*
syntax: token[ on|off ]
default: token off
context: http, server, location
Enables or disables the token module.

*token_server*
syntax: token_server [ name:port ]
default: none
context: http, server, location
The backend of memcached which store the token data. 

*token_len*
syntax: token_len [ size ]
default: see getpagesize(2)
context: http, server, location
The token key's length.

*token_key*
syntax: token_key [ line ]
default: key
context: http, server, location
The token key name from the request, just like $_GET['key'].


Sample Config

server 
{
    listen       80;
 
    root   /var/www;
 
    location / 
    {
        token            on;
        token_server     127.0.0.1:11211;
	token_len        12;
        token_key	 token;
        index index.html index.htm index.php;
        error_page       404 = /real;
    }
 
    location /real 
    {
        proxy_pass http://backend;
    }
}

nginx-token's People

Contributors

roast avatar

Watchers

 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.