>
> On 02/11/2011 16:31, Roberto De Ioris wrote:
>>> Hi,
>>>
>>> I'm trying to set up VirtualHosting as is done here:
>>>
>>> http://projects.unbit.it/uwsgi/wiki/VirtualHosting
>>>
>>> I've tried several different configurations but I can't seem to get it
>>> working. If someone would please be so kind as to take a look and see
>>> what I might be doing wrong, it would be very much appreciated.
>>>
>>> uwsgi is started with these flags: -M -L --vhost --no-site
>>>
>>> Mercurial is installed system-wide and should be available to any
>>> Python
>>> application.
>>>
>>> --- nginx.conf ---
>>>
>>> server {
>>>       listen      443;
>>>       server_name hg.domain.com;
>>>       location / {
>>>           uwsgi_pass unix:/tmp/uwsgi.sock;
>>>           uwsgi_param UWSGI_SCRIPT    hgweb_wsgi;
>>>           uwsgi_param UWSGI_PYHOME
>>> /usr/local/www/vhosts/hg.domain.com;
>>>           include uwsgi_params;
>>
>> UWSGI_PYHOME set what we call "dynamic virtualenv". This means your
>> pythonpath will be something like
>> /usr/local/www/vhosts/hg.domain.com/lib/python2.x/site-packages
>>
>> You'd better to use
>>
>> UWSGI_CHDIR /usr/local/www/vhosts/hg.domain.com
>>
>> or add /usr/local/www/vhosts/hg.domain.com to the pythonpath
>> with
>>
>> --pp /usr/local/www/vhosts/hg.domain.com
>>
>> in the command line
>
>
> Hi Roberto,
>
> Thank you very much for your reply and help with this. I've replaced
> UWSGI_PYHOME with UWSGI_CHDIR and reloaded nginx; I seem to get the same
> result:
>
> ImportError: No module named hgweb_wsgi
> unable to load app mountpoint=hg.domain.com
>
>
>

You should rebuild uWSGI with debug enabled (set debug = true in
buildconf/default.ini and re-run make) and post the whole uWSGI log.
In this way we can see the whole set of variables passed by nginx.

Take in account that adding --no-site will disable all of the installed
modules in python site-packages, so try removing it too.

-- 
Roberto De Ioris
http://unbit.it
_______________________________________________
uWSGI mailing list
[email protected]
http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi

Reply via email to