Closed GoogleCodeExporter closed 8 years ago
It is not possible because WSGI applications in different VirtualHost's can
still run in the same interpreter context. Even if running in different
interpreters, one cannot easily determine what interpreter it will be because
the interpreter is selected dynamically on a per request basis.
What you should do is use separate mod_wsgi daemon process groups for each
VirtualHost and delegate the WSGI applications using that to a separate set of
processes. You can then set python-path option on WSGIDaemonProcess.
<VirtualHost *:80>
ServerName one.example.com
WSGIDaemonProcess server-1 display-name=%{GROUP} python-path=/some/path/one
WSGIProcessGroup server-1
WSGIApplicationGroup %{GLOBAL}
WSGIScriptAlias / /some/path/app.wsgi
</VirtualHost>
<VirtualHost *:80>
ServerName one.example.com
WSGIDaemonProcess server-2 display-name=%{GROUP} python-path=/some/path/one
WSGIProcessGroup server-2
WSGIApplicationGroup %{GLOBAL}
WSGIScriptAlias / /some/path/app.wsgi
</VirtualHost>
Using daemon mode is a safer and better option anyway.
For more information see:
http://code.google.com/p/modwsgi/wiki/QuickConfigurationGuide#Delegation_To_Daem
on_Process
http://code.google.com/p/modwsgi/wiki/ConfigurationGuidelines#Defining_Process_G
roups
http://code.google.com/p/modwsgi/wiki/ConfigurationDirectives#WSGIDaemonProcess
http://code.google.com/p/modwsgi/wiki/ConfigurationDirectives#WSGIProcessGroup
Original comment by Graham.Dumpleton@gmail.com
on 3 Sep 2013 at 3:30
Original comment by Graham.Dumpleton@gmail.com
on 3 Sep 2013 at 3:30
Many thanks!
Original comment by HRG....@gmail.com
on 3 Sep 2013 at 5:19
Original issue reported on code.google.com by
HRG....@gmail.com
on 3 Sep 2013 at 3:22