Giter Site home page Giter Site logo

ngx_http_auth_file_module's Introduction

ngx_http_auth_file_module

Build Status

It aims to provide the power of authenticate for nginx. For example, it can work together with these module such as ngx_http_barcode、 ngx_http_qrcode_module、any http module which work on nginx content phase and so on. By the way, it can change auth file on the fly without reload nginx.

Example:

http {
    ...

    server {
        server_name www1.example.com;
        auth_file auth/www1.example.com;
    }
}

#www1.example.com
3iVrBX/Sg6II6yC1nQR/QQSaums6xRU31etxyv+ESUs=
EGDi98j1e3CwlXOz1NuHXSLA8Xq3Vo55mzeoFFOWr+o=
0xE+6IKEMaUUpyeCbd0hHt3IPYY7W1bckG8E6LtdObQ=

we can access the server www1.example.com by

curl -H "Authorization:  0xE+6IKEMaUUpyeCbd0hHt3IPYY7W1bckG8E6LtdObQ=" http://www1.example.com 

If you want to change the auth file, just do the op as the following:

>openssl rand -base64 32
pNGJQfDjyAgbqmMeydhsgNZ8lEkW88RfDWTtJXMmHrU
#when adding the password to auth/www1.example.com then send reopen signal to nginx

>/opt/nginx/sbin/nginx -s reopen

Table of Contents

#Direction

Syntax: auth_file file
Default: -
Context: http, server, location

Example:

http {
    auth_file auth/global;
    ...

    server {
        server_name www1.example.com;
        auth_file auth/www1.example.com;
    }
}

Contributing

To contribute to ngx_http_auth_file_module, clone this repo locally and commit your code on a separate branch.

Author

GitHub @detailyang

License

ngx_http_auth_file_module is licensed under the MIT license.

ngx_http_auth_file_module's People

Contributors

detailyang avatar

Stargazers

Georgy Shelkovy avatar

Watchers

James Cloos avatar Georgy Shelkovy 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.