Does anybody here know how port these links to Nginx?

<VirtualHost *:80>

   ScriptAlias /bin/ "/whatever/cgi-bin/"

   <Directory "/whatever/cgi-bin">

     WSGIAccessScript  /whatever/access.wsgi



They basically say that some URLs /whatever/cgi-bin point to legacy cgi-bin 
scripts but before executing the scripts it should pass the environment 
vars and the header info to the access.wsgi python script to ask for access 
permission. This allows me to have a web2py app that links the legacy 
scripts and because on the same domain, the client passes the session 
cookie, the access.wsgi code retrieves the session cookie and check 

The script looks like this:

def allow_access(environ,host):

     # get credentials from environ, ask web2py is user is authorized and 
return true/false

I am happy to rewrite the script but the question is whether nginx provides 
an equivalent mechanism. I cannot find one.


- (Documentation)
- (Source code)
- (Report Issues)
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
For more options, visit

Reply via email to