summary refs log tree commit diff
path: root/synapse
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2014-11-03 15:06:40 +0000
committerErik Johnston <erik@matrix.org>2014-11-03 15:06:40 +0000
commitaf7ae048f8868a58dc1b82a17ca701f28624b065 (patch)
tree04d682ff7a6edb3828bf70117f5b49c31091e227 /synapse
parentRename PDU fields to match that of events. (diff)
downloadsynapse-af7ae048f8868a58dc1b82a17ca701f28624b065.tar.xz
Add option to not bind to HTTPS port. This is useful if running behind an ssl load balancer
Diffstat (limited to 'synapse')
-rwxr-xr-xsynapse/app/homeserver.py5
-rw-r--r--synapse/config/server.py3
2 files changed, 7 insertions, 1 deletions
diff --git a/synapse/app/homeserver.py b/synapse/app/homeserver.py
index 6394bc27d1..a20376b9d6 100755
--- a/synapse/app/homeserver.py
+++ b/synapse/app/homeserver.py
@@ -233,7 +233,10 @@ def setup():
         f.namespace['hs'] = hs
         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:
         print config.pid_file
diff --git a/synapse/config/server.py b/synapse/config/server.py
index 3afda12d5a..814a4c349b 100644
--- a/synapse/config/server.py
+++ b/synapse/config/server.py
@@ -30,6 +30,7 @@ class ServerConfig(Config):
         self.pid_file = self.abspath(args.pid_file)
         self.webclient = True
         self.manhole = args.manhole
+        self.no_tls = args.no_tls
 
         if not args.content_addr:
             host = args.server_name
@@ -67,6 +68,8 @@ class ServerConfig(Config):
         server_group.add_argument("--content-addr", default=None,
                                   help="The host and scheme to use for the "
                                   "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):
         signing_keys = self.read_file(signing_key_path, "signing_key")