mirror of
https://github.com/clearlinux/uwsgi.git
synced 2026-11-21 10:56:10 +00:00
various multiapp and virtualhosting fixes
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
require 'sinatra'
|
||||
|
||||
get '/hi' do
|
||||
"Hello World"
|
||||
end
|
||||
|
||||
run Sinatra::Application
|
||||
@@ -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>
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user