Hello Ferran Jorba,

I felt very nice to receive an immediate response. 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 kksurend...@iitbombay.org
    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!)

And the /etc/apache2/sites-enabled/invenio ( and also the invenio-ssl),
which is essentially file written by the Invenio installation, except for
the WSGIScriptAlias /   changed to /invenio to make the wiki run.

#WSGISocketPrefix /opt/invenio/var/run
WSGIRestrictStdout Off
<VirtualHost 117.218.165.51:80>
        ServerName wikividya.dyndns.org
        ServerAlias wikividya
        ServerAdmin redhatads...@bsnl.in
        DocumentRoot /opt/invenio/var/www
...Aliases...
        WSGIDaemonProcess invenio processes=5 threads=1
display-name=%{GROUP} inactivity-timeout=3600 maximum-requests=10000
        WSGIImportScript /opt/invenio/var/www-wsgi/invenio.wsgi
process-group=invenio application-group=%{GLOBAL}
        WSGIScriptAlias /invenio /opt/invenio/var/www-wsgi/invenio.wsgi
        WSGIPassAuthorization On
           ....
         <Directory /opt/invenio/var/www-wsgi>
           WSGIProcessGroup invenio
           WSGIApplicationGroup %{GLOBAL}
           Options FollowSymLinks MultiViews
           AllowOverride None
           Require all granted
        </Directory>
</virtualhost>

I was reading the document
http://modwsgi.readthedocs.org/en/latest/configuration-directives/WSGIDaemonProcess.html

and read the following lines...

Note that having denoted that daemon processes should be created by using
the WSGIDaemonProcess directive, the WSGIProcessGroup directive still needs
to be used to delegate specific WSGI applications to execute within those
daemon processes.

Also note that the name of the daemon process group must be unique for the
whole server. That is, it is not possible to use the same daemon process
group name in different virtual hosts.

So I tried with the WSGI commands for the wiki inside its
<virtualhost>...WSGIProcessGroup moin...</virtualhost> but then the wiki is
not found!

I'll try the other suggestions, but making sure the wiki runs. Till then

Thanks&Regards

Surendran



On Mon, Dec 9, 2013 at 3:08 PM, Ferran Jorba <ferran.jo...@uab.cat> wrote:

> Hello Surendran,
>
> > I was installing Invenio-1.1.2 on a machine with the fixed IP address
> > 117.218.165.51 where I run a wiki http://117.218.165.51/wiki. The idea
> > is to run an educational wiki alongside a multilingual digital
> > repository.
>
> 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.
>
> > The moinmoin wiki runs using the following directives in the
> /etc/apache2/
> > apache2.conf
> > #
> > #  MoinMoin WSGI configuration
> > WSGIScriptAlias /wiki /usr/share/moin/moin.wsgi
> > WSGIDaemonProcess moin user=www-data group=www-data processes=5
> threads=10
> > maximum-requests=1000 umask=0007
> > WSGIProcessGroup moin
> >
> > After installing Invenio if I keep the directive
> >
> > WSGIScriptAlias / /opt/invenio/var/www-wsgi/invenio.wsgi
> >
> > in the /etc/apache2/sites-enables/invenio
> >
> > the wiki is broken. I could revive it by only changing it to
> >
> > WSGIScriptAlias /invenio /opt/invenio/var/www-wsgi/invenio.wsgi
> >
> > and the Invenio page does not come up. I get only
> >
> > The requested URL /invenio was not found on this server.
>
> Probably this error has to be corrected in the install step of Invenio,
> but I have no experience configuring Invenio under a /invenio path,
> sorry.
>
> > From what I understood one can not run two different process groups
> > (in this case 'moin' and 'invenio' ) in the same IP address (?)
>
> 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). I'll explain what I have done for the wsgi process
> themselves, but probably you'll have to adapt my experience to your
> situation, specially the WSGIScriptAlias directive.
>
> That said, I learned by trial and error, reading the modwsgi
> documentation (http://code.google.com/p/modwsgi/), excellent but maybe
> with too many options for my needs.
>
> I understand that you are running both applications under the same (say
> www-data) user and using the Apache and modwsgi combo, the only
> infrastructre I have some experience with.  For each wsgi application
> modwsgi needs to create a socket.  You can decide the directory and file
> prefix under the WSGISocketPrefix Apache directive in the Apache conf
> file.
>
> It turns out that this directive cannot exist under the <VirtualHost
> *:80> section, so it has to be in the common (top) section of the Apache
> conf file, and it shoud refer to a directory writable for all those
> processes.  I choose this one:
>
>  WSGISocketPrefix /var/run/wsgi/socket
>
> Make sure that the /var/run/wsgi is writable for your wsgi process
> (probably www-data).  Again, this directive has to be written for each
> of the Apache configuration files, including the -ssl variants.
>
> During my (long) debugging sessions, I found very useful the
> display-name parameter of the WSGIDaemonProcess (ex:
> display-name=invenio or display-name=moin) so issuing periodic
> `ps -ef | grep apache' commands you can see if your wsgi processes
> are running.
>
> I'm unsure that the other parameters I use are useful to you, as I run
> each wsgi application under a different Linux process, using apache-itk.
>
> Hope it helps a little bit.  But please ask again if something is not
> clear enough.
>
> Ferran
>



-- 
Phone  :+91-20-27298293

Reply via email to