D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
opt
/
psa
/
admin
/
conf
/
templates
/
default
/
Filename :
nginxDomainVhost.php
back
Copy
<?php echo AUTOGENERATED_CONFIGS; /** @var Template_VariableAccessor $VAR */ if ($VAR->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, '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, 'frontendPort' => $VAR->server->nginx->httpPort, 'backendPort' => $VAR->server->webserver->httpPort, 'documentRoot' => $VAR->domain->physicalHosting->httpDir, 'ipAddress' => $ipAddress, 'default' => false, ]); } }