various multiapp and virtualhosting fixes

This commit is contained in:
roberto@sirius
2010-11-22 11:15:02 +01:00
parent 79c30fed23
commit 652a9c5825
3 changed files with 53 additions and 1 deletions
+7
View File
@@ -0,0 +1,7 @@
require 'sinatra'
get '/hi' do
"Hello World"
end
run Sinatra::Application
+45
View File
@@ -0,0 +1,45 @@
<uwsgi>
<plugins>rack</plugins>
<http>:9090</http>
<manage-script-name/>
<master/>
<processes>4</processes>
<vhost/>
<vhost-host/>
<env>TRAC_ENV=utrac</env>
<app mountpoint="/">
<module>werkzeug.testapp:test_app</module>
</app>
<app mountpoint="/trac">
<module>trac.web.main:dispatch_request</module>
</app>
<app mountpoint="/trac/foo">
<module>werkzeug.testapp:test_app</module>
</app>
<app mountpoint="/bzr">
<eval>
from bzrlib.transport.http import wsgi
application = wsgi.make_app("mybzr", "/bzr", readonly=False)
</eval>
</app>
<app domain="sirius002:9090">
<module>trac.web.main:dispatch_request</module>
</app>
<app domain="sirius003:9090">
<rack>config2.ru</rack>
</app>
</uwsgi>
+1 -1
View File
@@ -532,11 +532,11 @@ PyObject *uwsgi_eval_loader(void *arg1) {
wsgi_eval_callable = PyDict_GetItemString(up.loader_dict, up.callable);
}
else {
wsgi_eval_callable = PyDict_GetItemString(up.loader_dict, "application");
}
if (wsgi_eval_callable) {
uwsgi_log( "found the \"%s\" callable\n", up.callable);
if (!PyFunction_Check(wsgi_eval_callable) && !PyCallable_Check(wsgi_eval_callable)) {
uwsgi_log( "you must define a callable object in your code\n");
exit(1);