diff --git a/deluge/ui/webui/apache.py b/deluge/ui/webui/apache.py new file mode 100644 index 000000000..14d7b6f88 --- /dev/null +++ b/deluge/ui/webui/apache.py @@ -0,0 +1,35 @@ +#!/usr/bin/env python +# Copyright (C) Martijn Voncken 2008 +# License: GPL v2(+OpenSSL exception), see LICENSE file in base directory. +""" +this is an ugly hack, and it will be changed. +for experimental use only!! +""" +import os + +def get_wsgi_application(base_url, config_dir): + + #monkeypatch: + from deluge import common + def get_config_dir(filename = ""): + return os.path.join(config_dir, filename) + common.get_config_dir = get_config_dir + #/monkeypatch + + from deluge.configmanager import ConfigManager + from deluge.ui.webui import deluge_webserver + from deluge.ui.webui import utils + + config = ConfigManager("webui.conf") + + utils.set_config_defaults() + + config.set('base','/deluge') + config.set('disallow',{ + '/daemon/control':'running as an apache user', + '/config/server':'running as an apache-user' + }) + + utils.apply_config() + + return deluge_webserver.WsgiApplication()