I have notes on running web2py with IIS because nothing out there, including in recipes works. Specifically these notes are for 64 bit rather than 32 bit and using isapi_wsgi rather than fastcgi. (ISAPI is faster). Here they are pretty much verbatim. It looks messy but is actually very simple, I have too many explanatory notes.
Install Python 2.7 - download 2.x from https://www.python.org does not work with 3.x - python-2.7.8.amd64.msi (install for all users, add python.exe to path) Install pywin32(required for isapi_wsgi) - download 64 bit from https://sourceforge.net/projects/pywin32/ - pywin32-219.win-amd64-py2.7.exe Install isapi_wsgi - download source distribution (isapi_wsgi-0.4.2.zip) from https://code.google.com/p/isapi-wsgi/ - Extract isapi_wsgi to temp folder - cd isapi_wsgi-0.4.2.2 - python setup.py install Install Web2Py - Download web2py src and extract to c: to get C:\web2py - run python web2py.py, enter pasword, and start service on port 80 at least once to generate paramters_80.py with the admin password. Configure isapi_wsgi and IIS for Web2Py - Create isapi_MYAPP.py in c:\web2py (where MY is the virtual application name in IIS) in C:\web2py to create website when run from command line and to launch service when running from IIS. This is based on file from https://code.google.com/p/isapi-wsgi/wiki/IntegrationWithDjango Change MYAPP to / on the following line in the isapi_MYAPP.py file to host from root rather the virtual app MYAPP on default web site: vd = VirtualDirParameters(Name="MYAPP", to vd = VirtualDirParameters(Name="/", import os, sys path = os.path.dirname(os.path.abspath(__file__)) os.chdir(path) sys.path = [path]+[p for p in sys.path if not p==path] import gluon.main application=gluon.main.wsgibase import isapi_wsgi # The entry points for the ISAPI extension. def __ExtensionFactory__(): return isapi_wsgi.ISAPISimpleHandler(application) if __name__=='__main__': # If run from the command-line, install ourselves. # python isapi_web2py.py install --server=Sitename from isapi.install import * params = ISAPIParameters() # Setup the virtual directories - this is a list of directories our # extension uses - in this case only 1. # Each extension has a "script map" - this is the mapping of ISAPI # extensions. sm = [ ScriptMapParams(Extension="*", Flags=0) ] vd = VirtualDirParameters(Name="MYAPP", Description = "Web2Py in Python.", ScriptMaps = sm, ScriptMapUpdate = "replace" ) params.VirtualDirs = [vd] HandleCommandLine(params) - Execute python isapi_MYAPP.py install [--server=Sitename] to setup the isapi_wsgi handler in IIS - To ever remove, execute python isapi_MYAPP.py remove to remove the handler and application from IIS - For IIS application MYAPP hosted from default website create routes.py in C:\web2py so site can be accessed via IIS application MYAPP http://localhost/MYAPP/ but for hosting from root skip routes.py routers = dict( BASE=dict( path_prefix='MYAPP', ), ) On Sunday, September 7, 2014 8:31:31 AM UTC+10, Tim Richardson wrote: > > Simonne, I wish to learn about IIS & fastcgi since I use web2py on windows > servers a bit. If you put some notes and the steps, I will write it up to a > draft guide. > > On Saturday, 6 September 2014 00:57:46 UTC+10, Niphlod wrote: >> >> we should NOT use this script because: >> - uses apache >> - uses an old version of apache >> - installs python with a fixed version in a fixed path >> - installs a configuration file that is fixed and does not depict the >> same configurations we have in linux scripts >> >> IMHO it's time to do a guide on how to use web2py with IIS and fastcgi >> (to substitute the old one we have in the book that is scary as hell), that >> from WS2008R2 onwards is pretty easy. >> Having a script on windows that installs also all requirements (and up to >> date) is not easy because linux has package managers by default while >> Windows doesn't. >> As most of the things, they're in the backlog of my brain and they'll >> come out as soon as I get some free time. >> >> On Friday, September 5, 2014 8:01:45 AM UTC+2, Massimo Di Pierro wrote: >>> >>> Is your point that we should not use these script or that we should not >>> provide scripts for windows at all? >>> In the first case, what would you change? In the second case, why not? >>> >>> >>> >>> On Wednesday, 3 September 2014 10:11:29 UTC-5, Niphlod wrote: >>>> >>>> hell no. I don't want 7-zip installed by web2py. and an old FIXED build >>>> of apache. And a FIXED version of python. Without checks. >>>> And Apache. On Windows. >>>> No, No, No, No to the "setup scripts for windows" archive. >>>> The configuration is fixed, old, and a poor duplicate of the ones we >>>> still have in automated scripts. >>>> >>>> On Wednesday, September 3, 2014 3:29:04 PM UTC+2, Massimo Di Pierro >>>> wrote: >>>>> >>>>> Yes. I will add them. Thank you! >>>>> >>>>> On Tuesday, 2 September 2014 19:28:58 UTC-5, 黄祥 wrote: >>>>>> >>>>>> dear all, >>>>>> >>>>>> just want to share web2py setup scripts for windows (tested on >>>>>> windows 7 ultimate 64 bit). >>>>>> hopefully it can be added on web2py/scripts in the future release. >>>>>> >>>>>> thanks and best regards, >>>>>> stifan >>>>>> >>>>> -- 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.