Skip to content

Commit 8f5937d

Browse files
committed
fixes web.config issues
1 parent 6c6e90e commit 8f5937d

File tree

1 file changed

+43
-8
lines changed

1 file changed

+43
-8
lines changed

web.config

Lines changed: 43 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,65 @@
1+
<?xml version="1.0" encoding="utf-8"?>
12
<configuration>
23
<system.webServer>
4+
<!-- Show real app errors while you finish setup; switch to custom later -->
5+
<httpErrors existingResponse="PassThrough" errorMode="Detailed" />
6+
7+
<!-- Register the FastCGI app (per-app) -->
8+
<fastCgi>
9+
<application
10+
fullPath="C:\inetpub\rdportal-iisnode\upload_server_052025\venv\Scripts\python.exe"
11+
arguments="C:\inetpub\rdportal-iisnode\upload_server_052025\venv\Lib\site-packages\wfastcgi.py">
12+
<environmentVariables>
13+
<environmentVariable name="WSGI_HANDLER" value="rduploadservice.wsgi.application" />
14+
<environmentVariable name="DJANGO_SETTINGS_MODULE" value="rduploadservice.settings" />
15+
<environmentVariable name="PYTHONPATH" value="C:\inetpub\rdportal-iisnode\upload_server_052025" />
16+
<environmentVariable name="WSGI_PYTHON_HOME" value="C:\inetpub\rdportal-iisnode\upload_server_052025\venv" />
17+
<environmentVariable name="WSGI_LOG" value="C:\inetpub\rdportal-iisnode\Logs\wfastcgi.log" />
18+
<environmentVariable name="PYTHONUNBUFFERED" value="1" />
19+
<environmentVariable name="WSGI_RESTART_FILE_REGEX" value=".*((\.py)|(\.config))$" />
20+
</environmentVariables>
21+
</application>
22+
</fastCgi>
23+
24+
<!-- Add our FastCGI handler.
25+
requireAccess=Script keeps static files with StaticFileModule. -->
326
<handlers>
4-
<add name="PythonFastCGI"
5-
path="*" verb="*"
27+
<add name="DjangoViaFastCGI"
28+
path="*"
29+
verb="*"
630
modules="FastCgiModule"
7-
scriptProcessor="C:\inetpub\rdportal-iisnode\python_server\rduploadservice\venv\Scripts\python.exe|C:\inetpub\rdportal-iisnode\python_server\rduploadservice\venv\Lib\site-packages\wfastcgi.py"
31+
scriptProcessor="C:\inetpub\rdportal-iisnode\upload_server_052025\venv\Scripts\python.exe|C:\inetpub\rdportal-iisnode\upload_server_052025\venv\Lib\site-packages\wfastcgi.py"
832
resourceType="Unspecified"
933
requireAccess="Script" />
1034
</handlers>
1135

12-
<directoryBrowse enabled="true" />
13-
36+
<!-- Keep static/media direct; raise upload size; allow odd URLs -->
1437
<security>
38+
<requestFiltering allowDoubleEscaping="true">
39+
<!-- ~2 GB (tune as needed) -->
40+
<requestLimits maxAllowedContentLength="2147483648" />
41+
</requestFiltering>
1542
<authentication>
1643
<anonymousAuthentication enabled="true" />
1744
<windowsAuthentication enabled="false" />
1845
</authentication>
1946
</security>
2047
</system.webServer>
2148

49+
<!-- wfastcgi also reads these as a fallback for env vars -->
2250
<appSettings>
2351
<add key="WSGI_HANDLER" value="rduploadservice.wsgi.application" />
2452
<add key="DJANGO_SETTINGS_MODULE" value="rduploadservice.settings" />
25-
<add key="PYTHONPATH" value="C:\inetpub\rdportal-iisnode\python_server\rduploadservice" />
26-
<add key="WSGI_PYTHON_HOME" value="C:\inetpub\rdportal-iisnode\python_server\rduploadservice\venv" />
27-
<add key="WSGI_LOG" value="C:\inetpub\rdportal-iisnode\python_server\Logs\wfastcgi.log" />
53+
<add key="PYTHONPATH" value="C:\inetpub\rdportal-iisnode\upload_server_052025" />
54+
<add key="WSGI_LOG" value="C:\inetpub\rdportal-iisnode\Logs\wfastcgi.log" />
2855
<add key="WSGI_RESTART_FILE_REGEX" value=".*((\.py)|(\.config))$" />
2956
</appSettings>
57+
58+
<!-- Keep light to avoid locked-section errors; set big limits at site/server if needed -->
59+
<system.web>
60+
<customErrors mode="Off" />
61+
<compilation debug="true" />
62+
<!-- If this section is locked on your server, remove it and set via IIS GUI -->
63+
<httpRuntime executionTimeout="1800" maxRequestLength="2097151" />
64+
</system.web>
3065
</configuration>

0 commit comments

Comments
 (0)