Reputation: 39
so i tried to do Http Platform Handler but now i am in an infinite loading screen when i visit localhost.
this is my configfile
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<system.webServer>
<handlers>
<add name="PythonHandler" path="*" verb="*" modules="httpPlatformHandler" resourceType="Unspecified"/>
</handlers>
<httpPlatform processPath="C:\Python310\python.exe"
arguments="C:\inetpub\Comsroomform\Home manage.py runserver --port 80"
stdoutLogEnabled="true"
stdoutLogFile="c:\home\LogFiles\python.log"
startupTimeLimit="60"
processesPerApplication="16">
<environmentVariables>
<environmentVariable name="SERVER_PORT" value="80" />
</environmentVariables>
</httpPlatform>
</system.webServer>
</configuration>
and after a long while of loading this shows up
i was told to follow this tutorial: https://halfblood.pro/running-flask-web-apps-on-iis-with-httpplatformhandler/
Upvotes: 0
Views: 1464
Reputation: 63203
Time to come back and answer it.
Django uses a different set of command line options, so you need something like
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<handlers>
<add name="httpPlatformHandler" path="*" verb="*" modules="httpPlatformHandler" resourceType="Unspecified" requireAccess="Script" />
</handlers>
<httpPlatform stdoutLogEnabled="true" stdoutLogFile=".\python.log" startupTimeLimit="20" processPath="C:\Users\<user name>\AppData\Local\Programs\Python\Python310\python.exe" arguments=".\mysite\manage.py runserver %HTTP_PLATFORM_PORT%">
</httpPlatform>
</system.webServer>
</configuration>
More details and the steps to try out can be found in my blog post.
https://docs.lextudio.com/blog/running-django-web-apps-on-iis-with-httpplatformhandler/
Upvotes: 0