Merge "Fix WSGI application"
This commit is contained in:
commit
b106c01613
|
@ -258,7 +258,7 @@ function configure_monasca_log_api_wsgi {
|
|||
fi
|
||||
|
||||
# copy proxy vhost and wsgi helper files
|
||||
sudo cp $MONASCA_LOG_API_DIR/monasca_log_api/app/wsgi.py $MONASCA_LOG_API_WSGI_DIR/monasca_log_api
|
||||
sudo cp $MONASCA_LOG_API_BIN_DIR/monasca-log-api-wsgi $MONASCA_LOG_API_WSGI_DIR/monasca_log_api
|
||||
sudo cp $PLUGIN_FILES/apache-log-api.template $monasca_log_api_apache_conf
|
||||
sudo sed -e "
|
||||
s|%PUBLICPORT%|$monasca_log_api_api_port|g;
|
||||
|
|
|
@ -18,6 +18,15 @@ Use this file for deploying the API under mod_wsgi.
|
|||
|
||||
from paste import deploy
|
||||
|
||||
base_dir = '/etc/monasca/'
|
||||
conf = '%slog-api-paste.ini' % base_dir
|
||||
application = deploy.loadapp('config:%s' % conf)
|
||||
application = None
|
||||
|
||||
|
||||
def main():
|
||||
base_dir = '/etc/monasca/'
|
||||
conf = '%slog-api-paste.ini' % base_dir
|
||||
app = deploy.loadapp('config:%s' % conf)
|
||||
return app
|
||||
|
||||
|
||||
if __name__ == '__main__' or __name__.startswith('_mod_wsgi'):
|
||||
application = main()
|
||||
|
|
Loading…
Reference in New Issue