JamPy deployment on Microsoft IIS

31 views
Skip to first unread message

Spyros

unread,
Jan 28, 2021, 3:08:10 PM1/28/21
to Jam.py Users Mailing List
Hi all, 

I finally managed to deploy jampy on a Windows Server 2019 running IIS. I choose to use the FastCGI handler instead of the HttpPlatformHandler.

Below are the steps I followed in case someone wants to do the same.

1) Install Web Server ISS on Windows Server 2019 

Note: When installing IIS and you reach the 'Select Server Roles' step select "Web Server (IIS)" and foloow the steps below:
      1. Click next 3 more times to reach the 'Role Services' page.
      2. Expand 'Web Server' > 'Application Development' and check the 'CGI' box. Click next. 
      3) On the 'Installation Progress' page, confirm that the installation of the Web Server (IIS) role and required role services completed successfully, and then click Close.


2) Install python on Windows Server

3) Install wfastcgi.py (IIS-Python bridge based on WSGI and FastCGI) and follow
the steps from the https://pypi.org/project/wfastcgi/ site to enable the library under IIS.

4) Start the IIS Manager and expand the server and add your site's name, the path to your project and the IP or host name of your site. 

In the folder where your project is create a web.config file and set the parameters accordinigly (see the sample exist in the wfastcgi site from step 3 for details). I also attached a copy of my web.config file for reference.

5) Go back to IIS Manager and press the browse to your website link, if you get permission errors you will need to allow the permissions from your site's Configuration Editor. I remember I had to do some changes here but I can't recall them now, I will look at it again when I repeat the deployment. 

6) Lastly if you had resolved the permissions issues at the IIS Manager and attempt to load your site you miggt encounter the below error:
        OperationalError: attempt to write a readonly database 

To resolve this issue go and set full rights to the folder of your project to the user you are logged on the MS server with. 

After this your project should be running on the IIS. 

I will rerun the whole install in the next couple of days so if I missed any steps/tips I will let you know. 

Regards
Spyros
Screenshot 2021-01-28 230521.png
web.config

Drazen D. Babic

unread,
Jan 29, 2021, 3:11:49 AM1/29/21
to Jam.py Users Mailing List
Thanks man.

Hope this will help to someone.

Cheers
D.
Reply all
Reply to author
Forward
0 new messages