mirror of
https://github.com/digitalocean/nginxconfig.io.git
synced 2025-08-08 20:39:08 +08:00
Include LE in main server block if not forcing HTTPS
This commit is contained in:
@@ -227,6 +227,9 @@ export default (domain, domains, global) => {
|
||||
serverConfig.push(['# additional config', '']);
|
||||
serverConfig.push(['include', 'nginxconfig.io/general.conf']);
|
||||
|
||||
if (!domain.https.forceHttps.computed && domain.https.certType.computed === 'letsEncrypt')
|
||||
serverConfig.push(['include', 'nginxconfig.io/letsencrypt.conf']);
|
||||
|
||||
if (domain.php.wordPressRules.computed) serverConfig.push(['include', 'nginxconfig.io/wordpress.conf']);
|
||||
if (domain.php.drupalRules.computed) serverConfig.push(['include', 'nginxconfig.io/drupal.conf']);
|
||||
if (domain.php.magentoRules.computed) serverConfig.push(['include', 'nginxconfig.io/magento.conf']);
|
||||
@@ -234,6 +237,9 @@ export default (domain, domains, global) => {
|
||||
// Unified
|
||||
serverConfig.push(...Object.entries(generalConf(domains, global)));
|
||||
|
||||
if (!domain.https.forceHttps.computed && domain.https.certType.computed === 'letsEncrypt')
|
||||
serverConfig.push(...Object.entries(letsEncryptConf(global)));
|
||||
|
||||
if (domain.php.wordPressRules.computed) serverConfig.push(...Object.entries(wordPressConf(global)));
|
||||
if (domain.php.drupalRules.computed) serverConfig.push(...Object.entries(drupalConf(global)));
|
||||
if (domain.php.magentoRules.computed) serverConfig.push(...Object.entries(magentoConf()));
|
||||
|
Reference in New Issue
Block a user