diff --git a/certbot-apache/certbot_apache/http_01.py b/certbot-apache/certbot_apache/http_01.py index ca3248ba0..58d87298c 100644 --- a/certbot-apache/certbot_apache/http_01.py +++ b/certbot-apache/certbot_apache/http_01.py @@ -99,7 +99,7 @@ class ApacheHttp01(common.TLSSNI01): new_conf.write(config_text) def _relevant_vhosts(self): - http01_port = self.configurator.config.http01_port + http01_port = str(self.configurator.config.http01_port) relevant_vhosts = [] for vhost in self.configurator.vhosts: if any(a.is_wildcard() or a.get_port() == http01_port for a in vhost.addrs): diff --git a/certbot-apache/certbot_apache/tests/http_01_test.py b/certbot-apache/certbot_apache/tests/http_01_test.py index 1afaef0c5..346b88387 100644 --- a/certbot-apache/certbot_apache/tests/http_01_test.py +++ b/certbot-apache/certbot_apache/tests/http_01_test.py @@ -141,8 +141,10 @@ class ApacheHttp01Test(util.ApacheTest): self.common_perform_test(achalls, vhosts) def test_no_vhost(self): + for achall in self.achalls: + self.http.add_chall(achall) self.config.config.http01_port = 12345 - self.assertRaises(errors.PluginError, self.http.perform, self.achalls) + self.assertRaises(errors.PluginError, self.http.perform) def common_perform_test(self, achalls, vhosts): """Tests perform with the given achalls."""