Процесс FastCGI неожиданно завершился при развертывании проекта Django на сервере iis windows server

FAST CGI НЕ РАБОТАЕТ ДОЛЖНЫМ ОБРАЗОМ ПРИ РАЗВЕРТЫВАНИИ DJANGO НА WINDOWS-СЕРВЕРЕ IIS


HTTP Error 500.0 - Internal Server Error

C:\Users\satish.pal\AppData\Local\Programs\Python\Python310\python.exe - The FastCGI process exited unexpectedly



Most likely causes:
•IIS received the request; however, an internal error occurred during the processing of the request. The root cause of this error depends on which module handles the request and what was happening in the worker process when this error occurred.
•IIS was not able to access the web.config file for the Web site or application. This can occur if the NTFS permissions are set incorrectly.
•IIS was not able to process configuration for the Web site or application.
•The authenticated user does not have permission to use this DLL.
•The request is mapped to a managed handler but the .NET Extensibility Feature is not installed.



Things you can try:
•Ensure that the NTFS permissions for the web.config file are correct and allow access to the Web server's machine account.
•Check the event logs to see if any additional information was logged.
•Verify the permissions for the DLL.
•Install the .NET Extensibility feature if the request is mapped to a managed handler.
•Create a tracing rule to track failed requests for this HTTP status code. For more information about creating a tracing rule for failed requests, click here. 



Detailed Error Information:



Module
   FastCgiModule 

Notification
   ExecuteRequestHandler 

Handler
   fastcgiModule 

Error Code
   0x00000001 



Requested URL
   http://10.0.0.5:8097/ 

Physical Path
   C:\inetpub\wwwroot\hcm.ariespro.com 

Logon Method
   Anonymous 

Logon User
   Anonymous 




More Information:
This error means that there was a problem while processing the request. The request was received by the Web server, but during processing a fatal error occurred, causing the 500 error. 
View more information »

Microsoft Knowledge Base Articles:
•294807

я испробовал все способы, начиная от предоставления разрешений APPPOOL и заканчивая изменением версий PYTHON и WFASTCGI

НО У МЕНЯ НИЧЕГО НЕ РАБОТАЕТ

ПРОЕКТ ОТЛИЧНО РАБОТАЕТ НА СЕРВЕРЕ DJANGO

Я ТАКЖЕ РАЗВЕРНУЛ ЕГО, ИСПОЛЬЗУЯ NGINX И WAITRESS С СЕРВЕРА WINDOYS, НО МНЕ НУЖНО, ЧТОБЫ ОН РАБОТАЛ С IIS пожалуйста, помогите мне - любой ценой

IIS предоставляет множество функций для размещения веб-приложений. Веб-приложения Python могут быть размещены с помощью функций Httpplatformhandler и FastCGI. Для разработчиков Python изучение HttpPlatformHandler становится очень важным, Microsoft больше не рекомендует FastCGI, поэтому это больше не правильный способ размещения веб-приложений Python на IIS, вы можете перейти на HttpPlatformHandler.

Скачайте и установите Httpplatformhandler на IIS с помощью Windows Platform Installer. Или скачайте по этой ссылке.

Вы можете использовать следующие шаги для размещения веб-приложения Django с помощью Httpplatformhandler:

Для Django физический путь - это путь к файлу manage.py вашего приложения.

Django APP with Httpplatformhandler Добавьте web.config, где определено ваше приложение Django.

 <?xml version="1.0" encoding="UTF-8"?>
     <configuration>
         <system.webServer>
             <handlers>
                 <add name="httpplatformhandler" path="*" verb="*" modules="httpPlatformHandler" resourceType="Unspecified"
 requireAccess="Script" />
             </handlers>
             <httpPlatform startupTimeLimit="10" startupRetryCount="10" stdoutLogEnabled="true"
 processPath="C:\Users\user\AppData\Local\Programs\Python\Python36\python.exe"
 arguments="manage.py runserver">
                 <environmentVariables>
                     <environmentVariable name="foo" value="bar"/>
                 </environmentVariables>
             </httpPlatform>
         </system.webServer>
     </configuration>

HttpPlaform обрабатывает процесс Python. ProcessPath - это физический путь к исполняемому файлу python. Точно так же, как вы указываете путь к python в переменной окружения windows. Чтобы получить доступ к исполняемому файлу python. Здесь вы должны указать python.exe в processPath.

.

Аргументы - это те же аргументы, которые вы передаете при запуске любого веб-приложения python. приложение. Например, python manage.py runserver, где app.py - порт. номер - все это аргументы. В приведенном выше приложении, manage.py runserver передается для запуска приложения Django.

.

Добавьте разрешение на приложение Django и папку Python, где находится ваш исполняемый файл.

1.Откройте свойства папки.

2.В разделе Security нажмите на Edit, затем нажмите на Add

.

3.Введите имя объекта как IIS AppPool

.

4.Нажмите на имя проверки, если оно присутствует, нажмите OK и разрешите разрешения, которые вы хотели дать, а затем примените их.

Для получения дополнительной информации, пожалуйста, обратитесь к этой статье.

проверьте каталог, в котором установлен python, и переместите все пакеты в одну папку Я решил проблему, сохранив все пакеты в одной папке на диске c вне папки пользователей, так что wwwroot может легко получить доступ к каталогу, и вам действительно нужно дать права пулу iis для доступа к python и модулю w FastCGI.

Вернуться на верх