Commit 44fc200f authored by omega8cc's avatar omega8cc Committed by memtkmcc

Nginx: Sync SSL server template

parent 5a79b41e
...@@ -9,12 +9,32 @@ $satellite_mode = drush_get_option('satellite_mode'); ...@@ -9,12 +9,32 @@ $satellite_mode = drush_get_option('satellite_mode');
if (!$satellite_mode && $server->satellite_mode) { if (!$satellite_mode && $server->satellite_mode) {
$satellite_mode = $server->satellite_mode; $satellite_mode = $server->satellite_mode;
} }
$nginx_has_http2 = drush_get_option('nginx_has_http2');
if (!$nginx_has_http2 && $server->nginx_has_http2) {
$nginx_has_http2 = $server->nginx_has_http2;
}
if ($nginx_has_http2) {
$ssl_args = "ssl http2";
}
else {
$ssl_args = "ssl";
}
if ($satellite_mode == 'boa') {
$ssl_listen_ip = "*";
}
?> ?>
server { server {
<?php if ($satellite_mode == 'boa'): ?>
listen <?php print "{$ssl_listen_ip}:{$http_ssl_port} {$ssl_args}"; ?>;
<?php else: ?>
<?php foreach ($server->ip_addresses as $ip) :?> <?php foreach ($server->ip_addresses as $ip) :?>
listen <?php print $ip . ':' . $http_ssl_port; ?>; listen <?php print "{$ip}:{$http_ssl_port} {$ssl_args}"; ?>;
<?php endforeach; ?> <?php endforeach; ?>
<?php endif; ?>
server_name _; server_name _;
location / { location / {
<?php if ($satellite_mode == 'boa'): ?> <?php if ($satellite_mode == 'boa'): ?>
......
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