domain->disabled) { echo "# Domain is disabled\n"; return; } echo $VAR->includeTemplate('domain/service/nginxCachePath.php'); if ($VAR->domain->physicalHosting->ssl) { foreach ($VAR->domain->physicalHosting->ipAddresses as $ipAddress) { if ($ipAddress->defaultDomainId !== $VAR->domain->id) { echo $VAR->includeTemplate('domain/nginxDomainVirtualHost.php', [ 'ssl' => true, 'http2' => $VAR->server->nginx->http2, 'http3' => $VAR->server->nginx->http3 && $VAR->domain->physicalHosting->isNginxHttp3Enabled(), 'frontendPort' => $VAR->server->nginx->httpsPort, 'backendPort' => $VAR->server->webserver->httpsPort, 'documentRoot' => $VAR->domain->physicalHosting->httpsDir, 'ipAddress' => $ipAddress, 'default' => false, ]); } } } foreach ($VAR->domain->physicalHosting->ipAddresses as $ipAddress) { if ($ipAddress->defaultDomainId !== $VAR->domain->id) { echo $VAR->includeTemplate('domain/nginxDomainVirtualHost.php', [ 'ssl' => false, 'http2' => $VAR->server->nginx->http2, 'http3' => $VAR->server->nginx->http3 && $VAR->domain->physicalHosting->isNginxHttp3Enabled(), 'frontendPort' => $VAR->server->nginx->httpPort, 'backendPort' => $VAR->server->webserver->httpPort, 'documentRoot' => $VAR->domain->physicalHosting->httpDir, 'ipAddress' => $ipAddress, 'default' => false, ]); } }