Set the PHP server config per site (#232)

* Set up the php server per site.

* Backwards compatibility logic for old config URLs.

* Remove php global config tab.

* Fix util import in website.conf.js

* Fix eslint fails.

* Move global php i18n keys to domain

* Remove unnecessary domains verification and set fastcgi_pass in unified mode.

* Convert return statement to logic operator in php_ustream.js

* Move php upstream to outside the server blocks

* Remove unnecessary watcher from php domain section

* Fix upstream config context and conditional append

* Separate backwards compatibility logic.

* Remove unused i18n key from php domain and update copyright of these files

* Replace all dots for underscore in php_upstream helper

* Fix missing space and remove upstream comment from php config.

* Fix selects $refs and watch the enable status for phpServer and phpBackupServer.

* Change copyright year for all modified files.

* Backwards compatibility logic for old config URLs after angularBackwardsCompatibility

* Deep merge old php global config from data url, and add safe disable for phpConfigs

* Move deep merge function to new helper

* Fix missing disable wordpressRules  and convert function declaration to arrows in deep merge helper

* Fix missing css class in php domain-section
This commit is contained in:
Atila Silva
2021-02-24 13:20:10 -03:00
committed by GitHub
parent 4cfdcdb8d1
commit 1fb756ca77
29 changed files with 385 additions and 507 deletions

View File

@@ -1,5 +1,5 @@
/*
Copyright 2020 DigitalOcean
Copyright 2021 DigitalOcean
This code is licensed under the MIT License.
You may obtain a copy of the License at
@@ -73,7 +73,7 @@ export default (domains, global) => {
// PHP
if (domains.some(d => d.php.php.computed))
files['nginxconfig.io/php_fastcgi.conf'] = toConf(phpConf(domains, global));
files['nginxconfig.io/php_fastcgi.conf'] = toConf(phpConf(domains));
// Python
if (domains.some(d => d.python.python.computed))
@@ -102,7 +102,7 @@ export default (domains, global) => {
} else {
// PHP
if (domains.some(d => d.php.wordPressRules.computed))
files['nginxconfig.io/php_fastcgi.conf'] = toConf(phpConf(domains, global));
files['nginxconfig.io/php_fastcgi.conf'] = toConf(phpConf(domains));
}
return files;