Skip to content
Snippets Groups Projects
Commit af7ae048 authored by Erik Johnston's avatar Erik Johnston
Browse files

Add option to not bind to HTTPS port. This is useful if running behind an ssl load balancer

parent ad6eacb3
No related branches found
No related tags found
Loading
...@@ -32,7 +32,7 @@ for port in 8080 8081 8082; do ...@@ -32,7 +32,7 @@ for port in 8080 8081 8082; do
-D --pid-file "$DIR/$port.pid" \ -D --pid-file "$DIR/$port.pid" \
--manhole $((port + 1000)) \ --manhole $((port + 1000)) \
--tls-dh-params-path "demo/demo.tls.dh" \ --tls-dh-params-path "demo/demo.tls.dh" \
$PARAMS $PARAMS $SYNAPSE_PARAMS
python -m synapse.app.homeserver \ python -m synapse.app.homeserver \
--config-path "demo/etc/$port.config" \ --config-path "demo/etc/$port.config" \
......
...@@ -233,7 +233,10 @@ def setup(): ...@@ -233,7 +233,10 @@ def setup():
f.namespace['hs'] = hs f.namespace['hs'] = hs
reactor.listenTCP(config.manhole, f, interface='127.0.0.1') reactor.listenTCP(config.manhole, f, interface='127.0.0.1')
hs.start_listening(config.bind_port, config.unsecure_port) bind_port = config.bind_port
if config.no_tls:
bind_port = None
hs.start_listening(bind_port, config.unsecure_port)
if config.daemonize: if config.daemonize:
print config.pid_file print config.pid_file
......
...@@ -30,6 +30,7 @@ class ServerConfig(Config): ...@@ -30,6 +30,7 @@ class ServerConfig(Config):
self.pid_file = self.abspath(args.pid_file) self.pid_file = self.abspath(args.pid_file)
self.webclient = True self.webclient = True
self.manhole = args.manhole self.manhole = args.manhole
self.no_tls = args.no_tls
if not args.content_addr: if not args.content_addr:
host = args.server_name host = args.server_name
...@@ -67,6 +68,8 @@ class ServerConfig(Config): ...@@ -67,6 +68,8 @@ class ServerConfig(Config):
server_group.add_argument("--content-addr", default=None, server_group.add_argument("--content-addr", default=None,
help="The host and scheme to use for the " help="The host and scheme to use for the "
"content repository") "content repository")
server_group.add_argument("--no-tls", action='store_true',
help="Don't bind to the https port.")
def read_signing_key(self, signing_key_path): def read_signing_key(self, signing_key_path):
signing_keys = self.read_file(signing_key_path, "signing_key") signing_keys = self.read_file(signing_key_path, "signing_key")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment