Why am I getting "FastCGI process has failed frequently" while deploying a Django application on Windows Server 2012 using IIS
Asked Answered
A

1

8

enter image description hereI am trying to deploy Django application on Windows 2012 server using IIS. my web.config file :

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
    <system.webServer>
        <handlers>
           
            <add name="Django Handler" path="*" verb="*" modules="FastCgiModule" scriptProcessor="C:\Users\chinmay_arima\env_resolution\Scripts\python.exe|C:\Users\chinmay_arima\env_resolution\Lib\site-packages\wfastcgi.py" resourceType="Unspecified" requireAccess="Script" />
      
    </handlers>
    </system.webServer>
</configuration>

Getting "HTTP Error 500 - Internal server error".

Please find the attachment to see the error.

  • Django version: 2
  • IIS version: 8.5

I am following the below to link: http://blog.mattwoodward.com/2016/07/running-django-application-on-windows.html

Arteriovenous answered 27/9, 2018 at 9:19 Comment(0)
P
0

I think this error is caused by the misplacement of your web.config file. Also, there appear to be missing some parameters under appSettings

Your config file should look like https://github.com/Johnnyboycurtis/webproject/blob/master/web-config-template

<?xml version="1.0" encoding="utf-8"?>
<configuration>
<system.webServer>
    <handlers>
    <add name="Python FastCGI" 
    path="*" 
    verb="*" 
    modules="FastCgiModule" 
    scriptProcessor="<to be filled in>" 
    resourceType="Unspecified" 
    requireAccess="Script" />
    </handlers>
</system.webServer>

<appSettings>
    <add key="PYTHONPATH" value="C:\inetpub\wwwroot\webproject" />
    <add key="WSGI_HANDLER" value="webproject.wsgi.application" />
    <add key="DJANGO_SETTINGS_MODULE" value="webproject.settings" />
</appSettings>
</configuration>

Here is the tutorial to follow along with that code project Deploy Django on Windows using Microsoft IIS

Practise answered 22/5, 2020 at 21:20 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.