Daemon and Embedded modes on the same configuration

16 views
Skip to first unread message

Diego Almeida

unread,
Mar 5, 2020, 6:32:51 AM3/5/20
to modwsgi
Is it possible to configure two sites on different modes at the same configuration?
site_a is running on embedded mode
site_b is running on daemon mode

I am using apache (httpd-2.4.41), httpd.conf:

WSGIScriptAlias /site_a /home/site_a/site_a/django.wsgi
<Directory /home/site_a/site_a>
        Order deny,allow
        Allow from all
</Directory>


WSGIDaemonProcess pg_site_b processes=2
WSGIProcessGroup pg_site_b
WSGIScriptAlias /site_b /home/site_b/site_b/wsgi.py process-group=pg_site_b
<Directory /home/site_b/site_b>
        Order deny,allow
        Allow from all
</Directory>



Thanks

Graham Dumpleton

unread,
Mar 5, 2020, 6:36:20 AM3/5/20
to mod...@googlegroups.com
Yes. Just leave out the WSGIProcessGroup you had at top level scope and rely on the process-group option you had on WSGIScrtipAlias.

WSGIScriptAlias /site_a /home/site_a/site_a/django.wsgi

<Directory /home/site_a/site_a>
        Order deny,allow
        Allow from all
</Directory>


WSGIDaemonProcess pg_site_b processes=2

WSGIScriptAlias /site_b /home/site_b/site_b/wsgi.py process-group=pg_site_b

<Directory /home/site_b/site_b>
        Order deny,allow
        Allow from all
</Directory>

Alternatively, put the WSGIProcessGroup inside of the Directory directive for second site.

WSGIScriptAlias /site_a /home/site_a/site_a/django.wsgi

<Directory /home/site_a/site_a>
        Order deny,allow
        Allow from all
</Directory>


WSGIDaemonProcess pg_site_b processes=2

WSGIScriptAlias /site_b /home/site_b/site_b/wsgi.py

<Directory /home/site_b/site_b>
        WSGIProcessGroup pg_site_b

        Order deny,allow
        Allow from all
</Directory>
--
You received this message because you are subscribed to the Google Groups "modwsgi" group.
To unsubscribe from this group and stop receiving emails from it, send an email to modwsgi+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/modwsgi/16513f3c-506c-4482-848c-e6e88d561ac2%40googlegroups.com.

Reply all
Reply to author
Forward
0 new messages