Commit c4f36c03 authored by anarcat's avatar anarcat Committed by Antoine Beaupre

overwrite the port 80 config if redirection + ssl is enabled, regardless of...

overwrite the port 80 config if redirection + ssl is enabled, regardless of whether or not the file already exists

if we don't do that, the file is never re-written once it's been written once: bad.
parent 2a1c3e8c
......@@ -21,7 +21,10 @@
*/
function provision_ssl_provision_apache_vhost_config($url, $options) {
if (!empty($options['ssl'])) {
if ($options['ssl_redirect'] && provision_path('exists', drush_get_option('vhost_path') . '/' . $url . '_80', FALSE, NULL, dt("The redirection port is not available, no redirection installed"))) {
if ($options['ssl_redirect']) {
// That's pretty bad, but if we *don't* do that, the vhost is never updated after the first write
// XXX: we need a better way to identify if this is legit
provision_path('exists', drush_get_option('vhost_path') . '/' . $url . '_80', FALSE, NULL, dt("Overwriting existing vhost %url:80 with redirection", array('%url' => $url)));
$newoptions = $options;
$newoptions['site_port'] = 80;
_provision_apache_create_config($url . '_80', $newoptions, _provision_apache_redirect_template());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment