How to pass environment variables to uwsgi from cherokee

Programming

Today i’ve faced an issue with cherokee + uwsgi. I had to deploy a webapp which needed the LD_LIBRARY_PATH set. After fighting a while with cherokee i found a way to accomplish it.
From cherokee just invoke uwsgi interpreter as follow:

/bin/bash -c "LD_LIBRARY_PATH=/usr/local/MATLAB/R2011a/bin/glnxa64 /usr/local/bin/uwsgi --ini-paste /var/www/whisperer/development.ini"

The trick is to start a bash, set the variable(s) u want in your webapp and then start uwsgi. handy, isn’t it ?

Hope this helps somehow…

Previous
How to install tor on ubuntu natty 11.04
Next
Error installing mysql-python package

Leave a Reply

%d bloggers like this: