Commit 17ecbc80 authored by memtkmcc's avatar memtkmcc

Nginx: sync letsencrypt support in vhost.tpl.php (BOA unfork)

parent 7332e920
<?php
if ($this->redirection) {
$aegir_root = d('@server_master')->aegir_root;
$satellite_mode = d('@server_master')->satellite_mode;
// Redirect all aliases to the main http url using separate vhosts blocks to avoid if{} in Nginx.
foreach ($this->aliases as $alias_url) {
print "# alias redirection virtual host\n";
......@@ -16,6 +18,17 @@ if ($this->redirection) {
print " server_name {$alias_url};\n";
}
print " access_log off;\n";
if ($satellite_mode == 'boa') {
print "\n";
print " ###\n";
print " ### Allow access to letsencrypt.org ACME challenges directory.\n";
print " ###\n";
print " location ^~ /.well-known/acme-challenge {\n";
print " alias {$aegir_root}/tools/le/.acme-challenges;\n";
print " try_files \$uri 404;\n";
print " }\n";
print "\n";
}
print " return 301 \$scheme://{$this->redirection}\$request_uri;\n";
print "}\n";
}
......
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