For general advice see:

http://blog.dscpl.com.au/2012/10/requests-running-in-wrong-django.html 
<http://blog.dscpl.com.au/2012/10/requests-running-in-wrong-django.html>

See further comments below.

> On 13 Aug 2017, at 9:45 am, <rm...@cornell.edu> <rm...@cornell.edu> wrote:
> 
> Hello,
> 
> I am trying to setup two virtual hosts pertaining to two websites - lets call 
> them www.A.com and www.B.com using apache, mod_wsgi daemon. Both the apps are 
> written using flask.
> 
> Below is my apache conf file and for some reason it always picks the first 
> declared virtual host URL and executes the first flask application for both 
> URLs.

What are the URLs you are using?

Does the hostname in the URL match exactly what you are setting ServerName to?

> I am still new to the mod_wsgi scene and was reading multiple virtual hosts 
> setup instructions from here - 
> http://modwsgi.readthedocs.io/en/develop/user-guides/configuration-guidelines.html
> 
> Any idea how to get both of them working? The apache server is run as root.
> 
> Conf:
> WSGIPythonHome /usr/local/venvs/myenv
> 
> <VirtualHost *:80>
>   ServerName www.A.com
> 
>   WSGIDaemonProcess www.A.com threads=15 maximum-requests=10000
> 
>   WSGIScriptAlias / /var/www/A/A.wsgi
>   WSGIProcessGroup www.A.com
> 
>   <Directory /var/www/Ar>
>     Order allow,deny
>     Allow from all
>   </Directory>
> 
> </VirtualHost>
> 
> <VirtualHost *:80>
>   ServerName www.B.com
> 
>   WSGIDaemonProcess www.B.com threads=15 maximum-requests=10000
> 
>   WSGIScriptAlias / /var/www/B/B.wsgi
>   WSGIProcessGroup www.Bl.com <http://www.bl.com/>

Do you mean www.B.com <http://www.b.com/> here. Not www.BI.com 
<http://www.bi.com/>?

> 
>   <Directory /var/www/B>
>     Order allow,deny
>     Allow from all
>   </Directory>
> 
> </VirtualHost>
> 
> Thanks,
> RM
> 
> 
> 
> -- 
> 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+unsubscr...@googlegroups.com 
> <mailto:modwsgi+unsubscr...@googlegroups.com>.
> To post to this group, send email to modwsgi@googlegroups.com 
> <mailto:modwsgi@googlegroups.com>.
> Visit this group at https://groups.google.com/group/modwsgi 
> <https://groups.google.com/group/modwsgi>.
> For more options, visit https://groups.google.com/d/optout 
> <https://groups.google.com/d/optout>.

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to modwsgi@googlegroups.com.
Visit this group at https://groups.google.com/group/modwsgi.
For more options, visit https://groups.google.com/d/optout.

Reply via email to