Production deployment Django WSGI application on nginx and gunicorn

Following my previous post on nginx installation process, I will now describe the process of deploying a Django WSGI application on nginx. Tero Karvinen has a great guide on his website on deploying Django using Apache 2 webserver and mod_wsgi, which I have adapted to use for nginx. Install virtual environment The first step is to create a new virtual environment inside your directory. In this example, I will store my Django projects in the /home/evgeni/publicwsgi directory, and activate the virtual environment using the following commands:...

June 6, 2023 · 5 min

Setting up nginx web server on a fresh Debian 11 VM

For nearly my entire career, I’ve been using the Apache2 web server as my main solution for web hosting. For many years, Apache2 was the number 1 web server and the obvious choice. However, the competitor nginx has been on the rise and a few years ago, took the #1 spot away from Apache. I am now working on a new web project and decided to give nginx a try. I run my setup on a newly installed Debian 11 virtual machine that I acquired from Digital Ocean....

June 1, 2023 · 3 min