> Sorry if I can't remember if this has been discussed previously.
>
> I wan't to run a Django application under a non root url prefix.
> I'm using Cherokee and uwsgi.
>
> Let's say the url prefix is /test how should I setup Cherokee or uwsgi?
> I've tried setting SCRIPT_NAME to "test" and "/test" in Cherokee env
> variables for the handler, but that didn't change anything.
>
> I run the Django app like this (simplified):
>
> export UWSGI_MODULE="django.core.handlers.wsgi"
> export UWSGI_CALLABLE="WSGIHandler()"
> export DJANGO_SETTINGS_MODULE="hacklab.settings"
> exec uwsgi --socket :3333
In 0.9.6.x you have to use some form of configuration file.
For example you can use an xml one with:
<app mountpoint="/test">
<script>django_wsgi</script>
</app>
Or simply define a new python module like this:
import uwsgi
from django.core.handlers.wsgi import WSGIHandler
uwsgi.applications = {'/test':WSGIHandler()}
In 0.9.7 (mercurial tip) you have tons of possibilities. but if you want
to maintain the current style you can do something like this:
export UWSGI_MOUNT="/test=django.core.handlers.wsgi:WSGIHandler()"
export DJANGO_SETTINGS_MODULE="hacklab.settings"
exec uwsgi --socket :3333
(i hope that UWSGI_MOUNT/--mount is pretty self-explanatory)
Remember that in the cherokee admin you have to add a new directory called
/test (that will point to the uWSGI handler)
--
Roberto De Ioris
http://unbit.it
_______________________________________________
uWSGI mailing list
[email protected]
http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi