0

Im using Windows 10

In httpd.conf (Apache) how to use WSGIPythonPath for multiple instances of Virtual Host for different project and ports since WSGIDaemonProcess is not supported on Windows.

httpd.conf

LoadModule wsgi_module "c:/users/webdev/documents/mark/digos-logs/venv/lib/site-packages/mod_wsgi/server/mod_wsgi.cp37-win_amd64.pyd"
WSGIPythonHome "C:\Users\WebDev\AppData\Local\Programs\Python\Python37"
WSGIPythonPath "C:\Users\WebDev\Documents\Mark\digos-logs"

where "C:\Users\WebDev\Documents\Mark\digos-logs" is my project root folder and "C:\Users\WebDev\Documents\Mark" is my parent folder of all my projects.

Project 1

listen 9292
<VirtualHost *:9292>
ServerName 127.0.0.1

# error occured (Example)
WSGIPythonPath "C:\Users\WebDev\Documents\Mark\digos-logs"
######3


WSGIScriptAlias / "C:\Users\WebDev\Documents\Mark\digos-logs\app_ict\wsgi.py"

<Directory "C:\Users\WebDev\Documents\Mark\digos-logs\app_ict">
    <Files wsgi.py>
      Require all granted
    </Files>
</Directory>


DocumentRoot C:\Users\WebDev\Documents\Mark\digos-logs


<Directory "C:\Users\WebDev\Documents\Mark\digos-logs\static">
    Require all granted
</Directory>

</VirtualHost>

Project 2

listen 9595
<VirtualHost *:9595>
ServerName 127.0.0.1

# error occured (Example)
WSGIPythonPath "C:\Users\WebDev\Documents\Mark\project2"
######3


WSGIScriptAlias / "C:\Users\WebDev\Documents\Mark\project2\app\wsgi.py"

<Directory "C:\Users\WebDev\Documents\Mark\project2\app">
    <Files wsgi.py>
      Require all granted
    </Files>
</Directory>


DocumentRoot C:\Users\WebDev\Documents\Mark\project2


<Directory "C:\Users\WebDev\Documents\Mark\project2\static">
    Require all granted
</Directory>

</VirtualHost>
Mark Anthony Libres
  • 906
  • 1
  • 7
  • 14
  • see my answer to this question: [https://stackoverflow.com/questions/64907416/how-should-i-add-wsgipython-path-in-virtualhost-for-windows-server](https://stackoverflow.com/questions/64907416/how-should-i-add-wsgipython-path-in-virtualhost-for-windows-server) – Razenstein Nov 23 '20 at 19:16
  • have you ever found a solution ? – cizario Nov 24 '20 at 14:55

0 Answers0