I believe the error I am getting is due to how Django is trying to serve the static files. The default azure landing page works but as soon as I go to /admin/ I get the error message:
"The resource you are looking for has been removed, had its name changed, or is temporarily unavailable"
This here is the static files infomation from the Settings.py:
STATIC_URL = '/static/'
MEDIA_URL = '/media/'
STATICFILES_DIRS = [
os.path.join(BASE_DIR, "static"),
#'/var/www/static/',
]
STATIC_ROOT = os.path.join(os.path.dirname(BASE_DIR), 'static_cdn') //used in development
MEDIA_ROOT = os.path.join(os.path.dirname(BASE_DIR), 'media_cdn')//used in development
and in D:\home\site\wwwroot\static I have got the following web.config from this answer here:
IIS7, web.config to allow only static file handler in directory /uploads of website
Edit:
<configuration>
<system.webServer>
<handlers>
<add name="PythonHandler" path="*" verb="*" modules="httpPlatformHandler" resourceType="Unspecified"/>
<add name="PythonHandler" path="*" verb="*" modules="FastCgiModule"
scriptProcessor="D:\home\python364x64\Scripts\pip3.exe"
resourceType="Unspecified" requireAccess="Script"/>
</handlers>
<httpPlatform processPath="D:\home\python364x64\python.exe"
arguments="D:\home\site\wwwroot\runserver.py --port %HTTP_PLATFORM_PORT%"
stdoutLogEnabled="true"
stdoutLogFile="D:\home\LogFiles\python.log"
startupTimeLimit="60"
processesPerApplication="16">
<environmentVariables>
<environmentVariable name="SERVER_PORT" value="%HTTP_PLATFORM_PORT%" />
</environmentVariables>
</httpPlatform>
<httpErrors errorMode="Detailed"></httpErrors>
</system.webServer>
<appSettings>
<add key="WSGI_HANDLER" value="django.core.wsgi.get_wsgi_application()"/>
<add key="PYTHONPATH" value="D:\home\python364x64\Scripts"/>
<add key="WSGI_LOG" value="D:\home\LogFiles\wfastcgi.log"/>
<add key="DJANGO_SETTINGS_MODULE" value="FTAData.settings" />
</appSettings>
</configuration>