Hi everyone,
For some reason, apache doesn't tolerate to set WSGIDaemonProcess directive
from within a vhost. Therefore, I got a global apache conf
(/etc/apache2/conf.d/xyz.conf which tells apache which defines the python-path
to my virtualenv:
############## /etc/apache2/conf.d/infoscience.conf
XSendFile On
XSendFileAllowAbove On
WSGIDaemonProcess invenio
python-path=/var/www/infoscience.epfl.ch/private/infoscience-env/lib/python2.6/site-packages
processes=5 threads=1 display-name=%{GROUP} inactivity-timeout=3600
maximum-requests=1
##############
Then, the rest of my apache config is located in the vhost/conf directory
(which also contains config files for static media, django app, …).
This files refers to the wsgi configuration:
############## /var/www/infoscience.epfl.ch/conf/05-invenio.conf
<Directory /var/www/infoscience.epfl.ch/htdocs/invenio>
Options FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
Allow from all
</Directory>
Alias /img/ /var/www/infoscience.epfl.ch/htdocs/invenio/www/img/
Alias /js/ /var/www/infoscience.epfl.ch/htdocs/invenio/www/js/
Alias /MathJax/ /var/www/infoscience.epfl.ch/htdocs/invenio/www/MathJax/config/
Alias /jsCalendar/ /var/www/infoscience.epfl.ch/htdocs/invenio/www/jsCalendar/
Alias /fckeditor/ /var/www/infoscience.epfl.ch/htdocs/invenio/www/fckeditor/
AliasMatch /sitemap-(.*)
/var/www/infoscience.epfl.ch/htdocs/invenio/www/sitemap-$1
WSGIScriptAlias /
/var/www/infoscience.epfl.ch/private/invenio/var/www-wsgi/invenio.wsgi
WSGIPassAuthorization On
<Directory /var/www/infoscience.epfl.ch/private/invenio/var/www-wsgi>
WSGIProcessGroup invenio
WSGIApplicationGroup %{GLOBAL}
Options FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
Allow from all
</Directory>
#######################################################################
Hope this can help anybody someday…
Cheers,
Greg
Le 16 mai 2012 à 13:30, Lars Holm Nielsen a écrit :
> Dear Johnny,
>
> Just a small follow-up question.
>
> On 16 May 2012, at 11:42, Johnny Mariéthoz wrote:
>
>> Dear all,
>>
>> does anyone has already install invenio into a python virtualenv
>> environment. What is your python packages list (pip freeze -l and/or pip
>> freeze) in this case?
>>
>> Here is mine but I'm sure that it is NOT optimal:
>> <dependencies.txt>
>> Reminder: run "pip install -r dependencies.txt" to install all the required
>> packages.
>>
>> Perhaps someone has already written an setup.py file for Invenio?
>>
>> I think that it will be interesting to have a wiki page about this,
>> containing a short documentation with the "ideal" package list and a simple
>> wsgi file that use virtualenv.
>
> Did you have to customize the default invenio.wsgi? From my previous
> experiences with Apache, mod_wsgi and virtualenv I would think you only
> needed to add "WSGIPythonHome" to your Apache conf, but I've tried yet, so
> can't say for sure. This would make the WSGI processes use the virtualenv's
> python which have the proper setup of site-packages
> (http://code.google.com/p/modwsgi/wiki/VirtualEnvironments#Process_Environments).
>
> Cheers,
> Lars
>
>>
>> Many thanks in advance,
>>
>> -- Johnny
>>
>
____________________________________________________________________
Gregory Favre
Coordinateur Infoscience
École Polytechnique Fédérale de Lausanne
KIS - DIT
Station 8
CH-1015 Lausanne
+41 21 693 22 88
+ 41 79 599 09 06
[email protected]
http://plan.epfl.ch/?sciper=128933
____________________________________________________________________