From 594e307d2a3bdde901e03246f934d50369f6fabf Mon Sep 17 00:00:00 2001 From: MattIPv4 Date: Tue, 2 Jun 2020 17:08:28 +0100 Subject: [PATCH] Match current behaviour for unified + wordpress --- src/nginxconfig/generators/conf/website.conf.js | 2 +- src/nginxconfig/generators/index.js | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/nginxconfig/generators/conf/website.conf.js b/src/nginxconfig/generators/conf/website.conf.js index 43a7b05..ea01f58 100644 --- a/src/nginxconfig/generators/conf/website.conf.js +++ b/src/nginxconfig/generators/conf/website.conf.js @@ -202,7 +202,7 @@ export default (domain, domains, global) => { serverConfig.push(['# handle .php', '']); const loc = `location ~ ${domain.routing.legacyPhpRouting.computed ? '[^/]\\.php(/|$)' : '\\.php$'}`; - if (global.tools.modularizedStructure.computed) { + if (global.tools.modularizedStructure.computed || domain.php.wordPressRules.computed) { // Modularized serverConfig.push([loc, { include: 'nginxconfig.io/php_fastcgi.conf' }]); } else { diff --git a/src/nginxconfig/generators/index.js b/src/nginxconfig/generators/index.js index 38636f0..d6d61ca 100644 --- a/src/nginxconfig/generators/index.js +++ b/src/nginxconfig/generators/index.js @@ -77,6 +77,10 @@ export default (domains, global) => { if (domains.some(d => d.php.magentoRules.computed)) files.push(['nginxconfig.io/magento.conf', toConf(magentoConf())]); + } else { + // PHP + if (domains.some(d => d.php.wordPressRules.computed)) + files.push(['nginxconfig.io/php_fastcgi.conf', toConf(phpConf(domains, global))]); } return files;