0

I have purchased one windows VPS and I have installed Python using RD. I have configured IIS and fast CGI and I have tried to run the python application using IIS server but it's showing the bellow error,

HTTP Error 500.0 - Internal Server Error

<handler> scriptProcessor could not be found in <fastCGI> application configuration

My web.config file looks like below ,

<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <system.webServer>
    <handlers>
     <add name="PythonHandler" path="*" verb="*" modules="FastCgiModule"
        scriptProcessor="C:\Users\Administrator\AppData\Local\Programs\Python\Python310\python.exe|C:\Users\Administrator\AppData\Local\Programs\Python\Python310\Lib\site-packages\wfastcgi.py"
        resourceType="Unspecified" requireAccess="Script"/>
    </handlers>
  </system.webServer>

 <appSettings>
  <add key="PYTHONPATH" value="C:\LMX"/>
  <!-- The handler here is specific to Bottle; see the next section. -->
  <add key="WSGI_HANDLER" value="app.wsgi_app()"/>
  <add key="WSGI_LOG" value="C:\LMX\wfastcgi.log"/>
</appSettings>

</configuration>

Could you please solve the issue

Vinoth Kumar
  • 489
  • 3
  • 17
  • 45
  • A FastCGI application must be configured at server level following steps like [this](https://learn.microsoft.com/en-us/iis/configuration/system.webserver/fastcgi/application/#how-to-create-a-fastcgi-application-for-php). Since you are configuring Python CGI, use the search engine to learn what are the exact steps you missed. – Lex Li Jan 03 '22 at 15:57
  • Please refer to this docs to get complete steps about configuring python on IIS. Another things is it's better put python scriptProcessor in other folders not under C:\Users\Administrator, IIS and application pool may don't have permission to read or write this folder if you don't run IIS as administrator and give app pool permission. – Bruce Zhang Jan 04 '22 at 02:53
  • I have followed this already but got HTTP Error 401.3 - Unauthorized, You do not have permission to view this directory or page because of the access control list (ACL) configuration or encryption settings for this resource on the Web server. And tried this https://stackoverflow.com/questions/5900616/http-error-401-3-unauthorized but still showing HTTP Error 401.3. For that manually updated webconfig then showing HTTP Error 500.0 - Internal Server Error – Vinoth Kumar Jan 04 '22 at 04:36

0 Answers0