diff --git a/helpers/config.py b/helpers/config.py index 0165da7..61a4181 100644 --- a/helpers/config.py +++ b/helpers/config.py @@ -28,9 +28,9 @@ class Config: DEFAULT_PROXY_PORT = "8080" DEFAULT_NGINX_PORT = "80" DEFAULT_NGINX_HTTPS_PORT = "443" - KOBO_DOCKER_BRANCH = 'dynamic-uwsgi-pass-timeout' - KOBO_INSTALL_BRANCH = 'dynamic-uwsgi-pass-timeout' - KOBO_INSTALL_VERSION = '2.4.1' + KOBO_DOCKER_BRANCH = '2.020.24a' + KOBO_INSTALL_BRANCH = 'master' + KOBO_INSTALL_VERSION = '2.4.2' # Maybe overkill. Use this class as a singleton to get the same configuration # for each instantiation. @@ -1364,7 +1364,6 @@ def __questions_reverse_proxy(self): self.__config["use_letsencrypt"] = CLI.get_response([Config.TRUE, Config.FALSE], self.__config.get("use_letsencrypt", Config.TRUE)) self.__config["proxy"] = Config.TRUE - self.__config["block_common_http_ports"] = Config.TRUE self.__config["exposed_nginx_docker_port"] = Config.DEFAULT_NGINX_PORT if self.use_letsencrypt: @@ -1414,6 +1413,12 @@ def __questions_reverse_proxy(self): self.__config["block_common_http_ports"] = CLI.get_response( [Config.TRUE, Config.FALSE], self.__config.get("block_common_http_ports", Config.FALSE)) + else: + self.__config["block_common_http_ports"] = Config.TRUE + + if not self.__is_port_allowed(self.__config["nginx_proxy_port"]): + # Force nginx proxy port if port is not allowed + self.__config["nginx_proxy_port"] = Config.DEFAULT_PROXY_PORT CLI.colored_print("Internal port used by reverse proxy?", CLI.COLOR_SUCCESS) while True: @@ -1424,6 +1429,7 @@ def __questions_reverse_proxy(self): else: CLI.colored_print("Ports 80 and 443 are reserved!", CLI.COLOR_ERROR) else: + self.__config["block_common_http_ports"] = Config.TRUE if not self.use_letsencrypt: CLI.colored_print("Internal port used by reverse proxy is {}.".format( Config.DEFAULT_PROXY_PORT