Commit 9b860383 authored by ergonlogic's avatar ergonlogic

use proper IP address in SSL site template

we used to take only the first IP that was set in the server context.

instead we just don't set those IPs in the server context, as they date back
from when we had IP-based virtual hosting even on port 80, and set it properly
in the site context
parent 04130c3e
......@@ -19,19 +19,6 @@ class Provision_Service_http_public extends Provision_Service_http {
$data['http_port'] = $this->server->http_port;
// We assign this generic catch all for standard http.
// The SSL based services will override this with the
// correct ip address.
if (sizeof($this->server->ip_addresses)) {
// Use the first IP address for all standard virtual hosts.
$data['ip_address'] = $this->server->ip_addresses[0];
}
else {
// If no external ip addresses are defined, we fall back on *:port
// There will be no SSL , so that's fine.
$data['ip_address'] = '*';
}
// TODO: move away from drush_get_context entirely.
if ($config == 'site') {
......
......@@ -47,7 +47,7 @@ class Provision_Service_http_ssl extends Provision_Service_http_public {
$data['http_ssl_port'] = $this->server->http_ssl_port;
if ($config == 'site' && $this->context->ssl_enabled) {
$data['ip_address'] = $this->context->ip_address;
if ($this->context->ssl_enabled == 2) {
$data['ssl_redirection'] = TRUE;
$data['redirect_url'] = "https://{$this->context->uri}";
......
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