Hi Ksenia,
Yes, this is possible. What you need to do is run a single DaemonProcess
named, say, "Primary". Then within each VirtualHost, you need
WSGIProcessGroup that refers to "Primary".
Something like this:
WSGIApplicationGroup %{GLOBAL}
WSGIDaemonProcess Primary threads=15 python-path=/foo/bar/Python
<VirtualHost *:80>
ServerName foo1.com
WSGIProcessGroup Primary
WSGIScriptAlias /User /foo/bar/app.wsgi
</VirtualHost>
<VirtualHost *:80>
ServerName foo2.com
WSGIProcessGroup Primary
WSGIScriptAlias /User /foo/bar/app.wsgi
</VirtualHost>
The best thing would be to take a detailed look at these links:
http://code.google.com/p/modwsgi/wiki/ConfigurationDirectives#WSGIDaemonProcess
<http://code.google.com/p/modwsgi/wiki/ConfigurationDirectives#WSGIDaemonProcess>
http://code.google.com/p/modwsgi/wiki/ConfigurationDirectives#WSGIApplicationGroup
http://code.google.com/p/modwsgi/wiki/ConfigurationDirectives#WSGIProcessGroup
And then post back with further questions.
Thanks!
Jason Garber
On Fri, Feb 5, 2010 at 11:31 AM, Ksenia <[email protected]> wrote:
> Greetings,
>
> Currently we have 300+ virtual hosts that are using the same Python
> process. The connection is done with SCGI. In every VirtualHost we
> have:
>
> <VirtualHost "*:80">
> ServerName myservername.com
> …:
> SCGIMount / 127.0.0.1:8080
> …
> </VirtualHost>
>
> The application can distinguish what site is requested based on the
> hostname in the environ. Python process spawns threads when needed.
>
>
> I wonder how the same setup can be achieved with mod_wsgi? I couldn't
> find an example of multiple VirtualHosts using one global Python
> process. It seems that you always have to have 1 process per
> VirtualHost. I hope I am wrong on this :)
>
> Thanks
> Ksenia.
>
> --
> You received this message because you are subscribed to the Google Groups
> "modwsgi" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected]<modwsgi%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/modwsgi?hl=en.
>
>
--
You received this message because you are subscribed to the Google Groups
"modwsgi" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/modwsgi?hl=en.