remove https+ add apache

This commit is contained in:
Martijn Voncken 2008-04-01 17:40:50 +00:00
parent 0f32cde503
commit d9ec10dd28
3 changed files with 10 additions and 24 deletions

View File

@ -61,12 +61,6 @@ class Template(config_forms.WebCfgForm):
class Server(config_forms.WebCfgForm):
title = _("Server")
port = forms.IntegerField(label = _("Port"),min_value=80)
use_https = forms.CheckBox(_("Use https (BROKEN)"))
try:
import OpenSSL
except ImportError:
info = _("pyopenssl not installed, install this for https.")
def post_save(self):
pass

View File

@ -35,6 +35,7 @@ from deluge.configmanager import ConfigManager
import pkg_resources
from deluge.ui.client import sclient
import components
from deluge.log import LOG as log
# Initialize gettext
locale.setlocale(locale.LC_MESSAGES, '')
@ -80,49 +81,41 @@ config_forms.register()
def WsgiApplication(middleware = None):
if not middleware:
middleware = []
from web import webpyfunc, wsgifunc
from deluge import component
pagemanager = component.get("PageManager")
pagemanager = component.get("PageManager")
if not middleware:
middleware = []
return wsgifunc(webpyfunc(pagemanager.urls, pagemanager.page_classes, False), *middleware)
def WebServer(debug = False):
def create_webserver(debug = False):
"starts builtin webserver"
import web
utils.set_config_defaults()
config.set('base','')
config.set('disallow',{})
utils.apply_config()
import web
from lib.gtk_cherrypy_wsgiserver import CherryPyWSGIServer
middleware = None
if debug:
middleware = [web.reloader]
else:
middleware = []
wsgi_app = WsgiApplication(middleware)
server_address=("0.0.0.0", int(config.get('port')))
server = CherryPyWSGIServer(server_address, wsgi_app, server_name="localhost")
"""if config.get('use_https'):
server.ssl_certificate = os.path.join(ws.webui_path,'ssl/deluge.pem')
server.ssl_private_key = os.path.join(ws.webui_path,'ssl/deluge.key')
"""
print "http://%s:%d/" % server_address
log.info("http://%s:%d/" % server_address)
return server
def mod_wsgi_application(sub_dir, config_dir , template_dir):
pass
def run(debug = False):
server = WebServer(debug)
server = create_webserver(debug)
try:
server.start()
except KeyboardInterrupt:

View File

@ -66,7 +66,6 @@ CONFIG_DEFAULTS = {
"pwd_salt":"2\xe8\xc7\xa6(n\x81_\x8f\xfc\xdf\x8b\xd1\x1e\xd5\x90",
"pwd_md5":".\xe8w\\+\xec\xdb\xf2id4F\xdb\rUc",
"cache_templates":True,
"use_https":False,
"daemon":"http://localhost:58846",
"base":"",
"disallow":{}