The URLs that I am using are two separate web domain addresses that I have 
purchased recently and set their DNS to point to my VPS's IP.

Yes, that was a typo (it was meant to be B) but I have verified that my 
actual conf file has no typos.

Each URL is tied to a flask application but with that config, only the 
first one gets invoked for both of them. I will like the first one to go to 
first flask application and the second url to hit the second one.

Thanks in advance for your help on this.

On Saturday, August 12, 2017 at 8:49:43 PM UTC-4, Graham Dumpleton wrote:
>
> For general advice see:
>
> 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 <javascript:>> <
> rm...@cornell.edu <javascript:>> 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
>
>
> Do you mean www.B.com here. Not 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+u...@googlegroups.com <javascript:>.
> To post to this group, send email to mod...@googlegroups.com <javascript:>
> .
> Visit this group at https://groups.google.com/group/modwsgi.
> For more options, visit 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