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

   </Directory>

</VirtualHost>


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 
permissions.


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.


Massimo

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (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 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to