Hello Surendran,

> I felt very nice to receive an immediate response.

I'm glad to help when I can ;-)

> T'll try out the things one by one, though regarding the following I
> have already created virtual hosts;
>
>>Maybe using a name for your host will help both your users, so they can
>>type a name instead of a number, and maybe it is easier when configuring
>>Apache virtual hosts.
> ...
>>yes, you can run more than one wsgi on the same IP address.  My
>>experience, though, is using different names for each wsgi process
>>(virtual hosts).
>
> Thus I have this virtual host in /etc/apache2/sites-enabled/wiki
> <VirtualHost 117.218.165.51:80>
>     ServerName www.lokavidya.in
>     ServerAdmin [email protected]
>     DocumentRoot /usr/share/moin
>     ...errorlog etc....
>     #WSGIScriptAlias /wiki   /usr/share/moin/moin.wsgi
>     #WSGIDaemonProcess moin user=www-data group=www-data processes=5 
> threads=10 maximum-requests=10$
>     #WSGIProcessGroup moin
> </virtualhost>
>
> The commented out WSGI declaratives were forced to be outside in the
> main apache2.conf for the www.lokavidya.in/wiki to run. ( if you are
> lucky the link will be live - sorry if it is offline!)

Those WSGI can be inside the <VirtualHost *:80> section.  First of all,
if those virtual hosts share a single IP address, you don't have to type
the name nor number, it doesn't work (I forgot the details).  I
commented heavily the WSGI directives in my Apache file, and taking
details off, they look like that:

 AddDefaultCharset UTF-8
 ServerSignature Off
 ServerTokens Prod
 WSGISocketPrefix /var/run/wsgi/socket
 WSGIRestrictStdout Off

 <VirtualHost *:80>
  [...]
  # Execute the applications within the context of the same 
  # group daemon processes
  WSGIProcessGroup ddd

  # Share a global Python interpreter
  WSGIApplicationGroup %{GLOBAL}

  # The name has to be unique for the whole server, user and
  # group match unix user and group
  WSGIDaemonProcess ddd user=ddd group=users display-name=ddd threads=1 
python-path=/home/ddd/lib/python

  WSGIScriptAlias / /home/ddd/invenio/var/www-wsgi/invenio.wsgi
  WSGIPassAuthorization On
 [...]

In your case, maybe WSGIProcessGroup should be different for moinmoin
and invenio, and WSGIDaemonProcess user and group process should be
www-data.  I leave my values so maybe they give you some ideas.  For
example, the WSGIDaemonProcess python-path parameter is useful if you
have some Python libraries outside the global python path.

More ideas: activate first just one of the virtual host (at Apache
level, using a2ensite and a2dissite), then only the other, and only
later on both.  And don't forget to look at the error logs, you may find
your answer there.

Best regards,

Ferran

Reply via email to