pythondjangowindowsapachewaitress

Deploying django(windows) with apache(on unix)


I know it might be a bad design but since we are developing the django website on our laptops which runs Win7, I thought it would be better to run django on a Windows platform only in production.

(Laptop is not powerful enough to run a Unix VM inside and our Unix team doesn't provide any Unix server with UI access (Only Putty) so using an IDE is impossible on Unix.)

I have deployed django with gunicorn and nginx on a Linux server very easily, but this time I have to deploy django on a Windows server with Apache on another Unix server (I know it sucks).

Our middleware team is asking(forcing) to run django components on a separate server so that they can manage their Apache (on Unix) instance comfortably. As far as I understand, Apache and django should reside on the same server for mod_wsgi to work.

Is this possible to keep Apache on a Unix machine and make a django website run from a Windows machine?

If not, what are the best possible solutions in my case? (Switch django on Unix? Use waitress on Django windows? Do not separate Apache and Django? etc.)

Regards, Aditya


Solution

  • Try deploying on IIS instead, as it is the native Web Server on Windows Servers.

    Checkout the django-windowsauth package, you can use it to deploy your project to IIS using few simple commands. https://github.com/danyi1212/django-windowsauth.