43 lines
1.6 KiB
PHP
43 lines
1.6 KiB
PHP
<?php
|
|
echo AUTOGENERATED_CONFIGS;
|
|
/** @var Template_VariableAccessor $VAR */
|
|
|
|
if (!$VAR->domain->active) {
|
|
echo "# Domain is disabled or suspended\n";
|
|
return;
|
|
}
|
|
|
|
if ($VAR->domain->forwarding->ssl) {
|
|
foreach ($VAR->domain->forwarding->ipAddresses as $ipAddress) {
|
|
if ($ipAddress->defaultDomainId != $VAR->domain->id) {
|
|
if ($VAR->domain->hasStandardForwarding || $VAR->domain->hasFrameForwarding) {
|
|
echo $VAR->includeTemplate('domain/nginxForwarding.php', [
|
|
'ssl' => true,
|
|
'http2' => $VAR->server->nginx->http2,
|
|
'http3' => $VAR->server->nginx->http3,
|
|
'ipAddress' => $ipAddress,
|
|
'frontendPort' => $VAR->server->nginx->httpsPort,
|
|
'backendPort' => $VAR->server->webserver->httpsPort,
|
|
'default' => false,
|
|
]);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
foreach ($VAR->domain->forwarding->ipAddresses as $ipAddress) {
|
|
if ($ipAddress->defaultDomainId != $VAR->domain->id) {
|
|
if ($VAR->domain->hasStandardForwarding || $VAR->domain->hasFrameForwarding) {
|
|
echo $VAR->includeTemplate('domain/nginxForwarding.php', [
|
|
'ssl' => false,
|
|
'http2' => $VAR->server->nginx->http2,
|
|
'http3' => $VAR->server->nginx->http3,
|
|
'ipAddress' => $ipAddress,
|
|
'frontendPort' => $VAR->server->nginx->httpPort,
|
|
'backendPort' => $VAR->server->webserver->httpPort,
|
|
'default' => false,
|
|
]);
|
|
}
|
|
}
|
|
}
|