Thanks it worked.
On Monday, January 31, 2022 at 5:00:58 AM UTC+8 Graham Dumpleton wrote:
> The WSGIDaemonProcess/WSGIScriptAlias should be inside of the respect
> VirtualHost definitions, not in httpd.conf.
>
> In other words:
>
> <VirtualHost *:80>
> ServerName www.yyy.com
> ServerAdmin joel
> DocumentRoot /var/www/yyy
> ErrorLog /var/log/httpd/error.log
> CustomLog /var/log/httpd/access.log combined
>
> WSGIDaemonProcess yyy python-path=/var/www/yyy
> WSGIScriptAlias / /var/www/yy/wsgi.py
> process-group=yyy application-group=%{GLOBAL}
> Alias /static /var/www/yyy/static
> <Directory /var/www/yyy/static>
> Require all granted
> </Directory>
> <Directory /var/www/yyy>
> <Files wsgi.py>
> Require all granted
> </Files>
> </Directory>
> </VirtualHost>
>
> Similarly for the other host.
>
> Graham
>
> On 31 Jan 2022, at 1:39 am, Joel Divekar <[email protected]> wrote:
>
> Trying to run 2 different flask applications with different domain names
> from same server using mod_wsgi + Apache2.
>
> This is the settings configured in httpd.conf
> # For www.yyy.com
> WSGIDaemonProcess yyy python-path=/var/www/yyy WSGIScriptAlias /
> /var/www/yy/wsgi.py process-group=yyy application-group=%{GLOBAL}
>
> # For www.zzz.com
> WSGIDaemonProcess zzz python-path=/var/www/zzz WSGIScriptAlias /
> /var/www/zzz/wsgi.py process-group=zzz application-group=%{GLOBAL}
>
> and created virtualhost confs /etc/httpd/conf.d/yyy.conf & zzz.conf
> similar to
>
> <VirtualHost *:80>
> ServerName www.yyy.com
> ServerAdmin joel
> DocumentRoot /var/www/yyy
> ErrorLog /var/log/httpd/error.log
> CustomLog /var/log/httpd/access.log combined
> Alias /static /var/www/yyy/static
> <Directory /var/www/yyy/static>
> Require all granted
> </Directory>
> <Directory /var/www/yyy>
> <Files wsgi.py>
> Require all granted
> </Files>
> </Directory>
> </VirtualHost>
>
> but whatever a request is received by the server, only the landing page of
> the first application that is configured in httpd.conf is displayed.
>
> Kindly advice what I am missing in the configuration.
>
> Regards
>
> Joel
>
> --
> 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 [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/modwsgi/de27a457-63f1-410d-adbd-971b2abb45ffn%40googlegroups.com
>
> <https://groups.google.com/d/msgid/modwsgi/de27a457-63f1-410d-adbd-971b2abb45ffn%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>
>
>
--
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 [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/modwsgi/2d2d8770-5812-4e01-971a-0937b73007ccn%40googlegroups.com.