<?php foreach ($VAR->domain->wordpressInstances as $wordpress): ?>
    <?php if ($wordpress->isIndexingSecured) : ?>
        location ~* "^/<?php echo $wordpress->location; ?>" {
            <?php echo $VAR->domain->physicalHosting->proxySettings['directoryIndex'] ?>
            autoindex off;
        }
    <?php endif; ?>
<?php endforeach; ?>