How to deploy Django project with FastCGI

LiteSpeed Web Server can be used to host Django project via FastCGI, for basic information please read “How to use Django with FastCGI

You need to create a FastCGI application from LiteSpeed Web Server web administration console, you can have the FastCGI application started manually, or have it managed by LSWS.

  • If you want to start it manually, just create a remote FastCGI application by setting Start By Server to No, and the follow Django documentation.
  • If you want LSWS to manage the FCGI instances directly, you can try the following in the FastCGI external application configuration:
MaxConn: 20 (<50 is OK, flup support upto 50 connections by default)
Start By Server: Yes
Command: path_to_manage.py runfcgi **daemonize=false** (method could be threaded or prefork)
Intance: 1

Make sure you do NOT specify host, port or socket command line option in LSWS managed mode. LSWS will create those sockets.

  • Admin
  • Last modified: 2018/09/13 20:38
  • by Michael Alegre