|
| 1 | +<?xml version="1.0" encoding="utf-8"?> |
1 | 2 | <configuration> |
2 | 3 | <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. --> |
3 | 26 | <handlers> |
4 | | - <add name="PythonFastCGI" |
5 | | - path="*" verb="*" |
| 27 | + <add name="DjangoViaFastCGI" |
| 28 | + path="*" |
| 29 | + verb="*" |
6 | 30 | 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" |
8 | 32 | resourceType="Unspecified" |
9 | 33 | requireAccess="Script" /> |
10 | 34 | </handlers> |
11 | 35 |
|
12 | | - <directoryBrowse enabled="true" /> |
13 | | - |
| 36 | + <!-- Keep static/media direct; raise upload size; allow odd URLs --> |
14 | 37 | <security> |
| 38 | + <requestFiltering allowDoubleEscaping="true"> |
| 39 | + <!-- ~2 GB (tune as needed) --> |
| 40 | + <requestLimits maxAllowedContentLength="2147483648" /> |
| 41 | + </requestFiltering> |
15 | 42 | <authentication> |
16 | 43 | <anonymousAuthentication enabled="true" /> |
17 | 44 | <windowsAuthentication enabled="false" /> |
18 | 45 | </authentication> |
19 | 46 | </security> |
20 | 47 | </system.webServer> |
21 | 48 |
|
| 49 | + <!-- wfastcgi also reads these as a fallback for env vars --> |
22 | 50 | <appSettings> |
23 | 51 | <add key="WSGI_HANDLER" value="rduploadservice.wsgi.application" /> |
24 | 52 | <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" /> |
28 | 55 | <add key="WSGI_RESTART_FILE_REGEX" value=".*((\.py)|(\.config))$" /> |
29 | 56 | </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> |
30 | 65 | </configuration> |
0 commit comments