uhm.. things are far more easier since python for visual studio 
<https://pytools.codeplex.com/releases> came in this year with wfastcgi.py 
.... and it requires IIS 7.

assuming:
- python is on c:\python27\python.exe and you downloaded wfastcgi that 
installs itself on c:\python27\scripts
- your root is c:\inetpub\wwwroot

You download web2py and put it on wwwroot. You install the wfastcgi.py 
script.

You create a fastcgi app with fastcgi settings --> add application :
   -  full path c:\python27\python.exe 
   - arguments c:\python27\scripts\wfastcgi.py
   - environmental variables
        - PYTHONPATH --> C:\inetpub\wwwroot
        - WSGI_HANDLER --> gluon.main.wsgibase
You create a handler with handler mappings --> add module mapping :
   - request path * 
   - module fastcgimodule
   - executable c:\Python27\python.exe|C:\Python27\Scripts\wfastcgi.py 

Alternatively, you can run the following script in a shell

%windir%\system32\inetsrv\appcmd set config 
/section:system.webServer/fastCGI "/+[fullPath='c:\Python27\python.exe', 
arguments='C:\Python27\Scripts\wfastcgi.py']"

%windir%\system32\inetsrv\appcmd.exe set config 
-section:system.webServer/fastCgi /+"[fullPath='C:\Python27\python.exe', 
arguments='C:\Python27\Scripts\wfastcgi.py'].environmentVariables.[name='PYTHONPATH',value='C:\inetpub\wwwroot']"
 
/commit:apphost

%windir%\system32\inetsrv\appcmd.exe set config 
-section:system.webServer/fastCgi /+"[fullPath='C:\Python27\python.exe', 
arguments='C:\Python27\Scripts\wfastcgi.py'].environmentVariables.[name='WSGI_HANDLER',value='gluon.main.wsgibase']"
 
/commit:apphost

%windir%\system32\inetsrv\appcmd set config 
/section:system.webServer/handlers 
"/+[name='Python_via_FastCGI',path='*',verb='*',modules='FastCgiModule',scriptProcessor='c:\Python27\python.exe|C:\Python27\Scripts\wfastcgi.py',resourceType='Unspecified']"

To be fair, this works fine. Has still two "issues" : serves static with 
the fastcgi handler and requires web2py into the root (that is the 
"standard web2py setup"). Adding a routes.py with path_prefix and changing 
relative folders make it work into a subfolder.

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