Nginx – Run Django as Windows Service

djangonginxwindows-services

I run Django on Windows Server 2k3 under Nginx using FastCGI.

Nginx is is running as Windows service and is easy to manage and autostart.
Nginx is running using WINSW tool.

I want to make the same for Django app and need to find a way to do it.

Django should be started as separate FCGI application using this command:

python manage.py runfcgi method=threaded host=127.0.0.1 port=8800

or

manage.py runfcgi method=threaded host=127.0.0.1 port=8800 

(if .py is associated with python)

I'm looking for a way to start/stop FCGI Django as windows service, to be able to autostart it when windows loads, and to have an easy way to start/stop/restart Django FCGI application.

Best Answer

This question may provide you with answers: Creating a python win32 service

Related Topic