Nginx http authentication using python

I am migrating from Apache2 to NGinX and I want to authenticate through a python script. The working configuration of Apache2:

WSGIScriptAlias /hg $SCRIPT_DIR/hgwebdir.wsgi WSGIPythonPath $SCRIPT_DIR <Location /hg> AuthType Basic AuthName "Mercurial" AuthBasicProvider wsgi WSGIAuthUserScript $SCRIPT_DIR/authentication.py Require valid-user </Location> 

What will be the equivalent configuration in nginx?

+5
source share

Source: https://habr.com/ru/post/1238192/


All Articles