Commit efeec84a authored by omega8cc's avatar omega8cc

Nginx: Update vhosts templates to match BOA improvements #unforkboa

parent b51045a0
...@@ -4,12 +4,24 @@ ...@@ -4,12 +4,24 @@
### nginx default ssl server ### nginx default ssl server
####################################################### #######################################################
<?php
$satellite_mode = drush_get_option('satellite_mode');
if (!$satellite_mode && $server->satellite_mode) {
$satellite_mode = $server->satellite_mode;
}
?>
server { server {
<?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; ?>;
<?php endforeach; ?> <?php endforeach; ?>
server_name _; server_name _;
location / { location / {
<?php if ($satellite_mode == 'boa'): ?>
root /var/www/nginx-default;
index index.html index.htm;
<?php else: ?>
return 404; return 404;
<?php endif; ?>
} }
} }
<?php if ($this->ssl_enabled && $this->ssl_key) : ?> <?php if ($this->ssl_enabled && $this->ssl_key) : ?>
<?php
$satellite_mode = drush_get_option('satellite_mode');
if (!$satellite_mode && $server->satellite_mode) {
$satellite_mode = $server->satellite_mode;
}
?>
server { server {
listen <?php print "{$ip_address}:{$http_ssl_port}"; ?>; listen <?php print "{$ip_address}:{$http_ssl_port}"; ?>;
server_name <?php print $this->uri . ' ' . implode(' ', str_replace('/', '.', $this->aliases)); ?>; server_name <?php print $this->uri . ' ' . implode(' ', str_replace('/', '.', $this->aliases)); ?>;
<?php if ($satellite_mode == 'boa'): ?>
root /var/www/nginx-default;
index index.html index.htm;
<?php else: ?>
return 404;
<?php endif; ?>
ssl on; ssl on;
ssl_certificate <?php print $ssl_cert; ?>; ssl_certificate <?php print $ssl_cert; ?>;
ssl_certificate_key <?php print $ssl_cert_key; ?>; ssl_certificate_key <?php print $ssl_cert_key; ?>;
...@@ -11,7 +24,6 @@ server { ...@@ -11,7 +24,6 @@ server {
ssl_ciphers RC4:HIGH:!aNULL:!MD5; ssl_ciphers RC4:HIGH:!aNULL:!MD5;
ssl_prefer_server_ciphers on; ssl_prefer_server_ciphers on;
keepalive_timeout 70; keepalive_timeout 70;
return 404;
### Do not reveal Aegir front-end URL here. ### Do not reveal Aegir front-end URL here.
} }
......
<?php
$satellite_mode = drush_get_option('satellite_mode');
if (!$satellite_mode && $server->satellite_mode) {
$satellite_mode = $server->satellite_mode;
}
?>
location ^~ /<?php print $subdir; ?>/ { location ^~ /<?php print $subdir; ?>/ {
return 404; <?php if ($satellite_mode == 'boa'): ?>
root /var/www/nginx-default;
index index.html index.htm;
<?php else: ?>
return 404;
<?php endif; ?>
### Do not reveal Aegir front-end URL here. ### Do not reveal Aegir front-end URL here.
} }
<?php
$satellite_mode = drush_get_option('satellite_mode');
if (!$satellite_mode && $server->satellite_mode) {
$satellite_mode = $server->satellite_mode;
}
?>
server { server {
listen *:<?php print $http_port; ?>; listen *:<?php print $http_port; ?>;
server_name <?php print $this->uri . ' ' . implode(' ', str_replace('/', '.', $this->aliases)); ?>; server_name <?php print $this->uri . ' ' . implode(' ', str_replace('/', '.', $this->aliases)); ?>;
<?php if ($satellite_mode == 'boa'): ?>
root /var/www/nginx-default;
index index.html index.htm;
<?php else: ?>
return 404; return 404;
<?php endif; ?>
### Do not reveal Aegir front-end URL here. ### Do not reveal Aegir front-end URL here.
} }
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