mirror of
https://github.com/certbot/certbot.git
synced 2026-08-01 02:44:21 +02:00
Remove existing SSL directives for SSL vhosts
This commit is contained in:
@@ -265,6 +265,12 @@ class ApacheConfigurator(augeas_configurator.AugeasConfigurator):
|
|||||||
# Try to find a reasonable vhost
|
# Try to find a reasonable vhost
|
||||||
vhost = self._find_best_vhost(target_name)
|
vhost = self._find_best_vhost(target_name)
|
||||||
if vhost is not None:
|
if vhost is not None:
|
||||||
|
if vhost.ssl:
|
||||||
|
# remove existing SSL directives (minus the ones we'll use anyway,
|
||||||
|
# since we want to preserve order)
|
||||||
|
self._remove_existing_ssl_directives(
|
||||||
|
vhost,
|
||||||
|
minus=['SSLCertificatePath', 'SSLCertificateKeyFile'])
|
||||||
if not vhost.ssl:
|
if not vhost.ssl:
|
||||||
vhost = self.make_vhost_ssl(vhost)
|
vhost = self.make_vhost_ssl(vhost)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user