Skip to content

Instantly share code, notes, and snippets.

@CameronVetter
Created October 20, 2018 19:33
Show Gist options
  • Save CameronVetter/af9f8d5bed442fcc3f736aa2a05cdba2 to your computer and use it in GitHub Desktop.
Save CameronVetter/af9f8d5bed442fcc3f736aa2a05cdba2 to your computer and use it in GitHub Desktop.
web.config for CNTK running with Python 3.5.4 in Azure
<?xml version="1.0"?>
<configuration>
<appSettings>
<add key="WSGI_ALT_VIRTUALENV_HANDLER" value="main.app" />
<add key="WSGI_ALT_VIRTUALENV_ACTIVATE_THIS"
value="d:\home\python354x64\python.exe" />
<add key="WSGI_HANDLER"
value="ptvs_virtualenv_proxy.get_venv_handler()" />
<add key="PYTHONPATH" value="D:\home\site\wwwroot" />
</appSettings>
<system.web>
<compilation debug="true" targetFramework="4.0" />
<customErrors mode="Off" />
</system.web>
<system.webServer>
<httpErrors errorMode="Detailed"></httpErrors>
<modules runAllManagedModulesForAllRequests="true" />
<handlers>
<remove name="Python27_via_FastCGI" />
<remove name="Python34_via_FastCGI" />
<add name="Python FastCGI"
path="handler.fcgi"
verb="*"
modules="FastCgiModule"
scriptProcessor="d:\home\python354x64\python.exe|d:\home\python354x64\wfastcgi.py"
resourceType="Unspecified"
requireAccess="Script" />
</handlers>
<rewrite>
<rules>
<rule name="Static Files" stopProcessing="true">
<conditions>
<add input="true" pattern="false" />
</conditions>
</rule>
<rule name="Configure Python" stopProcessing="true">
<match url="(.*)" ignoreCase="false" />
<conditions>
<add input="{REQUEST_URI}" pattern="^/static/.*" ignoreCase="true" negate="true" />
</conditions>
<action type="Rewrite" url="handler.fcgi/{R:1}" appendQueryString="true" />
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment