GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - rigid/nginx-encrypted-session-auth: example config for nginx-only auth, using a HTTP POST form

BranchesTags
Open more actions menu

Latest commit

 

History

7 Commits
7 Commits

Folders and files

NameName
Last commit message
Last commit date
conf
conf
 
 
htdocs
htdocs
 
 
README.md
README.md
 
 
passwd
passwd
 
 

Repository files navigation

nginx encrypted session auth

This is an example for nginx authentication using a HTTP POST login form without CGI. It covers login/logout/failed login and per-user directories.

Prerequisites:

  • nginx
  • nginx modules:
  • https://github.com/openresty/set-misc-nginx-module
  • https://github.com/openresty/encrypted-session-nginx-module
  • https://github.com/calio/form-input-nginx-module (which are currently not included with nginx)

How it works:

  • auth_request is used to authenticate against another server (which uses auth_basic in itself for the demo)
  • The necessary headers are set for the auth_request (username, password) and taken from an encrypted cookie.
  • The cookie is created in the target of a POST login form
    • if the cookie isn't present, login.html is shown
    • if the cookie is already present (but authentication failed), login-failure.html is shown
    • if the cookie is present and authentication suceeds, the users index.html is shown

About

example config for nginx-only auth, using a HTTP POST form

Resources

Readme
Activity

Stars

3 stars

Watchers

2 watching

Forks

1 fork
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.