Troubleshooting ModuleNotFoundError from Apache when Hosting Multiple Django Projects on Windows
<p>Hosting a project on Windows while running Apache as a service, requires the path to the virtual environment and project folders. When hosting a single project, this is usually done with WSGIPythonPath and WSGIPythonHome. However, when hosting multiple projects under one Apache service, VirtualHosts are now needed. Using WSGIPythonPath and WSGIPythonHome with VirtualHosts can lead to multiple issues such as confusing error logs, one project being run on multiple ports though it should only be on one, or an internal server error.</p>
<p>The solution is to remove WSGIPythonPath and WSGIPythonHome from your *.conf file and set them dynamically within your Django projects.</p>
<p>Before we begin, I am using Apache Lounge on an AWS t2.xlarge EC2 instance with Windows 10. As a heads up, Apache Haus does not have all the dependencies Django requires. So it may be possible to do this on Apache Haus, but it will be more of a headache.</p>
<p>Let’s start with the error log I was getting.</p>
<p><a href="https://medium.com/@knimako84/troubleshooting-modulenotfounderror-from-apache-when-hosting-multiple-django-projects-on-windows-3ccbabfc4668"><strong>Click Here</strong></a></p>