51 lines
1.7 KiB
PHP
51 lines
1.7 KiB
PHP
<?php
|
|
echo AUTOGENERATED_CONFIGS;
|
|
/** @var Template_VariableAccessor $VAR */
|
|
|
|
if (!$VAR->domain->active) {
|
|
echo "# Domain is disabled or suspended\n";
|
|
return;
|
|
}
|
|
|
|
$ipAddresses = $VAR->server->webserver->listenLocalhost ?
|
|
[$VAR->domain->forwarding->loopbackIpAddress] :
|
|
$VAR->domain->forwarding->ipAddresses;
|
|
|
|
if ($VAR->domain->forwarding->ssl) {
|
|
foreach ($ipAddresses as $ipAddress) {
|
|
if ($ipAddress->defaultDomainId == $VAR->domain->id) {
|
|
if ($VAR->domain->hasStandardForwarding) {
|
|
echo $VAR->includeTemplate('domain/standardForwarding.php', [
|
|
'ssl' => true,
|
|
'serverAdmin' => $VAR->domain->client->email,
|
|
'ipAddress' => $ipAddress,
|
|
]);
|
|
} elseif ($VAR->domain->hasFrameForwarding) {
|
|
echo $VAR->includeTemplate('domain/frameForwarding.php', [
|
|
'ssl' => true,
|
|
'serverAdmin' => $VAR->domain->client->email,
|
|
'ipAddress' => $ipAddress,
|
|
]);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
foreach ($ipAddresses as $ipAddress) {
|
|
if ($ipAddress->defaultDomainId == $VAR->domain->id) {
|
|
if ($VAR->domain->hasStandardForwarding) {
|
|
echo $VAR->includeTemplate('domain/standardForwarding.php', [
|
|
'ssl' => false,
|
|
'serverAdmin' => $VAR->domain->client->email,
|
|
'ipAddress' => $ipAddress,
|
|
]);
|
|
} elseif ($VAR->domain->hasFrameForwarding) {
|
|
echo $VAR->includeTemplate('domain/frameForwarding.php', [
|
|
'ssl' => false,
|
|
'serverAdmin' => $VAR->domain->client->email,
|
|
'ipAddress' => $ipAddress,
|
|
]);
|
|
}
|
|
}
|
|
}
|