Write documentation to serve OpenREM with Windows IIS
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)
-
reporter -
Is that not what we have already?
-
Looks like I changed it in April https://bitbucket.org/openrem/openrem/commits/1ea5a7aee61e6bd0ffb28fd05d90428257d2cca2
-
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.
-
reporter Refs
#592Insert instructions using IIS webserver for OpenREM→ <<cset 6baed4d836db>>
-
Thanks for doing this @luuko - I've set readthedocs to build them at http://docs.openrem.org/en/issue592documentiisaswebserver/ (specifically here)
-
reporter I wonder if we need to place a warning on the Apache for Windows page as it needs all components (Python, Apache and mod_wsgi) to be compiled with the same Microsoft C/C++ compiler (see https://github.com/GrahamDumpleton/mod_wsgi/blob/develop/win32/README.rst). As Python 2.7 is compiled with VC9, all others should also. It is hard (impossible?) to find a recent Apache version compiled with VC9 (Visual Studio 2008).
-
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.
-
Is it because they are dropping interest in Python 2.7? Do they continue hosting for Python 3?
-
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.
Link
-
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.
-
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.
-
Promoting the web server stub further up the hierarchy. Refs
#592→ <<cset dfd124e2abd1>>
-
Starting to reword webservers intro. Styled first section of IIS instructions with back ticks. Refs
#592→ <<cset b7f46b7d2b3b>>
-
Replaced all the other double quotes (nearly) - committing to see how it looks. Refs
#592→ <<cset 32e27e08ac04>>
-
Changing the installation page introducing the web servers. WIP. Refs
#592→ <<cset 807915cef4d0>>
-
Removed double backslashes. Refs
#592→ <<cset 6bdc627f9599>>
-
Minor mistakes, refs
#592→ <<cset 6390f8999e3f>>
-
Minor formatting changes. Refs
#592→ <<cset ea23c8e8ae47>>
-
Added screenshot for Windows 10 configuration of IIS. References issue
#592→ <<cset a48fcb47f1f4>>
-
Updating instructions based on attempt to get it working with @dplatten. Refs
#592→ <<cset 14f51fc74602>>
-
Correcting the third time back tick for the third time! Refs
#592→ <<cset 0f72768e4f55>>
-
Added screenshots for changing pool setting in Windows 10 configuration of IIS. References issue
#592→ <<cset 316b9f7efb05>>
-
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>>
-
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.
-
Updated the IIS installation documentation to increase Activity Timeout to 300 s. References issue
#592and fixes issue#597→ <<cset bb66f981094d>>
-
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) -
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.
-
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?
-
Removing the old webserver text. Refs
#596,#592→ <<cset c68861fbc421>>
-
Set nginx timeout to match gunicorn timeout, also IIS timeout in docs (5 minutes). Refs
#592,#596,#597→ <<cset 05e06d63d822>>
-
Made change regarding ref
#597more generic as it was needed for Gunicorn/nginx too (refs#592,#596)→ <<cset 47b889d3bda6>>
-
Removed the application pool section of the doc - not needed now. References issue
#592→ <<cset c6181e37db2c>>
-
Added ref
#592to changes→ <<cset 9d38fe4d393e>>
-
- changed status to resolved
Merged in Issue592DocumentIISAsWebserver (pull request #159)
Fixes
#592Thanks @LuukO and @dplatten for doing all the work on this.
→ <<cset e65509f67cad>>
-
Updated system diagram in the documents to reflect new recommendations on web servers. Also amended database text. References issue
#448, issue#592and issue#596→ <<cset 33b5ea83d5ae>>
-
Removed link to installing Apache - this is referred to in the web server link anyway. References issue
#448, issue#592and issue#596→ <<cset 69357c5ea463>>
-
Merged in issue448UpdateSystemDiagram (pull request #171)
Issue448UpdateSystemDiagram
Approved-by: Ed McDonagh ed@mcdonagh.org.uk
→ <<cset f828c783af9e>>
-
- 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?
-
reporter I'll restart my server at the end of the working day and let you know what happens.
-
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).
-
Updated IIS documentation so that it will work for my Windows 10 install as well as the Windows Server 2012 installs. References issue
#592→ <<cset b424f676ce6e>>
-
- changed milestone to 0.8.0
-
I've built the docs with the changes from b424f676ce6e.
Is this ready to merge and mark as fixed @dplatten, @LuukO?
-
reporter I think it is fine.
-
References issue
#592Merged in issue592documentIIS (pull request #175)
Updated IIS documentation so that it will work for my Windows 10 install as well as the Windows Server 2012 installs. References issue
#592→ <<cset 669dffa94291>>
-
References issue
#592Merged in issue592documentIIS (pull request #175)
Updated IIS documentation so that it will work for my Windows 10 install as well as the Windows Server 2012 installs. References issue
#592→ <<cset 669dffa94291>>
-
- changed status to resolved
Resolved by pull request #175
- Log in to comment
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