Hello everyone.
I tried to serve Django app and Mercurial repo web directory with one
uWSGI instance just like documentation says
(http://projects.unbit.it/uwsgi/wiki/Example#DjangoandMercurialjustmarried).
I see both apps registered as uWSGI starts:
...getting the applications list from the 'uwsgi_config_file' module...
application 0 () ready
setting default application to 0
application 1 (/hg) ready
But really works only application bound to root url ('/'). That is, if
Django is bound to '/' (or empty string, ''), /hg is passed to it by
uWSGI, and Django app returns 404, of course. In case of "reversed"
binding {'': hgwebdir application, '/django': djangoapp} Mercurial repos
are served fine, but request for '/django' returns 404 "No repo found".
That's how I start uWSGI (0.9.6.6, Gentoo Linux amd64, Python 2.7.1,
everything compiled with GCC 4.5.1):
% /usr/bin/uwsgi -s 127.0.0.1:60150 --file
/home/sterkrig/projects/uwsgi.py
And `uwsgi.py` is taken just from documentation (with mercurial imports
fixed):
-------
import sys, uwsgi
sys.path.append('/home/sterkrig/projects')
from mercurial.hgweb.hgwebdir_mod import hgwebdir
hgapp = hgwebdir('/home/sterkrig/projects/hgweb.config')
import os
os.environ['DJANGO_SETTINGS_MODULE'] = 'webgen.settings'
import django.core.handlers.wsgi
djangoapp = django.core.handlers.wsgi.WSGIHandler()
uwsgi.applications = {'': djangoapp, '/hg': hgapp}
-------
Do I miss something here? Looks like Documentation isn't quite correct
or?..
Thanks in advance.
_______________________________________________
uWSGI mailing list
[email protected]
http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi