Write documentation to serve OpenREM with Windows IIS

Issue #592 resolved
Luuk created an issue

Finally took some time to try using IIS for serving OpenREM and succeeded based on this article: http://blog.mattwoodward.com/2016/07/running-django-application-on-windows.html

Need to write specific instructions for OpenREM.

Comments (48)

  1. Luuk reporter

    Is the parameter "STATICFILES_DIRS" in settings.py correct, @edmcdonagh? It states:


    "python manage.py collectstatic" will give: WindowsError: [Error 3] The system cannot find the path specified: u'C:\Program Files\Python27\Lib\site-packages\openrem\static\.'


    Seems to be correct

  2. Luuk reporter

    Great and sorry, it seems I used a quit old settings file for testing this. I'll write the documentation while performing this on the latest source code.

  3. David Platten

    I am using Apache 2.4.23 (x86 version) compiled using VC9 that I downloaded from ApacheHaus (www.apachehaus.com). However, on 5th Jan 2018 they removed the VC9 binaries from their site.

    I still have the zipped file for 2.4.23 (httpd-2.4.23-x86-r3 VC9.zip) if anyone wants it.

    However, perhaps it's time to move to another web server? I've only ever used Apache.

  4. David Platten

    The maintainer of the site doesn't have time for the old VC9 versions. From the ApacheHaus website:

    Bye bye VC9 Written by TrustyHausBot
    Fri, 05 Jan 2018 20:27:58 GMT Well the download page has been warning everyone that support for VC9 was ending on 31-12-2017 for most of 2017 and today I finally removed the VC9 files from it. I really wanted to do this 2 years ago because my spare time became very limited but I felt I needed to give everyone using vc9 builds long enough to decide what they needed to do which I feel I did.

    Some of that lost spare time is finally coming back but I want to do other things with it than support VC9 any longer.

    So bye bye VC9.


  5. Ed McDonagh

    Hi @LuukO. David and I discussed this briefly today. I am of the opinion that we should have IIS as the default webserver for Windows users in the docs, with some parts of the existing Apache docs remaining for anyone who already has an Apache setup.

  6. Luuk reporter

    Hi @edmcdonagh, @dplatten, I agree as it is virtually impossible to get (security) updates for Apache (in combination with Python 2.7). The only way would be to compile it yourself with VC9. I also started with Apache, but it didn't work out for obvious reasons (I understand now). And actually implementing IIS is not too bad, you have to perform some more steps compared to Apache, but it isn't hard (and it works... :-)). Maybe David can try it out and improve my documentation. I think you can run it in parallel as long as you don't use the same port number.

  7. David Platten

    Updated the IIS installation documentation having just used them to install and configure IIS on Windows Server 2012. I needed to change the Identity setting in the Application Pool options from ApplicationPoolIdentiy to LocalSystem to prevent permission errors when trying to browse to the site. I also had to do this when installing on Windows 10. References issue #592

    → <<cset 2a009867497a>>

  8. David Platten

    I should also have said that the instructions work really well - thanks @LuukO for writing them.

    I've left IIS as the web server on my live system for the time being to see how I get on with it. My initial thoughts are that OpenREM is faster than when serving with Apache.

  9. David Platten

    A few simple timings of Apache 2.4 vs IIS 8.5, both on the same Windows Server 2012 system. OpenREM version 0.7.4. Timings from the Chrome browser "Network" developer tool

    Page Apache (s) IIS (s)
    Home page 9.98 (10.08, 9.66, 10.20) 8.97 (8.98, 8.93, 9.00)
    Fluoro page 1.10 (1.08, 1.05, 1.17) 0.92 (0.90, 0.89, 0.97)
    623-event fluoro study 17.80 (18.45, 17.29, 17.65) 17.29 (17.29, 16.99, 17.60)
  10. Ed McDonagh

    That's worth having. On the testing server, Gunicorn was timing out first. Once I added a 5 minute timeout to Gunicorn, nginx timed out first. I've yet to see the nginx timeout.

  11. Ed McDonagh

    Gunicorn and nginx are both now set to one hour timeouts, and the study you referenced is calculated fine and displays without error. (I deleted the calculation file between each test!)

    What do you think would be a reasonable timeout that I should put in the doc? Bearing in mind we don't know if they are on a multi-purposed Raspberry Pi or a multi-core monster. Or how big their fluoro studies are! I guess if it is long and something goes wrong it ties up the server thread and doesn't return to the user?

  12. David Platten
    • changed status to open

    My IIS-served Windows 10 OpenREM fails now (following a reboot). I think that the access granted to IIS_IUSRS is too limited: it needs to be able to access other folders.

    Granting permission on my whole python virtual env works. Perhaps this should be what is in the documents?

  13. Luuk reporter

    For me it works fine without (on Windows server 2012), but put it in as it otherwise won't work for Windows 10 (at least).

  14. Log in to comment