summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJon Pugh2018-12-20 16:50:14 (GMT)
committerJon Pugh2018-12-20 16:50:14 (GMT)
commit92d5dc549deca76000f19f9958b7a42e202e192c (patch)
tree77ee3dcc74d12db59e06eeaaa41a2c0823e61ad9
parent53ab435206b384988c337180ba7d850b9849ce95 (diff)
Move parent::write() to the end of the function to the code in write() actually has an effect.3020747-https-check-cert-readable
-rw-r--r--http/Provision/Config/Http/Ssl/Site.php7
1 files changed, 5 insertions, 2 deletions
diff --git a/http/Provision/Config/Http/Ssl/Site.php b/http/Provision/Config/Http/Ssl/Site.php
index bc6e1b1..2170a5a 100644
--- a/http/Provision/Config/Http/Ssl/Site.php
+++ b/http/Provision/Config/Http/Ssl/Site.php
@@ -14,8 +14,6 @@ class Provision_Config_Http_Ssl_Site extends Provision_Config_Http_Site {
public $description = 'encrypted virtual host configuration';
function write() {
- parent::write();
-
if ($this->ssl_enabled && $this->ssl_key) {
$path = dirname($this->data['ssl_cert']);
// Make sure the ssl.d directory in the server ssl.d exists.
@@ -50,6 +48,7 @@ class Provision_Config_Http_Ssl_Site extends Provision_Config_Http_Site {
// If cert is not ok, turn off ssl_redirection.
if ($this->ssl_cert_ok == FALSE) {
$this->data['ssl_redirection'] = FALSE;
+ drush_log(dt('SSL Certificate preparation failed. SSL has been disabled for this site.'), 'warning');
}
// Sync the key directory to the remote server.
@@ -57,6 +56,10 @@ class Provision_Config_Http_Ssl_Site extends Provision_Config_Http_Site {
'exclude' => "{$path}/*.receipt", // Don't need to synch the receipts
));
}
+
+ // Call parent's write AFTER ensuring the certificates are in place to prevent
+ // the vhost from referencing missing files.
+ parent::write();
}
/**