mirror of
https://github.com/digitalocean/nginxconfig.io.git
synced 2025-08-08 22:46:31 +08:00
Match current behaviour for unified + wordpress
This commit is contained in:
@@ -202,7 +202,7 @@ export default (domain, domains, global) => {
|
|||||||
serverConfig.push(['# handle .php', '']);
|
serverConfig.push(['# handle .php', '']);
|
||||||
|
|
||||||
const loc = `location ~ ${domain.routing.legacyPhpRouting.computed ? '[^/]\\.php(/|$)' : '\\.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
|
// Modularized
|
||||||
serverConfig.push([loc, { include: 'nginxconfig.io/php_fastcgi.conf' }]);
|
serverConfig.push([loc, { include: 'nginxconfig.io/php_fastcgi.conf' }]);
|
||||||
} else {
|
} else {
|
||||||
|
@@ -77,6 +77,10 @@ export default (domains, global) => {
|
|||||||
if (domains.some(d => d.php.magentoRules.computed))
|
if (domains.some(d => d.php.magentoRules.computed))
|
||||||
files.push(['nginxconfig.io/magento.conf', toConf(magentoConf())]);
|
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;
|
return files;
|
||||||
|
Reference in New Issue
Block a user