hosting hg with PyISAPIe on IIS7(python ISAPI extension)
Sune Foldager
cryo at cyanite.org
Mon Apr 12 09:03:09 UTC 2010
On 12-04-2010 06:03, ruby wrote:
> hosting hg with PyISAPIe on IIS7(python ISAPI extension)
> someone knows how to host hg with PyISAPIe on IIS7 (python ISAPI extension)?
As Matt Hawley also replied, I would recomend using isapi-wsgi and
following the guide he links to. This method is relatively easy to
follow[1] and has proven to work and scale in production environments.
> I initially tried isapi-wsgi, but I didn’t have much luck setting it up
> (I gave up fairly quickly though).
> It also depended on “Mark Hammond’s Python win32 isapi extension”
> – and I was trying to keep the amount of packages installed and added
> to a minimum. I therefore chose to use PyISAPIe which has no dependencies,
> and only requires a DLL and a folder containing a few .py files.
Well, pywin32 (which contain the isapi feature you describe above) is
pretty much a "must have" if you use python on Windows anyway, and
Mercurial uses it as well, so it's a very reasonable dependency.
/Sune
[1] Although if you plan on using SSL, there is a small bug in
isapi-wsgi which you'll need to manually fix for now. Below is the
relevant snip from a mail I sent to Matt Hawley:
> In the file isapi_wsgi.py (in c:\python26\lib\site-packages), in the
> function add_cgi_vars, around line 394 (in my version):
>
> required_cgienv_vars = ['REQUEST_METHOD', 'SCRIPT_NAME',
> 'PATH_INFO', 'QUERY_STRING',
> 'CONTENT_TYPE', 'CONTENT_LENGTH',
> 'SERVER_NAME', 'SERVER_PORT',
> 'SERVER_PROTOCOL', 'REMOTE_ADDR'
> ]
>
> If it looks like that, it's buggy. You need to add 'HTTPS' to that list
> in order to make it work :-).
More information about the Mercurial
mailing list