Search code examples
fastcgiwindows-server-2012-r2iis-8.5django-1.9

Installing Django 1.9 on IIS8


Does anyone know a guide on how to configure a Django project (django 1.9) to IIS 8.5 on a Windows server 2012R2?

I previously had projects working on IIS 8.5 using django 1.8, but we decided to move on to 1.9 and now all I get are HTTP Error 500.0 Internal Server Error.

The tutorial I followed for django 1.8 is here with the following variables for FastCGI:

  • Name: DJANGO_SETTINGS_MODULE Value: FooBar.settings
  • Name: PYTHONPATH Value: C:\inetpub\wwwroot\Django\FooBar
  • Name: WSGI_Handler Value: django.core.wsgi.get_wsgi_application()

Error

I also followed this tutorial and I get a similar error.

Is there an alternative to FastCGI? Is FastCGI obsolete for django 1.9? What else can I try?

Thanks in advance.


Solution

  • I was able to get IIS work with Django 1.9 by not doing a virtualenv.

    The video tutorial I posted seems to only work if you do not use a virtualenv.

    I tried different methods of making fastCGI work with a virtualenv, but it looks like the python linked to virtualenv is the same one where fastcgi was installed.