Thanks you for your prompt answer.

Unfortunately I have already activated NameVirtualHost.

Here is a sniplet of my httpd.conf

...
Listen 80
ServerName example.com:80
...
LoadModule wsgi_module modules/mod_wsgi.so
...
WSGISocketPrefix /var/run/wsgi
WSGIPythonHome /usr/local/python-2.7
WSGIPythonPath /usr/local/python-2.7/lib/python2.7/site-packages
...
NameVirtualHost *:80
...

Laurent


2011/7/27 Graham Dumpleton <[email protected]>

> The only scenario where you could get what you are seeing is if you
> are missing the directive:
>
>  NameVirtualHost *:80
>
> to enable name based virtual hosts on port 80.
>
> Without that, all port 80 requests would go to first virtual host
> found in order of processing Apache configuration.
>
> If you provide a WSGIScriptAlias inside of VirtualHost it will be
> specific to that virtual host and not server wide.
>
> Graham
>
> On 27 July 2011 17:05, ltrillaud <[email protected]> wrote:
> > 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.
> >
>
> --
> You received this message because you are subscribed to the Google Groups
> "modwsgi" group.
> 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.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"modwsgi" group.
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.

Reply via email to