D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
usr
/
local
/
psa
/
admin
/
conf
/
templates
/
default
/
domain
/
service
/
Filename :
nginxCacheProxy.php
back
Copy
<?php /** * @var Template_VariableAccessor $VAR * @var array $OPT */ ?> <?php if ($VAR->domain->physicalHosting->proxySettings['nginxCacheEnabled']): ?> proxy_cache_key <?=$VAR->quote($VAR->domain->physicalHosting->proxySettings['nginxCacheKey'])?>; proxy_no_cache <?=join(' ', array_filter([ '$no_cache', $VAR->domain->physicalHosting->proxySettings['nginxCacheBypassHeaderNocache'] ? '$http_pragma' : '', $VAR->domain->physicalHosting->proxySettings['nginxCacheBypassHeaderAuth'] ? '$http_authorization' : '', $VAR->domain->physicalHosting->proxySettings['nginxCacheBypassGetNocache'] ? '$arg_nocache' : '', ]))?>; proxy_cache_bypass <?=join(' ', array_filter([ '$no_cache', $VAR->domain->physicalHosting->proxySettings['nginxCacheBypassHeaderNocache'] ? '$http_pragma' : '', $VAR->domain->physicalHosting->proxySettings['nginxCacheBypassHeaderAuth'] ? '$http_authorization' : '', $VAR->domain->physicalHosting->proxySettings['nginxCacheBypassGetNocache'] ? '$arg_nocache' : '', ]))?>; proxy_cache <?="{$VAR->domain->asciiName}_proxy"?>; proxy_cache_valid <?=$VAR->quote($VAR->domain->physicalHosting->proxySettings['nginxCacheTimeout'])?>; proxy_cache_use_stale <?=join(' ', array_merge( $VAR->domain->physicalHosting->proxySettings['nginxCacheUseStale5xx'] ? ['http_500', 'http_502', 'http_503', 'http_504'] : [], $VAR->domain->physicalHosting->proxySettings['nginxCacheUseStale4xx'] ? ['http_403', 'http_404'] : [], $VAR->domain->physicalHosting->proxySettings['nginxCacheUseStaleUpdating'] ? ['updating'] : [] ) ?: ['off'])?>; <?php if ($VAR->domain->physicalHosting->proxySettings['nginxCacheUseStaleUpdating']): ?> proxy_cache_background_update on; <?php endif ?> <?php endif ?>