Could you put this in the book? Thanks Tim.

On Sunday, 13 December 2015 23:21:47 UTC-6, Tim Richardson wrote:
>
> Ok. Some tips to a future me if I have to do this again.
>
> wfastcgi is now a module. So currently the deployment instructions in the 
> web2py book give a download link. It's not necessary any longer. But some 
> paths have changed, and the configuration process is more automated.
>  
> https://pypi.python.org/pypi/wfastcgi
>
> 1) install it with pip
>
> 2) as administrator command prompt, run the executable 
> PYTHON_ROOT/Scripts/wfastcgi-enable.exe 
> This will update your IIS config. It seems to change the FastCGI setting 
> at the server level of the config
>
> It also sends some output to standard output, as described in the readme 
> at the pypi page above.
>
> If you follow the deployment instructions in the web2py book, you will 
> have a web.config file at the root of your web2py folder. 
>
> To finish updating the IIS configuration, you could copy the settings from 
> https://pypi.python.org/pypi/wfastcgi into the web.config page. 
> This meant, for me, adding a section like this:
>
> <system.webServer>
>  <handlers>
>            <add name="Python FastCGI"
>            path="*"
>            verb="*"
>            modules="FastCgiModule"
>            scriptProcessor=
> "e:\python27_32\python2.7.exe|e:\python27_32\lib\site-packages\wfastcgi.pyc"
>            resourceType="Unspecified"
>            requireAccess="Script" />
>     </handlers>
>
>     I didn't have the handlers section in the existing file. The 
> scriptProcessor value involves a pipe. You can copy that value from the 
> output of step (2). 
> When IIS starts, it will read from the file and update its configuration. 
> But it can only do that if you change Feature Delegation -> Handler 
> Mappings to Read/Write. It defaults to Read, which means the server gives 
> errors at start up which look like this: "The requested page cannot be 
> accessed because the related configuration data for the page is invalid"
>
> Get that sorted, and IIS will copy into its configuration the correct 
> setting. You can observe by going to the site setting for your web2py app 
> in IIS configuration, and views Handler Mappings. There you will see a 
> handler Python FastCGI configured according to the path above. You could 
> bypass the text file and set this up in IIS settings directly, per screen 
> shot. If you have existing IIS setup, you could probably just change the 
> path. I didn't know what I was doing so I didn't take this shortcut. 
>
>
> <https://lh3.googleusercontent.com/-7PZ4-yiLVV8/Vm5Rsl39aDI/AAAAAAAABTc/5V5NJ4bZx0E/s1600/Screen%2BShot%2B2015-12-14%2Bat%2B4.19.19%2BPM.png>
>
>
>
>
>
>
>  
>

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