Hi
I would like to share an Apache to host regular and multiple wsgi
applications.
Here are my samples :
First Application default.conf -> static files
<VirtualHost _default_:*>
DocumentRoot /var/www/html
</VirtualHost>
Second Application app1.conf -> python app
<VirtualHost *:80>
ServerName app1.exemple.com
WSGIDaemonProcess app1 user=apache group=apache threads=10 processes=3
python-path=/path/to/app1/python/lib/python2.7/site-packages
WSGIProcessGroup app1
WSGIScriptAlias / /path/to/app1.wsgi
</VirtualHost>
Second Application app2.conf -> python app
<VirtualHost *:80>
ServerName app2.exemple.com
WSGIDaemonProcess app2 user=apache group=apache threads=10 processes=3
python-path=/path/to/app2/python/lib/python2.7/site-packages
WSGIProcessGroup app2
WSGIScriptAlias / /path/to/app2.wsgi
</VirtualHost>
The result should be :
http://www.exemple.com give the content of /var/www/html/index.html
http://app1.exemple.com give the content of the python app1
http://app2.exemple.com give the content of the python app2
But it's not the case because WSGIScriptAlias is server wide. Instead of the
expected result, I got the content of app1 for the 3 urls because app1.conf
is the first conf in alphabetic order and override the "/" match for any
virtualhosts.
If I change these lines :
WSGIScriptAlias /app1 /path/to/app1.wsgi in app1.conf
WSGIScriptAlias /app2 /path/to/app2.wsgi in app2.conf
These urls are correct :
http://www.exemple.com give the content of /var/www/html/index.html
http://app1.exemple.com/app1 give the content of the python app1
http://app2.exemple.com/app2 give the content of the python app2
But it's not what I want.
Therefore the question is : How to have multiple root apps in the same
Apache with NamedVirtualHost ?
Thanks in advance
Laurent Trillaud
--
You received this message because you are subscribed to the Google Groups
"modwsgi" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/modwsgi/-/9ZVBdZKfdbMJ.
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.