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>
2

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.