Deploying Nginx + Cherrypy + Flask in Windows platform

Soumendra's Blog
1 min readFeb 2, 2018

It’s hard to get an one stop article which contains all the information to implement these in Windows.

Nginx is used as a load balancer, with its reverse proxy server.

Design diagram of the set up

Nginx config

The upstream servers where the incoming requests will be redirected need to be mentioned like below:

upstream backend {server <IP1>:<port1>;server <IP2>:<port2>;server <IP3>:<port3>;}

You can add as many servers as you like depending on the load. It’s recommended the upstream servers need to be in separate machines. However same IP also can be mentioned.

Configuring HTTPS changes

Nginx server can be SSL supported. This is a sample code.

You can follow this link to run Nginx as a service in windows.

Here the app from Flask is used to route the API URLs we get as HTTP requests. As Flask server is highly recommended to not use in production server, Cherrypy is doing the purpose here.

--

--

Soumendra's Blog

Senior development engineer at IBM India. Aspiring Solution Architect. Views are personal and not represent my organization.