Hi everyone, i have just committed the support for a new uwsgi variable.

UWSGI_APPID

This is a more generic (and simple) way for hosting multiple apps in the same 
process.

Currently uWSGI support mounting app using the value in  SCRIPT_NAME or using 
VirtualHosting.

Both causes some headache, the first because it is normally used by the app 
itself, the second one because
of the mess with SERVER_NAME and HTTP_HOST.

UWSGI_APPID is very simple, it is only an identification for an app. It will 
not be used in your app (unless you have good reasons)
and it is a fixed value so it cannot be modified by request (unless you map it 
to some nginx variable).

Another handy consequence, is that you can implement apache-style ServerAlias 
pointing to the same dynamic app simply setting
the same UWSGI_APPID for multiple server/location stanza.

Finally, you will be able to use the widely available WSGI/Rack/PSGI middleware 
for routing multiple apps as the SCRIPT_NAME variable will be simply ignored by 
uWSGI
when UWSGI_APPID is available.


UWSGI_APPID, SCRIPT_NAME and VirtualHosting can all used toghter without 
problems. with this order of priority:

1) UWSGI_APPID
2) VirtualHosting
3) SCRIPT_NAME

--
Roberto De Ioris
http://unbit.it
JID: [email protected]

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

Reply via email to