I'm trying to run a Django website on an IIS server. After several tries, I finally succeeded. It works quite nicely. Now it's time for the next stage with which I have a bit of a problem.
My question is:
Is it possible to run more than one Django service on an IIS server?
If I look at the web.config file, there are references to only one Django website.
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<handlers>
<add name="Python FastCGI"
path="*"
verb="*"
modules="FastCgiModule" scriptProcessor="C:\inetpub\wwwroot\test_3\venv\Scripts\python.exe|C:\inetpub\wwwroot\test_3\venv\Lib\site-packages\wfastcgi.py"
resourceType="Unspecified"
requireAccess="Script" />
</handlers>
</system.webServer>
<appSettings>
<add key="PYTHONPATH" value="C:\inetpub\wwwroot\test_3" />
<add key="WSGI_HANDLER" value="mysite.wsgi.application" />
<add key="DJANGO_SETTINGS_MODULE" value="mysite.settings" />
</appSettings>
</configuration>
Especially when each website will be in a separate venv.
Thanks for any help and suggestion
It is of course possible to run multiple Django services on an IIS server. You can do this by creating a separate website for each Django project and configuring the bindings and ports correctly.
There should be a separate web.config file for each Django project. You can create a new web.config file in the root directory of each project and make the desired changes to it.
By taking this approach, you can run multiple Django services on the same IIS server, each isolated in its own virtual environment and accessible through a separate URL.
Similar threads:
How to run multiple django applications on IIS server?
Deploying two different Django Applications on Windows Server in IIS.