エンペラーモードでuWSGiを使用してボトルアプリをデプロイしようとしています。
demo.py
import os
from bottle import Bottle, route, run
app=Bottle()
@app.route('/index')
def index():
return "Hello world! "
@app.route('/:name')
def hello(name):
return "hello %s" % name
# Mod WSGI launch
os.chdir(os.path.dirname(file))
application = bottle.default_app()
demo.ini
[uwsgi]
# Variables
base = /opt/apps/webapp/demo
app = demo
# Geneic Config
plugins=http,python
home = /opt/apps/webapp/demo
pythonpath=%(base)
socket = /tmp/%n.sock
module = %(app)
logto = /var/log/uwsgi/%n.log
ログファイルへの出力
gracefully (RE)spawned uWSGI master process (pid: 2414)
spawned uWSGI worker 1 (pid: 2646, cores: 1)
[pid: 2646|app: -1|req: -1/1] 10.0.0.240 () {40 vars in 688 bytes} [Sat Oct 13 15:00:00 2012] GET /demo => generated 48 bytes in 0 msecs (HTTP/1.1 500) 2 headers in 63 bytes (0 switches on core 0)
announcing my loyalty to the Emperor...
[pid: 2646|app: -1|req: -1/2] 10.0.0.240 () {40 vars in 688 bytes} [Sat Oct 13 15:00:05 2012] GET /demo => generated 48 bytes in 0 msecs (HTTP/1.1 500) 2 headers in 63 bytes (0 switches on core 0)
[pid: 2646|app: -1|req: -1/3] 10.0.0.240 () {42 vars in 719 bytes} [Sat Oct 13 15:00:26 2012] GET /demo => generated 48 bytes in 0 msecs (HTTP/1.1 500) 2 headers in 63 bytes (0 switches on core 0)
しかし、ブラウザではまだこのエラーが表示されます
uWSGI Error
Python application not found
助けてください