From b0eeb9b836d516d323f44c1b6f3d710a513a60b7 Mon Sep 17 00:00:00 2001 From: cytopia Date: Sat, 4 Aug 2018 00:50:36 +0200 Subject: [PATCH 01/25] Generalize php.ini default configuration --- cfg/php-ini-5.2/.keepme | 0 cfg/php-ini-5.2/README.md | 26 +++++++++ cfg/php-ini-5.2/devilbox-php.ini-default | 63 ++++++++++++++++++++ cfg/php-ini-5.2/devilbox-php.ini-xdebug | 36 ++++++++++++ cfg/php-ini-5.3/README.md | 26 +++++++++ cfg/php-ini-5.3/devilbox-custom.ini-example | 18 ------ cfg/php-ini-5.3/devilbox-php.ini-default | 63 ++++++++++++++++++++ cfg/php-ini-5.3/devilbox-php.ini-xdebug | 36 ++++++++++++ cfg/php-ini-5.4/README.md | 26 +++++++++ cfg/php-ini-5.4/devilbox-custom.ini-example | 18 ------ cfg/php-ini-5.4/devilbox-php.ini-default | 64 +++++++++++++++++++++ cfg/php-ini-5.4/devilbox-php.ini-xdebug | 36 ++++++++++++ cfg/php-ini-5.5/README.md | 26 +++++++++ cfg/php-ini-5.5/devilbox-custom.ini-example | 18 ------ cfg/php-ini-5.5/devilbox-php.ini-default | 64 +++++++++++++++++++++ cfg/php-ini-5.5/devilbox-php.ini-xdebug | 36 ++++++++++++ cfg/php-ini-5.6/README.md | 26 +++++++++ cfg/php-ini-5.6/devilbox-custom.ini-example | 18 ------ cfg/php-ini-5.6/devilbox-php.ini-default | 64 +++++++++++++++++++++ cfg/php-ini-5.6/devilbox-php.ini-xdebug | 36 ++++++++++++ cfg/php-ini-7.0/README.md | 26 +++++++++ cfg/php-ini-7.0/devilbox-custom.ini-example | 18 ------ cfg/php-ini-7.0/devilbox-php.ini-default | 64 +++++++++++++++++++++ cfg/php-ini-7.0/devilbox-php.ini-xdebug | 36 ++++++++++++ cfg/php-ini-7.1/README.md | 26 +++++++++ cfg/php-ini-7.1/devilbox-custom.ini-example | 18 ------ cfg/php-ini-7.1/devilbox-php.ini-default | 64 +++++++++++++++++++++ cfg/php-ini-7.1/devilbox-php.ini-xdebug | 36 ++++++++++++ cfg/php-ini-7.2/README.md | 26 +++++++++ cfg/php-ini-7.2/devilbox-custom.ini-example | 18 ------ cfg/php-ini-7.2/devilbox-php.ini-default | 63 ++++++++++++++++++++ cfg/php-ini-7.2/devilbox-php.ini-xdebug | 36 ++++++++++++ cfg/php-ini-7.3/README.md | 26 +++++++++ cfg/php-ini-7.3/devilbox-custom.ini-example | 18 ------ cfg/php-ini-7.3/devilbox-php.ini-default | 63 ++++++++++++++++++++ cfg/php-ini-7.3/devilbox-php.ini-xdebug | 36 ++++++++++++ 36 files changed, 1130 insertions(+), 144 deletions(-) create mode 100644 cfg/php-ini-5.2/.keepme create mode 100644 cfg/php-ini-5.2/README.md create mode 100644 cfg/php-ini-5.2/devilbox-php.ini-default create mode 100644 cfg/php-ini-5.2/devilbox-php.ini-xdebug create mode 100644 cfg/php-ini-5.3/README.md delete mode 100644 cfg/php-ini-5.3/devilbox-custom.ini-example create mode 100644 cfg/php-ini-5.3/devilbox-php.ini-default create mode 100644 cfg/php-ini-5.3/devilbox-php.ini-xdebug create mode 100644 cfg/php-ini-5.4/README.md delete mode 100644 cfg/php-ini-5.4/devilbox-custom.ini-example create mode 100644 cfg/php-ini-5.4/devilbox-php.ini-default create mode 100644 cfg/php-ini-5.4/devilbox-php.ini-xdebug create mode 100644 cfg/php-ini-5.5/README.md delete mode 100644 cfg/php-ini-5.5/devilbox-custom.ini-example create mode 100644 cfg/php-ini-5.5/devilbox-php.ini-default create mode 100644 cfg/php-ini-5.5/devilbox-php.ini-xdebug create mode 100644 cfg/php-ini-5.6/README.md delete mode 100644 cfg/php-ini-5.6/devilbox-custom.ini-example create mode 100644 cfg/php-ini-5.6/devilbox-php.ini-default create mode 100644 cfg/php-ini-5.6/devilbox-php.ini-xdebug create mode 100644 cfg/php-ini-7.0/README.md delete mode 100644 cfg/php-ini-7.0/devilbox-custom.ini-example create mode 100644 cfg/php-ini-7.0/devilbox-php.ini-default create mode 100644 cfg/php-ini-7.0/devilbox-php.ini-xdebug create mode 100644 cfg/php-ini-7.1/README.md delete mode 100644 cfg/php-ini-7.1/devilbox-custom.ini-example create mode 100644 cfg/php-ini-7.1/devilbox-php.ini-default create mode 100644 cfg/php-ini-7.1/devilbox-php.ini-xdebug create mode 100644 cfg/php-ini-7.2/README.md delete mode 100644 cfg/php-ini-7.2/devilbox-custom.ini-example create mode 100644 cfg/php-ini-7.2/devilbox-php.ini-default create mode 100644 cfg/php-ini-7.2/devilbox-php.ini-xdebug create mode 100644 cfg/php-ini-7.3/README.md delete mode 100644 cfg/php-ini-7.3/devilbox-custom.ini-example create mode 100644 cfg/php-ini-7.3/devilbox-php.ini-default create mode 100644 cfg/php-ini-7.3/devilbox-php.ini-xdebug diff --git a/cfg/php-ini-5.2/.keepme b/cfg/php-ini-5.2/.keepme new file mode 100644 index 00000000..e69de29b diff --git a/cfg/php-ini-5.2/README.md b/cfg/php-ini-5.2/README.md new file mode 100644 index 00000000..b967fcaa --- /dev/null +++ b/cfg/php-ini-5.2/README.md @@ -0,0 +1,26 @@ +# PHP ini directory + +## General + +* Add you custom php.ini files into this directory. +* Only files ending by `.ini` will be enabled +* Only files ending by `.ini` are ignored by git + + +## Example files + +This directory also holds two example files: + +| File | Description | +|----------------------------|-----------------------------------------| +| `devilbox-php.ini-default` | Represents current PHP default settings | +| `devilbox-php.ini-xdebug ` | Example settings for Xdebug | + +* Do not edit these example files! +* Copy them to a new file (in case you want to use them) + + +## Overwriting + +If multiple `.ini` files are present in this directory specifying different values for the +same settings, the last file (alphabetically by filename) will overwrite any previous values. diff --git a/cfg/php-ini-5.2/devilbox-php.ini-default b/cfg/php-ini-5.2/devilbox-php.ini-default new file mode 100644 index 00000000..598c6ec7 --- /dev/null +++ b/cfg/php-ini-5.2/devilbox-php.ini-default @@ -0,0 +1,63 @@ +; ############################################################ +; # Devilbox php.ini: Current default settings +; ############################################################ +; +; Information +; ----------- +; * Do not edit this file (it belongs to git) +; * This file shows example settings that are currently effective +; * If this file is enabled, nothing will change as it reflects the current default settings +; +; How to enable? +; -------------- +; * Copy this file to another file with ".ini" extension +; * Only files with ".ini" extensions will be applied by PHP + + + +; +; PHP.ini configuration +; +[PHP] + +; Memory +; Note: "memory_limit" should be larger than "post_max_size" +memory_limit = 512M + + +; Timeouts +max_execution_time = 120 +max_input_time = 120 + + +; Uploads +; Note: "post_max_size" should be greater than "upload_max_filesize" +post_max_size = 72M +upload_max_filesize = 64M +max_file_uploads = 20 + + +; Vars +variables_order = EGPCS +max_input_nesting_level = 64 + + +; Error reporting +; Note: error_log is dynamic and handled during start to set appropriate setting +error_reporting = E_ALL | E_NOTICE | E_STRICT | E_DEPRECATED +xmlrpc_errors = Off +report_memleaks = On +display_errors = On +display_startup_errors = On +track_errors = On +log_errors = On +html_errors = On + + +; Xdebug settings +xdebug.default_enable = Off +xdebug.profiler_enable = Off +xdebug.remote_enable = Off +xdebug.remote_autostart = Off + +; vim: set ft=dosini: diff --git a/cfg/php-ini-5.2/devilbox-php.ini-xdebug b/cfg/php-ini-5.2/devilbox-php.ini-xdebug new file mode 100644 index 00000000..d3e977b5 --- /dev/null +++ b/cfg/php-ini-5.2/devilbox-php.ini-xdebug @@ -0,0 +1,36 @@ +; ############################################################ +; # Devilbox php.ini: Xdebug example +; ############################################################ +; +; Information +; ----------- +; * Do not edit this file (it belongs to git) +; * This file show a possible Xdebug example configuration +; * If this file is enabled, it will overwrite the current Xdebug settings +; +; How to enable? +; -------------- +; * Copy this file to another file with ".ini" extension +; * Only files with ".ini" extensions will be applied by PHP + + + +; +; PHP.ini configuration +; +[PHP] + +; Xdebug +; Use these settings to enable Xdebug for PHP +; Make sure to read up on Xdebug some settings might significantly slow down requests. +; The following is just an example configuration and should be adjusted +xdebug.default_enable = On +xdebug.profiler_enable = On +xdebug.remote_enable = On +xdebug.remote_autostart = On +xdebug.remote_handler = dbgp +xdebug.remote_port = 9000 +xdebug.idekey = PHPSTORM +xdebug.remote_log = /var/log/php/xdebug.log + +; vim: set ft=dosini: diff --git a/cfg/php-ini-5.3/README.md b/cfg/php-ini-5.3/README.md new file mode 100644 index 00000000..b967fcaa --- /dev/null +++ b/cfg/php-ini-5.3/README.md @@ -0,0 +1,26 @@ +# PHP ini directory + +## General + +* Add you custom php.ini files into this directory. +* Only files ending by `.ini` will be enabled +* Only files ending by `.ini` are ignored by git + + +## Example files + +This directory also holds two example files: + +| File | Description | +|----------------------------|-----------------------------------------| +| `devilbox-php.ini-default` | Represents current PHP default settings | +| `devilbox-php.ini-xdebug ` | Example settings for Xdebug | + +* Do not edit these example files! +* Copy them to a new file (in case you want to use them) + + +## Overwriting + +If multiple `.ini` files are present in this directory specifying different values for the +same settings, the last file (alphabetically by filename) will overwrite any previous values. diff --git a/cfg/php-ini-5.3/devilbox-custom.ini-example b/cfg/php-ini-5.3/devilbox-custom.ini-example deleted file mode 100644 index 0d74166d..00000000 --- a/cfg/php-ini-5.3/devilbox-custom.ini-example +++ /dev/null @@ -1,18 +0,0 @@ -[PHP] -; Memory -memory_limit = 4096M - -; Timeouts -max_execution_time = 180 -max_input_time = 180 -; Uploads -post_max_size = 1990M -upload_max_filesize = 1990M - -; Vars -max_input_vars = 8000 - -; Error reporting -error_reporting = E_ALL -display_errors = On -track_errors = On diff --git a/cfg/php-ini-5.3/devilbox-php.ini-default b/cfg/php-ini-5.3/devilbox-php.ini-default new file mode 100644 index 00000000..598c6ec7 --- /dev/null +++ b/cfg/php-ini-5.3/devilbox-php.ini-default @@ -0,0 +1,63 @@ +; ############################################################ +; # Devilbox php.ini: Current default settings +; ############################################################ +; +; Information +; ----------- +; * Do not edit this file (it belongs to git) +; * This file shows example settings that are currently effective +; * If this file is enabled, nothing will change as it reflects the current default settings +; +; How to enable? +; -------------- +; * Copy this file to another file with ".ini" extension +; * Only files with ".ini" extensions will be applied by PHP + + + +; +; PHP.ini configuration +; +[PHP] + +; Memory +; Note: "memory_limit" should be larger than "post_max_size" +memory_limit = 512M + + +; Timeouts +max_execution_time = 120 +max_input_time = 120 + + +; Uploads +; Note: "post_max_size" should be greater than "upload_max_filesize" +post_max_size = 72M +upload_max_filesize = 64M +max_file_uploads = 20 + + +; Vars +variables_order = EGPCS +max_input_nesting_level = 64 + + +; Error reporting +; Note: error_log is dynamic and handled during start to set appropriate setting +error_reporting = E_ALL | E_NOTICE | E_STRICT | E_DEPRECATED +xmlrpc_errors = Off +report_memleaks = On +display_errors = On +display_startup_errors = On +track_errors = On +log_errors = On +html_errors = On + + +; Xdebug settings +xdebug.default_enable = Off +xdebug.profiler_enable = Off +xdebug.remote_enable = Off +xdebug.remote_autostart = Off + +; vim: set ft=dosini: diff --git a/cfg/php-ini-5.3/devilbox-php.ini-xdebug b/cfg/php-ini-5.3/devilbox-php.ini-xdebug new file mode 100644 index 00000000..d3e977b5 --- /dev/null +++ b/cfg/php-ini-5.3/devilbox-php.ini-xdebug @@ -0,0 +1,36 @@ +; ############################################################ +; # Devilbox php.ini: Xdebug example +; ############################################################ +; +; Information +; ----------- +; * Do not edit this file (it belongs to git) +; * This file show a possible Xdebug example configuration +; * If this file is enabled, it will overwrite the current Xdebug settings +; +; How to enable? +; -------------- +; * Copy this file to another file with ".ini" extension +; * Only files with ".ini" extensions will be applied by PHP + + + +; +; PHP.ini configuration +; +[PHP] + +; Xdebug +; Use these settings to enable Xdebug for PHP +; Make sure to read up on Xdebug some settings might significantly slow down requests. +; The following is just an example configuration and should be adjusted +xdebug.default_enable = On +xdebug.profiler_enable = On +xdebug.remote_enable = On +xdebug.remote_autostart = On +xdebug.remote_handler = dbgp +xdebug.remote_port = 9000 +xdebug.idekey = PHPSTORM +xdebug.remote_log = /var/log/php/xdebug.log + +; vim: set ft=dosini: diff --git a/cfg/php-ini-5.4/README.md b/cfg/php-ini-5.4/README.md new file mode 100644 index 00000000..b967fcaa --- /dev/null +++ b/cfg/php-ini-5.4/README.md @@ -0,0 +1,26 @@ +# PHP ini directory + +## General + +* Add you custom php.ini files into this directory. +* Only files ending by `.ini` will be enabled +* Only files ending by `.ini` are ignored by git + + +## Example files + +This directory also holds two example files: + +| File | Description | +|----------------------------|-----------------------------------------| +| `devilbox-php.ini-default` | Represents current PHP default settings | +| `devilbox-php.ini-xdebug ` | Example settings for Xdebug | + +* Do not edit these example files! +* Copy them to a new file (in case you want to use them) + + +## Overwriting + +If multiple `.ini` files are present in this directory specifying different values for the +same settings, the last file (alphabetically by filename) will overwrite any previous values. diff --git a/cfg/php-ini-5.4/devilbox-custom.ini-example b/cfg/php-ini-5.4/devilbox-custom.ini-example deleted file mode 100644 index 0d74166d..00000000 --- a/cfg/php-ini-5.4/devilbox-custom.ini-example +++ /dev/null @@ -1,18 +0,0 @@ -[PHP] -; Memory -memory_limit = 4096M - -; Timeouts -max_execution_time = 180 -max_input_time = 180 -; Uploads -post_max_size = 1990M -upload_max_filesize = 1990M - -; Vars -max_input_vars = 8000 - -; Error reporting -error_reporting = E_ALL -display_errors = On -track_errors = On diff --git a/cfg/php-ini-5.4/devilbox-php.ini-default b/cfg/php-ini-5.4/devilbox-php.ini-default new file mode 100644 index 00000000..a12e5f32 --- /dev/null +++ b/cfg/php-ini-5.4/devilbox-php.ini-default @@ -0,0 +1,64 @@ +; ############################################################ +; # Devilbox php.ini: Current default settings +; ############################################################ +; +; Information +; ----------- +; * Do not edit this file (it belongs to git) +; * This file shows example settings that are currently effective +; * If this file is enabled, nothing will change as it reflects the current default settings +; +; How to enable? +; -------------- +; * Copy this file to another file with ".ini" extension +; * Only files with ".ini" extensions will be applied by PHP + + + +; +; PHP.ini configuration +; +[PHP] + +; Memory +; Note: "memory_limit" should be larger than "post_max_size" +memory_limit = 512M + + +; Timeouts +max_execution_time = 120 +max_input_time = 120 + + +; Uploads +; Note: "post_max_size" should be greater than "upload_max_filesize" +post_max_size = 72M +upload_max_filesize = 64M +max_file_uploads = 20 + + +; Vars +variables_order = EGPCS +max_input_vars = 8000 +max_input_nesting_level = 64 + + +; Error reporting +; Note: error_log is dynamic and handled during start to set appropriate setting +error_reporting = E_ALL | E_NOTICE | E_STRICT | E_DEPRECATED +xmlrpc_errors = Off +report_memleaks = On +display_errors = On +display_startup_errors = On +track_errors = On +log_errors = On +html_errors = On + + +; Xdebug settings +xdebug.default_enable = Off +xdebug.profiler_enable = Off +xdebug.remote_enable = Off +xdebug.remote_autostart = Off + +; vim: set ft=dosini: diff --git a/cfg/php-ini-5.4/devilbox-php.ini-xdebug b/cfg/php-ini-5.4/devilbox-php.ini-xdebug new file mode 100644 index 00000000..d3e977b5 --- /dev/null +++ b/cfg/php-ini-5.4/devilbox-php.ini-xdebug @@ -0,0 +1,36 @@ +; ############################################################ +; # Devilbox php.ini: Xdebug example +; ############################################################ +; +; Information +; ----------- +; * Do not edit this file (it belongs to git) +; * This file show a possible Xdebug example configuration +; * If this file is enabled, it will overwrite the current Xdebug settings +; +; How to enable? +; -------------- +; * Copy this file to another file with ".ini" extension +; * Only files with ".ini" extensions will be applied by PHP + + + +; +; PHP.ini configuration +; +[PHP] + +; Xdebug +; Use these settings to enable Xdebug for PHP +; Make sure to read up on Xdebug some settings might significantly slow down requests. +; The following is just an example configuration and should be adjusted +xdebug.default_enable = On +xdebug.profiler_enable = On +xdebug.remote_enable = On +xdebug.remote_autostart = On +xdebug.remote_handler = dbgp +xdebug.remote_port = 9000 +xdebug.idekey = PHPSTORM +xdebug.remote_log = /var/log/php/xdebug.log + +; vim: set ft=dosini: diff --git a/cfg/php-ini-5.5/README.md b/cfg/php-ini-5.5/README.md new file mode 100644 index 00000000..b967fcaa --- /dev/null +++ b/cfg/php-ini-5.5/README.md @@ -0,0 +1,26 @@ +# PHP ini directory + +## General + +* Add you custom php.ini files into this directory. +* Only files ending by `.ini` will be enabled +* Only files ending by `.ini` are ignored by git + + +## Example files + +This directory also holds two example files: + +| File | Description | +|----------------------------|-----------------------------------------| +| `devilbox-php.ini-default` | Represents current PHP default settings | +| `devilbox-php.ini-xdebug ` | Example settings for Xdebug | + +* Do not edit these example files! +* Copy them to a new file (in case you want to use them) + + +## Overwriting + +If multiple `.ini` files are present in this directory specifying different values for the +same settings, the last file (alphabetically by filename) will overwrite any previous values. diff --git a/cfg/php-ini-5.5/devilbox-custom.ini-example b/cfg/php-ini-5.5/devilbox-custom.ini-example deleted file mode 100644 index 0d74166d..00000000 --- a/cfg/php-ini-5.5/devilbox-custom.ini-example +++ /dev/null @@ -1,18 +0,0 @@ -[PHP] -; Memory -memory_limit = 4096M - -; Timeouts -max_execution_time = 180 -max_input_time = 180 -; Uploads -post_max_size = 1990M -upload_max_filesize = 1990M - -; Vars -max_input_vars = 8000 - -; Error reporting -error_reporting = E_ALL -display_errors = On -track_errors = On diff --git a/cfg/php-ini-5.5/devilbox-php.ini-default b/cfg/php-ini-5.5/devilbox-php.ini-default new file mode 100644 index 00000000..a12e5f32 --- /dev/null +++ b/cfg/php-ini-5.5/devilbox-php.ini-default @@ -0,0 +1,64 @@ +; ############################################################ +; # Devilbox php.ini: Current default settings +; ############################################################ +; +; Information +; ----------- +; * Do not edit this file (it belongs to git) +; * This file shows example settings that are currently effective +; * If this file is enabled, nothing will change as it reflects the current default settings +; +; How to enable? +; -------------- +; * Copy this file to another file with ".ini" extension +; * Only files with ".ini" extensions will be applied by PHP + + + +; +; PHP.ini configuration +; +[PHP] + +; Memory +; Note: "memory_limit" should be larger than "post_max_size" +memory_limit = 512M + + +; Timeouts +max_execution_time = 120 +max_input_time = 120 + + +; Uploads +; Note: "post_max_size" should be greater than "upload_max_filesize" +post_max_size = 72M +upload_max_filesize = 64M +max_file_uploads = 20 + + +; Vars +variables_order = EGPCS +max_input_vars = 8000 +max_input_nesting_level = 64 + + +; Error reporting +; Note: error_log is dynamic and handled during start to set appropriate setting +error_reporting = E_ALL | E_NOTICE | E_STRICT | E_DEPRECATED +xmlrpc_errors = Off +report_memleaks = On +display_errors = On +display_startup_errors = On +track_errors = On +log_errors = On +html_errors = On + + +; Xdebug settings +xdebug.default_enable = Off +xdebug.profiler_enable = Off +xdebug.remote_enable = Off +xdebug.remote_autostart = Off + +; vim: set ft=dosini: diff --git a/cfg/php-ini-5.5/devilbox-php.ini-xdebug b/cfg/php-ini-5.5/devilbox-php.ini-xdebug new file mode 100644 index 00000000..d3e977b5 --- /dev/null +++ b/cfg/php-ini-5.5/devilbox-php.ini-xdebug @@ -0,0 +1,36 @@ +; ############################################################ +; # Devilbox php.ini: Xdebug example +; ############################################################ +; +; Information +; ----------- +; * Do not edit this file (it belongs to git) +; * This file show a possible Xdebug example configuration +; * If this file is enabled, it will overwrite the current Xdebug settings +; +; How to enable? +; -------------- +; * Copy this file to another file with ".ini" extension +; * Only files with ".ini" extensions will be applied by PHP + + + +; +; PHP.ini configuration +; +[PHP] + +; Xdebug +; Use these settings to enable Xdebug for PHP +; Make sure to read up on Xdebug some settings might significantly slow down requests. +; The following is just an example configuration and should be adjusted +xdebug.default_enable = On +xdebug.profiler_enable = On +xdebug.remote_enable = On +xdebug.remote_autostart = On +xdebug.remote_handler = dbgp +xdebug.remote_port = 9000 +xdebug.idekey = PHPSTORM +xdebug.remote_log = /var/log/php/xdebug.log + +; vim: set ft=dosini: diff --git a/cfg/php-ini-5.6/README.md b/cfg/php-ini-5.6/README.md new file mode 100644 index 00000000..b967fcaa --- /dev/null +++ b/cfg/php-ini-5.6/README.md @@ -0,0 +1,26 @@ +# PHP ini directory + +## General + +* Add you custom php.ini files into this directory. +* Only files ending by `.ini` will be enabled +* Only files ending by `.ini` are ignored by git + + +## Example files + +This directory also holds two example files: + +| File | Description | +|----------------------------|-----------------------------------------| +| `devilbox-php.ini-default` | Represents current PHP default settings | +| `devilbox-php.ini-xdebug ` | Example settings for Xdebug | + +* Do not edit these example files! +* Copy them to a new file (in case you want to use them) + + +## Overwriting + +If multiple `.ini` files are present in this directory specifying different values for the +same settings, the last file (alphabetically by filename) will overwrite any previous values. diff --git a/cfg/php-ini-5.6/devilbox-custom.ini-example b/cfg/php-ini-5.6/devilbox-custom.ini-example deleted file mode 100644 index 0d74166d..00000000 --- a/cfg/php-ini-5.6/devilbox-custom.ini-example +++ /dev/null @@ -1,18 +0,0 @@ -[PHP] -; Memory -memory_limit = 4096M - -; Timeouts -max_execution_time = 180 -max_input_time = 180 -; Uploads -post_max_size = 1990M -upload_max_filesize = 1990M - -; Vars -max_input_vars = 8000 - -; Error reporting -error_reporting = E_ALL -display_errors = On -track_errors = On diff --git a/cfg/php-ini-5.6/devilbox-php.ini-default b/cfg/php-ini-5.6/devilbox-php.ini-default new file mode 100644 index 00000000..a12e5f32 --- /dev/null +++ b/cfg/php-ini-5.6/devilbox-php.ini-default @@ -0,0 +1,64 @@ +; ############################################################ +; # Devilbox php.ini: Current default settings +; ############################################################ +; +; Information +; ----------- +; * Do not edit this file (it belongs to git) +; * This file shows example settings that are currently effective +; * If this file is enabled, nothing will change as it reflects the current default settings +; +; How to enable? +; -------------- +; * Copy this file to another file with ".ini" extension +; * Only files with ".ini" extensions will be applied by PHP + + + +; +; PHP.ini configuration +; +[PHP] + +; Memory +; Note: "memory_limit" should be larger than "post_max_size" +memory_limit = 512M + + +; Timeouts +max_execution_time = 120 +max_input_time = 120 + + +; Uploads +; Note: "post_max_size" should be greater than "upload_max_filesize" +post_max_size = 72M +upload_max_filesize = 64M +max_file_uploads = 20 + + +; Vars +variables_order = EGPCS +max_input_vars = 8000 +max_input_nesting_level = 64 + + +; Error reporting +; Note: error_log is dynamic and handled during start to set appropriate setting +error_reporting = E_ALL | E_NOTICE | E_STRICT | E_DEPRECATED +xmlrpc_errors = Off +report_memleaks = On +display_errors = On +display_startup_errors = On +track_errors = On +log_errors = On +html_errors = On + + +; Xdebug settings +xdebug.default_enable = Off +xdebug.profiler_enable = Off +xdebug.remote_enable = Off +xdebug.remote_autostart = Off + +; vim: set ft=dosini: diff --git a/cfg/php-ini-5.6/devilbox-php.ini-xdebug b/cfg/php-ini-5.6/devilbox-php.ini-xdebug new file mode 100644 index 00000000..d3e977b5 --- /dev/null +++ b/cfg/php-ini-5.6/devilbox-php.ini-xdebug @@ -0,0 +1,36 @@ +; ############################################################ +; # Devilbox php.ini: Xdebug example +; ############################################################ +; +; Information +; ----------- +; * Do not edit this file (it belongs to git) +; * This file show a possible Xdebug example configuration +; * If this file is enabled, it will overwrite the current Xdebug settings +; +; How to enable? +; -------------- +; * Copy this file to another file with ".ini" extension +; * Only files with ".ini" extensions will be applied by PHP + + + +; +; PHP.ini configuration +; +[PHP] + +; Xdebug +; Use these settings to enable Xdebug for PHP +; Make sure to read up on Xdebug some settings might significantly slow down requests. +; The following is just an example configuration and should be adjusted +xdebug.default_enable = On +xdebug.profiler_enable = On +xdebug.remote_enable = On +xdebug.remote_autostart = On +xdebug.remote_handler = dbgp +xdebug.remote_port = 9000 +xdebug.idekey = PHPSTORM +xdebug.remote_log = /var/log/php/xdebug.log + +; vim: set ft=dosini: diff --git a/cfg/php-ini-7.0/README.md b/cfg/php-ini-7.0/README.md new file mode 100644 index 00000000..b967fcaa --- /dev/null +++ b/cfg/php-ini-7.0/README.md @@ -0,0 +1,26 @@ +# PHP ini directory + +## General + +* Add you custom php.ini files into this directory. +* Only files ending by `.ini` will be enabled +* Only files ending by `.ini` are ignored by git + + +## Example files + +This directory also holds two example files: + +| File | Description | +|----------------------------|-----------------------------------------| +| `devilbox-php.ini-default` | Represents current PHP default settings | +| `devilbox-php.ini-xdebug ` | Example settings for Xdebug | + +* Do not edit these example files! +* Copy them to a new file (in case you want to use them) + + +## Overwriting + +If multiple `.ini` files are present in this directory specifying different values for the +same settings, the last file (alphabetically by filename) will overwrite any previous values. diff --git a/cfg/php-ini-7.0/devilbox-custom.ini-example b/cfg/php-ini-7.0/devilbox-custom.ini-example deleted file mode 100644 index 0d74166d..00000000 --- a/cfg/php-ini-7.0/devilbox-custom.ini-example +++ /dev/null @@ -1,18 +0,0 @@ -[PHP] -; Memory -memory_limit = 4096M - -; Timeouts -max_execution_time = 180 -max_input_time = 180 -; Uploads -post_max_size = 1990M -upload_max_filesize = 1990M - -; Vars -max_input_vars = 8000 - -; Error reporting -error_reporting = E_ALL -display_errors = On -track_errors = On diff --git a/cfg/php-ini-7.0/devilbox-php.ini-default b/cfg/php-ini-7.0/devilbox-php.ini-default new file mode 100644 index 00000000..a12e5f32 --- /dev/null +++ b/cfg/php-ini-7.0/devilbox-php.ini-default @@ -0,0 +1,64 @@ +; ############################################################ +; # Devilbox php.ini: Current default settings +; ############################################################ +; +; Information +; ----------- +; * Do not edit this file (it belongs to git) +; * This file shows example settings that are currently effective +; * If this file is enabled, nothing will change as it reflects the current default settings +; +; How to enable? +; -------------- +; * Copy this file to another file with ".ini" extension +; * Only files with ".ini" extensions will be applied by PHP + + + +; +; PHP.ini configuration +; +[PHP] + +; Memory +; Note: "memory_limit" should be larger than "post_max_size" +memory_limit = 512M + + +; Timeouts +max_execution_time = 120 +max_input_time = 120 + + +; Uploads +; Note: "post_max_size" should be greater than "upload_max_filesize" +post_max_size = 72M +upload_max_filesize = 64M +max_file_uploads = 20 + + +; Vars +variables_order = EGPCS +max_input_vars = 8000 +max_input_nesting_level = 64 + + +; Error reporting +; Note: error_log is dynamic and handled during start to set appropriate setting +error_reporting = E_ALL | E_NOTICE | E_STRICT | E_DEPRECATED +xmlrpc_errors = Off +report_memleaks = On +display_errors = On +display_startup_errors = On +track_errors = On +log_errors = On +html_errors = On + + +; Xdebug settings +xdebug.default_enable = Off +xdebug.profiler_enable = Off +xdebug.remote_enable = Off +xdebug.remote_autostart = Off + +; vim: set ft=dosini: diff --git a/cfg/php-ini-7.0/devilbox-php.ini-xdebug b/cfg/php-ini-7.0/devilbox-php.ini-xdebug new file mode 100644 index 00000000..d3e977b5 --- /dev/null +++ b/cfg/php-ini-7.0/devilbox-php.ini-xdebug @@ -0,0 +1,36 @@ +; ############################################################ +; # Devilbox php.ini: Xdebug example +; ############################################################ +; +; Information +; ----------- +; * Do not edit this file (it belongs to git) +; * This file show a possible Xdebug example configuration +; * If this file is enabled, it will overwrite the current Xdebug settings +; +; How to enable? +; -------------- +; * Copy this file to another file with ".ini" extension +; * Only files with ".ini" extensions will be applied by PHP + + + +; +; PHP.ini configuration +; +[PHP] + +; Xdebug +; Use these settings to enable Xdebug for PHP +; Make sure to read up on Xdebug some settings might significantly slow down requests. +; The following is just an example configuration and should be adjusted +xdebug.default_enable = On +xdebug.profiler_enable = On +xdebug.remote_enable = On +xdebug.remote_autostart = On +xdebug.remote_handler = dbgp +xdebug.remote_port = 9000 +xdebug.idekey = PHPSTORM +xdebug.remote_log = /var/log/php/xdebug.log + +; vim: set ft=dosini: diff --git a/cfg/php-ini-7.1/README.md b/cfg/php-ini-7.1/README.md new file mode 100644 index 00000000..b967fcaa --- /dev/null +++ b/cfg/php-ini-7.1/README.md @@ -0,0 +1,26 @@ +# PHP ini directory + +## General + +* Add you custom php.ini files into this directory. +* Only files ending by `.ini` will be enabled +* Only files ending by `.ini` are ignored by git + + +## Example files + +This directory also holds two example files: + +| File | Description | +|----------------------------|-----------------------------------------| +| `devilbox-php.ini-default` | Represents current PHP default settings | +| `devilbox-php.ini-xdebug ` | Example settings for Xdebug | + +* Do not edit these example files! +* Copy them to a new file (in case you want to use them) + + +## Overwriting + +If multiple `.ini` files are present in this directory specifying different values for the +same settings, the last file (alphabetically by filename) will overwrite any previous values. diff --git a/cfg/php-ini-7.1/devilbox-custom.ini-example b/cfg/php-ini-7.1/devilbox-custom.ini-example deleted file mode 100644 index 0d74166d..00000000 --- a/cfg/php-ini-7.1/devilbox-custom.ini-example +++ /dev/null @@ -1,18 +0,0 @@ -[PHP] -; Memory -memory_limit = 4096M - -; Timeouts -max_execution_time = 180 -max_input_time = 180 -; Uploads -post_max_size = 1990M -upload_max_filesize = 1990M - -; Vars -max_input_vars = 8000 - -; Error reporting -error_reporting = E_ALL -display_errors = On -track_errors = On diff --git a/cfg/php-ini-7.1/devilbox-php.ini-default b/cfg/php-ini-7.1/devilbox-php.ini-default new file mode 100644 index 00000000..a12e5f32 --- /dev/null +++ b/cfg/php-ini-7.1/devilbox-php.ini-default @@ -0,0 +1,64 @@ +; ############################################################ +; # Devilbox php.ini: Current default settings +; ############################################################ +; +; Information +; ----------- +; * Do not edit this file (it belongs to git) +; * This file shows example settings that are currently effective +; * If this file is enabled, nothing will change as it reflects the current default settings +; +; How to enable? +; -------------- +; * Copy this file to another file with ".ini" extension +; * Only files with ".ini" extensions will be applied by PHP + + + +; +; PHP.ini configuration +; +[PHP] + +; Memory +; Note: "memory_limit" should be larger than "post_max_size" +memory_limit = 512M + + +; Timeouts +max_execution_time = 120 +max_input_time = 120 + + +; Uploads +; Note: "post_max_size" should be greater than "upload_max_filesize" +post_max_size = 72M +upload_max_filesize = 64M +max_file_uploads = 20 + + +; Vars +variables_order = EGPCS +max_input_vars = 8000 +max_input_nesting_level = 64 + + +; Error reporting +; Note: error_log is dynamic and handled during start to set appropriate setting +error_reporting = E_ALL | E_NOTICE | E_STRICT | E_DEPRECATED +xmlrpc_errors = Off +report_memleaks = On +display_errors = On +display_startup_errors = On +track_errors = On +log_errors = On +html_errors = On + + +; Xdebug settings +xdebug.default_enable = Off +xdebug.profiler_enable = Off +xdebug.remote_enable = Off +xdebug.remote_autostart = Off + +; vim: set ft=dosini: diff --git a/cfg/php-ini-7.1/devilbox-php.ini-xdebug b/cfg/php-ini-7.1/devilbox-php.ini-xdebug new file mode 100644 index 00000000..d3e977b5 --- /dev/null +++ b/cfg/php-ini-7.1/devilbox-php.ini-xdebug @@ -0,0 +1,36 @@ +; ############################################################ +; # Devilbox php.ini: Xdebug example +; ############################################################ +; +; Information +; ----------- +; * Do not edit this file (it belongs to git) +; * This file show a possible Xdebug example configuration +; * If this file is enabled, it will overwrite the current Xdebug settings +; +; How to enable? +; -------------- +; * Copy this file to another file with ".ini" extension +; * Only files with ".ini" extensions will be applied by PHP + + + +; +; PHP.ini configuration +; +[PHP] + +; Xdebug +; Use these settings to enable Xdebug for PHP +; Make sure to read up on Xdebug some settings might significantly slow down requests. +; The following is just an example configuration and should be adjusted +xdebug.default_enable = On +xdebug.profiler_enable = On +xdebug.remote_enable = On +xdebug.remote_autostart = On +xdebug.remote_handler = dbgp +xdebug.remote_port = 9000 +xdebug.idekey = PHPSTORM +xdebug.remote_log = /var/log/php/xdebug.log + +; vim: set ft=dosini: diff --git a/cfg/php-ini-7.2/README.md b/cfg/php-ini-7.2/README.md new file mode 100644 index 00000000..b967fcaa --- /dev/null +++ b/cfg/php-ini-7.2/README.md @@ -0,0 +1,26 @@ +# PHP ini directory + +## General + +* Add you custom php.ini files into this directory. +* Only files ending by `.ini` will be enabled +* Only files ending by `.ini` are ignored by git + + +## Example files + +This directory also holds two example files: + +| File | Description | +|----------------------------|-----------------------------------------| +| `devilbox-php.ini-default` | Represents current PHP default settings | +| `devilbox-php.ini-xdebug ` | Example settings for Xdebug | + +* Do not edit these example files! +* Copy them to a new file (in case you want to use them) + + +## Overwriting + +If multiple `.ini` files are present in this directory specifying different values for the +same settings, the last file (alphabetically by filename) will overwrite any previous values. diff --git a/cfg/php-ini-7.2/devilbox-custom.ini-example b/cfg/php-ini-7.2/devilbox-custom.ini-example deleted file mode 100644 index 0d74166d..00000000 --- a/cfg/php-ini-7.2/devilbox-custom.ini-example +++ /dev/null @@ -1,18 +0,0 @@ -[PHP] -; Memory -memory_limit = 4096M - -; Timeouts -max_execution_time = 180 -max_input_time = 180 -; Uploads -post_max_size = 1990M -upload_max_filesize = 1990M - -; Vars -max_input_vars = 8000 - -; Error reporting -error_reporting = E_ALL -display_errors = On -track_errors = On diff --git a/cfg/php-ini-7.2/devilbox-php.ini-default b/cfg/php-ini-7.2/devilbox-php.ini-default new file mode 100644 index 00000000..83d03712 --- /dev/null +++ b/cfg/php-ini-7.2/devilbox-php.ini-default @@ -0,0 +1,63 @@ +; ############################################################ +; # Devilbox php.ini: Current default settings +; ############################################################ +; +; Information +; ----------- +; * Do not edit this file (it belongs to git) +; * This file shows example settings that are currently effective +; * If this file is enabled, nothing will change as it reflects the current default settings +; +; How to enable? +; -------------- +; * Copy this file to another file with ".ini" extension +; * Only files with ".ini" extensions will be applied by PHP + + + +; +; PHP.ini configuration +; +[PHP] + +; Memory +; Note: "memory_limit" should be larger than "post_max_size" +memory_limit = 512M + + +; Timeouts +max_execution_time = 120 +max_input_time = 120 + + +; Uploads +; Note: "post_max_size" should be greater than "upload_max_filesize" +post_max_size = 72M +upload_max_filesize = 64M +max_file_uploads = 20 + + +; Vars +variables_order = EGPCS +max_input_vars = 8000 +max_input_nesting_level = 64 + + +; Error reporting +; Note: error_log is dynamic and handled during start to set appropriate setting +error_reporting = E_ALL | E_NOTICE | E_STRICT | E_DEPRECATED +xmlrpc_errors = Off +report_memleaks = On +display_errors = On +display_startup_errors = On +log_errors = On +html_errors = On + + +; Xdebug settings +xdebug.default_enable = Off +xdebug.profiler_enable = Off +xdebug.remote_enable = Off +xdebug.remote_autostart = Off + +; vim: set ft=dosini: diff --git a/cfg/php-ini-7.2/devilbox-php.ini-xdebug b/cfg/php-ini-7.2/devilbox-php.ini-xdebug new file mode 100644 index 00000000..d3e977b5 --- /dev/null +++ b/cfg/php-ini-7.2/devilbox-php.ini-xdebug @@ -0,0 +1,36 @@ +; ############################################################ +; # Devilbox php.ini: Xdebug example +; ############################################################ +; +; Information +; ----------- +; * Do not edit this file (it belongs to git) +; * This file show a possible Xdebug example configuration +; * If this file is enabled, it will overwrite the current Xdebug settings +; +; How to enable? +; -------------- +; * Copy this file to another file with ".ini" extension +; * Only files with ".ini" extensions will be applied by PHP + + + +; +; PHP.ini configuration +; +[PHP] + +; Xdebug +; Use these settings to enable Xdebug for PHP +; Make sure to read up on Xdebug some settings might significantly slow down requests. +; The following is just an example configuration and should be adjusted +xdebug.default_enable = On +xdebug.profiler_enable = On +xdebug.remote_enable = On +xdebug.remote_autostart = On +xdebug.remote_handler = dbgp +xdebug.remote_port = 9000 +xdebug.idekey = PHPSTORM +xdebug.remote_log = /var/log/php/xdebug.log + +; vim: set ft=dosini: diff --git a/cfg/php-ini-7.3/README.md b/cfg/php-ini-7.3/README.md new file mode 100644 index 00000000..b967fcaa --- /dev/null +++ b/cfg/php-ini-7.3/README.md @@ -0,0 +1,26 @@ +# PHP ini directory + +## General + +* Add you custom php.ini files into this directory. +* Only files ending by `.ini` will be enabled +* Only files ending by `.ini` are ignored by git + + +## Example files + +This directory also holds two example files: + +| File | Description | +|----------------------------|-----------------------------------------| +| `devilbox-php.ini-default` | Represents current PHP default settings | +| `devilbox-php.ini-xdebug ` | Example settings for Xdebug | + +* Do not edit these example files! +* Copy them to a new file (in case you want to use them) + + +## Overwriting + +If multiple `.ini` files are present in this directory specifying different values for the +same settings, the last file (alphabetically by filename) will overwrite any previous values. diff --git a/cfg/php-ini-7.3/devilbox-custom.ini-example b/cfg/php-ini-7.3/devilbox-custom.ini-example deleted file mode 100644 index 0d74166d..00000000 --- a/cfg/php-ini-7.3/devilbox-custom.ini-example +++ /dev/null @@ -1,18 +0,0 @@ -[PHP] -; Memory -memory_limit = 4096M - -; Timeouts -max_execution_time = 180 -max_input_time = 180 -; Uploads -post_max_size = 1990M -upload_max_filesize = 1990M - -; Vars -max_input_vars = 8000 - -; Error reporting -error_reporting = E_ALL -display_errors = On -track_errors = On diff --git a/cfg/php-ini-7.3/devilbox-php.ini-default b/cfg/php-ini-7.3/devilbox-php.ini-default new file mode 100644 index 00000000..83d03712 --- /dev/null +++ b/cfg/php-ini-7.3/devilbox-php.ini-default @@ -0,0 +1,63 @@ +; ############################################################ +; # Devilbox php.ini: Current default settings +; ############################################################ +; +; Information +; ----------- +; * Do not edit this file (it belongs to git) +; * This file shows example settings that are currently effective +; * If this file is enabled, nothing will change as it reflects the current default settings +; +; How to enable? +; -------------- +; * Copy this file to another file with ".ini" extension +; * Only files with ".ini" extensions will be applied by PHP + + + +; +; PHP.ini configuration +; +[PHP] + +; Memory +; Note: "memory_limit" should be larger than "post_max_size" +memory_limit = 512M + + +; Timeouts +max_execution_time = 120 +max_input_time = 120 + + +; Uploads +; Note: "post_max_size" should be greater than "upload_max_filesize" +post_max_size = 72M +upload_max_filesize = 64M +max_file_uploads = 20 + + +; Vars +variables_order = EGPCS +max_input_vars = 8000 +max_input_nesting_level = 64 + + +; Error reporting +; Note: error_log is dynamic and handled during start to set appropriate setting +error_reporting = E_ALL | E_NOTICE | E_STRICT | E_DEPRECATED +xmlrpc_errors = Off +report_memleaks = On +display_errors = On +display_startup_errors = On +log_errors = On +html_errors = On + + +; Xdebug settings +xdebug.default_enable = Off +xdebug.profiler_enable = Off +xdebug.remote_enable = Off +xdebug.remote_autostart = Off + +; vim: set ft=dosini: diff --git a/cfg/php-ini-7.3/devilbox-php.ini-xdebug b/cfg/php-ini-7.3/devilbox-php.ini-xdebug new file mode 100644 index 00000000..d3e977b5 --- /dev/null +++ b/cfg/php-ini-7.3/devilbox-php.ini-xdebug @@ -0,0 +1,36 @@ +; ############################################################ +; # Devilbox php.ini: Xdebug example +; ############################################################ +; +; Information +; ----------- +; * Do not edit this file (it belongs to git) +; * This file show a possible Xdebug example configuration +; * If this file is enabled, it will overwrite the current Xdebug settings +; +; How to enable? +; -------------- +; * Copy this file to another file with ".ini" extension +; * Only files with ".ini" extensions will be applied by PHP + + + +; +; PHP.ini configuration +; +[PHP] + +; Xdebug +; Use these settings to enable Xdebug for PHP +; Make sure to read up on Xdebug some settings might significantly slow down requests. +; The following is just an example configuration and should be adjusted +xdebug.default_enable = On +xdebug.profiler_enable = On +xdebug.remote_enable = On +xdebug.remote_autostart = On +xdebug.remote_handler = dbgp +xdebug.remote_port = 9000 +xdebug.idekey = PHPSTORM +xdebug.remote_log = /var/log/php/xdebug.log + +; vim: set ft=dosini: From ff7fa9d9ab431f3dc6138b674370214ce91f055c Mon Sep 17 00:00:00 2001 From: cytopia Date: Sat, 4 Aug 2018 02:11:55 +0200 Subject: [PATCH 02/25] Generalize default configs for PHP-FPM --- cfg/php-fpm-5.2/.keepme | 0 cfg/php-fpm-5.2/README-IMPORTANT.md | 25 +++ cfg/php-fpm-5.2/php-fpm.xml-example | 156 ++++++++++++++++++ cfg/php-fpm-5.3/README.md | 54 ++++++ cfg/php-fpm-5.3/devilbox-fpm.conf-default | 80 +++++++++ cfg/php-fpm-5.3/devilbox-fpm.conf-pm_dynamic | 46 ++++++ cfg/php-fpm-5.3/devilbox-fpm.conf-pm_ondemand | 39 +++++ cfg/php-fpm-5.4/README.md | 54 ++++++ cfg/php-fpm-5.4/devilbox-fpm.conf-default | 80 +++++++++ cfg/php-fpm-5.4/devilbox-fpm.conf-pm_dynamic | 46 ++++++ cfg/php-fpm-5.4/devilbox-fpm.conf-pm_ondemand | 39 +++++ cfg/php-fpm-5.5/README.md | 54 ++++++ cfg/php-fpm-5.5/devilbox-fpm.conf-default | 80 +++++++++ cfg/php-fpm-5.5/devilbox-fpm.conf-pm_dynamic | 46 ++++++ cfg/php-fpm-5.5/devilbox-fpm.conf-pm_ondemand | 39 +++++ cfg/php-fpm-5.6/README.md | 54 ++++++ cfg/php-fpm-5.6/devilbox-fpm.conf-default | 80 +++++++++ cfg/php-fpm-5.6/devilbox-fpm.conf-pm_dynamic | 46 ++++++ cfg/php-fpm-5.6/devilbox-fpm.conf-pm_ondemand | 39 +++++ cfg/php-fpm-7.0/README.md | 54 ++++++ cfg/php-fpm-7.0/devilbox-fpm.conf-default | 80 +++++++++ cfg/php-fpm-7.0/devilbox-fpm.conf-pm_dynamic | 46 ++++++ cfg/php-fpm-7.0/devilbox-fpm.conf-pm_ondemand | 39 +++++ cfg/php-fpm-7.1/README.md | 54 ++++++ cfg/php-fpm-7.1/devilbox-fpm.conf-default | 80 +++++++++ cfg/php-fpm-7.1/devilbox-fpm.conf-pm_dynamic | 46 ++++++ cfg/php-fpm-7.1/devilbox-fpm.conf-pm_ondemand | 39 +++++ cfg/php-fpm-7.2/README.md | 54 ++++++ cfg/php-fpm-7.2/devilbox-fpm.conf-default | 80 +++++++++ cfg/php-fpm-7.2/devilbox-fpm.conf-pm_dynamic | 46 ++++++ cfg/php-fpm-7.2/devilbox-fpm.conf-pm_ondemand | 39 +++++ cfg/php-fpm-7.3/README.md | 54 ++++++ cfg/php-fpm-7.3/devilbox-fpm.conf-default | 80 +++++++++ cfg/php-fpm-7.3/devilbox-fpm.conf-pm_dynamic | 46 ++++++ cfg/php-fpm-7.3/devilbox-fpm.conf-pm_ondemand | 39 +++++ 35 files changed, 1933 insertions(+) create mode 100644 cfg/php-fpm-5.2/.keepme create mode 100644 cfg/php-fpm-5.2/README-IMPORTANT.md create mode 100644 cfg/php-fpm-5.2/php-fpm.xml-example create mode 100644 cfg/php-fpm-5.3/README.md create mode 100644 cfg/php-fpm-5.3/devilbox-fpm.conf-default create mode 100644 cfg/php-fpm-5.3/devilbox-fpm.conf-pm_dynamic create mode 100644 cfg/php-fpm-5.3/devilbox-fpm.conf-pm_ondemand create mode 100644 cfg/php-fpm-5.4/README.md create mode 100644 cfg/php-fpm-5.4/devilbox-fpm.conf-default create mode 100644 cfg/php-fpm-5.4/devilbox-fpm.conf-pm_dynamic create mode 100644 cfg/php-fpm-5.4/devilbox-fpm.conf-pm_ondemand create mode 100644 cfg/php-fpm-5.5/README.md create mode 100644 cfg/php-fpm-5.5/devilbox-fpm.conf-default create mode 100644 cfg/php-fpm-5.5/devilbox-fpm.conf-pm_dynamic create mode 100644 cfg/php-fpm-5.5/devilbox-fpm.conf-pm_ondemand create mode 100644 cfg/php-fpm-5.6/README.md create mode 100644 cfg/php-fpm-5.6/devilbox-fpm.conf-default create mode 100644 cfg/php-fpm-5.6/devilbox-fpm.conf-pm_dynamic create mode 100644 cfg/php-fpm-5.6/devilbox-fpm.conf-pm_ondemand create mode 100644 cfg/php-fpm-7.0/README.md create mode 100644 cfg/php-fpm-7.0/devilbox-fpm.conf-default create mode 100644 cfg/php-fpm-7.0/devilbox-fpm.conf-pm_dynamic create mode 100644 cfg/php-fpm-7.0/devilbox-fpm.conf-pm_ondemand create mode 100644 cfg/php-fpm-7.1/README.md create mode 100644 cfg/php-fpm-7.1/devilbox-fpm.conf-default create mode 100644 cfg/php-fpm-7.1/devilbox-fpm.conf-pm_dynamic create mode 100644 cfg/php-fpm-7.1/devilbox-fpm.conf-pm_ondemand create mode 100644 cfg/php-fpm-7.2/README.md create mode 100644 cfg/php-fpm-7.2/devilbox-fpm.conf-default create mode 100644 cfg/php-fpm-7.2/devilbox-fpm.conf-pm_dynamic create mode 100644 cfg/php-fpm-7.2/devilbox-fpm.conf-pm_ondemand create mode 100644 cfg/php-fpm-7.3/README.md create mode 100644 cfg/php-fpm-7.3/devilbox-fpm.conf-default create mode 100644 cfg/php-fpm-7.3/devilbox-fpm.conf-pm_dynamic create mode 100644 cfg/php-fpm-7.3/devilbox-fpm.conf-pm_ondemand diff --git a/cfg/php-fpm-5.2/.keepme b/cfg/php-fpm-5.2/.keepme new file mode 100644 index 00000000..e69de29b diff --git a/cfg/php-fpm-5.2/README-IMPORTANT.md b/cfg/php-fpm-5.2/README-IMPORTANT.md new file mode 100644 index 00000000..7ccac7c1 --- /dev/null +++ b/cfg/php-fpm-5.2/README-IMPORTANT.md @@ -0,0 +1,25 @@ +# PHP-FPM 5.2 config directory + +**This is different from all other PHP-FPM versions** + + +PHP-FPM 5.2 uses XML-style configuration and does not allow includes. +If you want to change PHP-FPM settings for PHP-FPM 5.2 you need to adjust the main configuration file. + +The currently enabled configuration file is bundled in this directory: `php-fpm.xml-default`. + +In order to make adjustments, copy it to `php-fpm.xml` and change values. + + +## How to enable + +Settings are only enabled if a file named `php-fpm.xml` is present. +All other files are ignoed. + + +## Important + +Do not simply add anything in that file. You must copy php-fpm.xml-default and adjust values +step by step. + +The `php-fpm.xml` will completely overwrite PHP-FPM configuration. diff --git a/cfg/php-fpm-5.2/php-fpm.xml-example b/cfg/php-fpm-5.2/php-fpm.xml-example new file mode 100644 index 00000000..8cb47397 --- /dev/null +++ b/cfg/php-fpm-5.2/php-fpm.xml-example @@ -0,0 +1,156 @@ + + + + All relative paths in this config are relative to php's install prefix + +
+ Pid file + /var/run/php-fpm.pid + + Error log file + /proc/self/fd/2 + + Log level + notice + + When this amount of php processes exited with SIGSEGV or SIGBUS ... + 10 + + ... in a less than this interval of time, a graceful restart will be initiated. + Useful to work around accidental curruptions in accelerator's shared memory. + 1m + + Time limit on waiting child's reaction on signals from master + 5s + + Set to 'no' to debug fpm + no +
+ + + +
+ + Name of pool. Used in logs and stats. + www + + Address to accept fastcgi requests on. + Valid syntax is 'ip.ad.re.ss:port' or just 'port' or '/path/to/unix/socket' + 0.0.0.0:9000 + + + Set listen(2) backlog + 128 + Set permissions for unix socket, if one used. + In Linux read/write permissions must be set in order to allow connections from web server. + Many BSD-derrived systems allow connections regardless of permissions. + + + 0666 + + + Additional php.ini defines, specific to this pool of workers. + + -1 + 0 + 1 + 1 + 1 + 1 + 1 + 1 + + + Unix user of processes + devilbox + + Unix group of processes + devilbox + + Process manager settings + + + Sets style of controling worker process count. + Valid values are 'static' and 'apache-like' + apache-like + + Sets the limit on the number of simultaneous requests that will be served. + Equivalent to Apache MaxClients directive. + Equivalent to PHP_FCGI_CHILDREN environment in original php.fcgi + Used with any pm_style. + 5 + + Settings group for 'apache-like' pm style + + Sets the number of server processes created on startup. + Used only when 'apache-like' pm_style is selected + 3 + + Sets the desired minimum number of idle server processes. + Used only when 'apache-like' pm_style is selected + 2 + + Sets the desired maximum number of idle server processes. + Used only when 'apache-like' pm_style is selected + 4 + + + + + The timeout (in seconds) for serving a single request after which the worker process will be terminated + Should be used when 'max_execution_time' ini option does not stop script execution for some reason + '0s' means 'off' + 120s + + The timeout (in seconds) for serving of single request after which a php backtrace will be dumped to slow.log file + '0s' means 'off' + 0s + + The log file for slow requests + /proc/self/fd/2 + + Set open file desc rlimit + 1024 + + Set max core size rlimit + 0 + + Chroot to this directory at the start, absolute path + + + Chdir to this directory at the start, absolute path + + + Redirect workers' stdout and stderr into main error log. + If not set, they will be redirected to /dev/null, according to FastCGI specs + yes + + How much requests each process should execute before respawn. + Useful to work around memory leaks in 3rd party libraries. + For endless request processing please specify 0 + Equivalent to PHP_FCGI_MAX_REQUESTS + 500 + + Comma separated list of ipv4 addresses of FastCGI clients that allowed to connect. + Equivalent to FCGI_WEB_SERVER_ADDRS environment in original php.fcgi (5.2.2+) + Makes sense only with AF_INET listening socket. + + + Pass environment variables like LD_LIBRARY_PATH + All $VARIABLEs are taken from current environment + + $HOSTNAME + /usr/local/bin:/usr/bin:/bin + /tmp + /tmp + /tmp + $OSTYPE + $MACHTYPE + 2 + + +
+ +
+ +
diff --git a/cfg/php-fpm-5.3/README.md b/cfg/php-fpm-5.3/README.md new file mode 100644 index 00000000..db30d63f --- /dev/null +++ b/cfg/php-fpm-5.3/README.md @@ -0,0 +1,54 @@ +# PHP-FPM config directory + +## General + +* Add you custom php-fpm.conf files into this directory. +* Only files ending by `.conf` will be enabled +* Only files ending by `.conf` are ignored by git + + +## Example files + +This directory also holds three example files: + +| File | Description | +|---------------------------------|---------------------------------------------| +| `devilbox-fpm.conf-default` | Represents current PHP-FPM default settings | +| `devilbox-fpm.conf-pm_dynamic` | Example settings for dynamic workers | +| `devilbox-fpm.conf-pm_ondemand` | Example settings for ondemand workers | + +* Do not edit these example files! +* Copy them to a new file (in case you want to use them) + + +## Worker configuration + +When changing worker processes or scheduler, the following commands will come in handy +to monitor number of processes and memory consumption. + +```bash +# Show current PHP-FPM child memory consumption in MB +ps -ylC php-fpm --sort:rss | awk '!/RSS/ { s+=$8 } END { printf "%dM\n", s/1024 }' + +# (repeatedly) show current PHP-FPM child memory consumption in MB +watch --interval=1 "ps -ylC php-fpm --sort:rss | awk '"'!'"/RSS/ { s+=\$8 } END { printf \"%dM\n\", s/1024 }'" + +# (repeatedly) Current number of PHP-FPM childs +watch --interval=1 "ps auxw | grep -E 'php-(cgi|fpm)' | grep -vE 'grep|master' | wc -l" +``` + + +## Overwriting + +If multiple `.conf` files are present in this directory specifying different values for the +same settings, the last file (alphabetically by filename) will overwrite any previous values. + + +## Compatibility + +**Note:** + +PHP-FPM 5.2 uses XML-style configuration and does not allow includes. +If you want to change php-fpm.conf for PHP-FPM 5.2 you need to adjust the main configuration file. + +See `php-fpm-5.2/` directory. diff --git a/cfg/php-fpm-5.3/devilbox-fpm.conf-default b/cfg/php-fpm-5.3/devilbox-fpm.conf-default new file mode 100644 index 00000000..5467dd45 --- /dev/null +++ b/cfg/php-fpm-5.3/devilbox-fpm.conf-default @@ -0,0 +1,80 @@ +; ############################################################ +; Devilbox php-fpm.conf: Current default settings +; ############################################################ +; +; Information +; ----------- +; * Do not edit this file (it belongs to git) +; * This file shows example settings that are currently effective +; * If this file is enabled, nothing will change as it reflects the current default settings +; +; How to enable? +; -------------- +; * Copy this file to another file with ".conf" extension +; * Only files with ".conf" extensions will be applied by PHP-FPM + + +; ### +; ### PHP-FPM global settings +; ### +; +[global] + +; Error log level. Possible values: alert, error, warning, notice, debug. Default value: notice. +log_level = notice + + + +; ### +; ### Pool configuratoin +; ### + +[www] + +; The timeout for serving a single request after which the worker process will be killed. +; This option should be used when the 'max_execution_time' ini option does not stop script +; execution for some reason. +request_terminate_timeout = 120s + + +; A maximum of backlog incoming connections will be queued for processing. +; If a connection request arrives with the queue full the client may receive an error with an +; indication of ECONNREFUSED, or, if the underlying protocol supports retransmission, +; the request may be ignored so that retries may succeed. +; This should not be greater than `cat /proc/sys/net/core/somaxconn`, otherwise connections +; are silently truncated +listen.backlog = 128 + + +; static - the number of child processes is fixed (pm.max_children). +; +; dynamic - the number of child processes is set dynamically based on the following directives: +; pm.max_children, pm.start_servers, pm.min_spare_servers, pm.max_spare_servers. +; +; ondemand - the processes spawn on demand (when requested, as opposed to dynamic, where +; pm.start_servers are started when the service is started. +pm = ondemand + +; The maximum number of child processes to be created +pm.max_children = 50 + +; The number of child processes created on startup. Used only when pm is set to dynamic. +; Default Value: min_spare_servers + (max_spare_servers - min_spare_servers) / 2. +pm.start_servers = 4 + +; The desired minimum number of idle server processes. +pm.min_spare_servers = 2 + +; The desired maximum number of idle server processes. +pm.max_spare_servers = 6 + +; The number of requests each child process should execute before respawning. +; This can be useful to work around memory leaks in 3rd party libraries. +; For endless request processing specify '0'. Equivalent to PHP_FCGI_MAX_REQUESTS. +; Default value: 0. +pm.max_requests = 500 + +; The number of seconds after which an idle process will be killed. Used only when pm is set to ondemand +pm.process_idle_timeout = 10s + +; vim: set ft=dosini: diff --git a/cfg/php-fpm-5.3/devilbox-fpm.conf-pm_dynamic b/cfg/php-fpm-5.3/devilbox-fpm.conf-pm_dynamic new file mode 100644 index 00000000..59ec044b --- /dev/null +++ b/cfg/php-fpm-5.3/devilbox-fpm.conf-pm_dynamic @@ -0,0 +1,46 @@ +; ############################################################ +; # Devilbox php-fpm.conf: dynamic example +; ############################################################ +; +; Information +; ----------- +; * Do not edit this file (it belongs to git) +; * This file show a possible dynamic example configuration +; * If this file is enabled, it will overwrite the current worker settings +; +; How to enable? +; -------------- +; * Copy this file to another file with ".conf" extension +; * Only files with ".conf" extensions will be applied by PHP-FPM + + +; ### +; ### Pool configuratoin +; ### + +[www] + +; dynamic - the number of child processes is set dynamically based on the following directives: +pm = dynamic + +; The maximum number of child processes to be created +pm.max_children = 50 + +; The number of child processes created on startup. Used only when pm is set to dynamic. +; Default Value: min_spare_servers + (max_spare_servers - min_spare_servers) / 2. +pm.start_servers = 4 + +; The desired minimum number of idle server processes. +pm.min_spare_servers = 2 + +; The desired maximum number of idle server processes. +pm.max_spare_servers = 6 + +; The number of requests each child process should execute before respawning. +; This can be useful to work around memory leaks in 3rd party libraries. +; For endless request processing specify '0'. Equivalent to PHP_FCGI_MAX_REQUESTS. +; Default value: 0. +pm.max_requests = 500 + + +; vim: set ft=dosini: diff --git a/cfg/php-fpm-5.3/devilbox-fpm.conf-pm_ondemand b/cfg/php-fpm-5.3/devilbox-fpm.conf-pm_ondemand new file mode 100644 index 00000000..84cd3ca7 --- /dev/null +++ b/cfg/php-fpm-5.3/devilbox-fpm.conf-pm_ondemand @@ -0,0 +1,39 @@ +; ############################################################ +; # Devilbox php-fpm.conf: ondemand example +; ############################################################ +; +; Information +; ----------- +; * Do not edit this file (it belongs to git) +; * This file show a possible ondemand example configuration +; * If this file is enabled, it will overwrite the current worker settings +; +; How to enable? +; -------------- +; * Copy this file to another file with ".conf" extension +; * Only files with ".conf" extensions will be applied by PHP-FPM + + +; ### +; ### Pool configuratoin +; ### + +[www] + +; ondemand - the processes spawn on demand (when requested, as opposed to dynamic, where +; pm.start_servers are started when the service is started. +pm = ondemand + +; The maximum number of child processes to be created +pm.max_children = 50 + +; The number of requests each child process should execute before respawning. +; This can be useful to work around memory leaks in 3rd party libraries. +; For endless request processing specify '0'. Equivalent to PHP_FCGI_MAX_REQUESTS. +; Default value: 0. +pm.max_requests = 500 + +; The number of seconds after which an idle process will be killed. +pm.process_idle_timeout = 10s + +; vim: set ft=dosini: diff --git a/cfg/php-fpm-5.4/README.md b/cfg/php-fpm-5.4/README.md new file mode 100644 index 00000000..db30d63f --- /dev/null +++ b/cfg/php-fpm-5.4/README.md @@ -0,0 +1,54 @@ +# PHP-FPM config directory + +## General + +* Add you custom php-fpm.conf files into this directory. +* Only files ending by `.conf` will be enabled +* Only files ending by `.conf` are ignored by git + + +## Example files + +This directory also holds three example files: + +| File | Description | +|---------------------------------|---------------------------------------------| +| `devilbox-fpm.conf-default` | Represents current PHP-FPM default settings | +| `devilbox-fpm.conf-pm_dynamic` | Example settings for dynamic workers | +| `devilbox-fpm.conf-pm_ondemand` | Example settings for ondemand workers | + +* Do not edit these example files! +* Copy them to a new file (in case you want to use them) + + +## Worker configuration + +When changing worker processes or scheduler, the following commands will come in handy +to monitor number of processes and memory consumption. + +```bash +# Show current PHP-FPM child memory consumption in MB +ps -ylC php-fpm --sort:rss | awk '!/RSS/ { s+=$8 } END { printf "%dM\n", s/1024 }' + +# (repeatedly) show current PHP-FPM child memory consumption in MB +watch --interval=1 "ps -ylC php-fpm --sort:rss | awk '"'!'"/RSS/ { s+=\$8 } END { printf \"%dM\n\", s/1024 }'" + +# (repeatedly) Current number of PHP-FPM childs +watch --interval=1 "ps auxw | grep -E 'php-(cgi|fpm)' | grep -vE 'grep|master' | wc -l" +``` + + +## Overwriting + +If multiple `.conf` files are present in this directory specifying different values for the +same settings, the last file (alphabetically by filename) will overwrite any previous values. + + +## Compatibility + +**Note:** + +PHP-FPM 5.2 uses XML-style configuration and does not allow includes. +If you want to change php-fpm.conf for PHP-FPM 5.2 you need to adjust the main configuration file. + +See `php-fpm-5.2/` directory. diff --git a/cfg/php-fpm-5.4/devilbox-fpm.conf-default b/cfg/php-fpm-5.4/devilbox-fpm.conf-default new file mode 100644 index 00000000..5467dd45 --- /dev/null +++ b/cfg/php-fpm-5.4/devilbox-fpm.conf-default @@ -0,0 +1,80 @@ +; ############################################################ +; Devilbox php-fpm.conf: Current default settings +; ############################################################ +; +; Information +; ----------- +; * Do not edit this file (it belongs to git) +; * This file shows example settings that are currently effective +; * If this file is enabled, nothing will change as it reflects the current default settings +; +; How to enable? +; -------------- +; * Copy this file to another file with ".conf" extension +; * Only files with ".conf" extensions will be applied by PHP-FPM + + +; ### +; ### PHP-FPM global settings +; ### +; +[global] + +; Error log level. Possible values: alert, error, warning, notice, debug. Default value: notice. +log_level = notice + + + +; ### +; ### Pool configuratoin +; ### + +[www] + +; The timeout for serving a single request after which the worker process will be killed. +; This option should be used when the 'max_execution_time' ini option does not stop script +; execution for some reason. +request_terminate_timeout = 120s + + +; A maximum of backlog incoming connections will be queued for processing. +; If a connection request arrives with the queue full the client may receive an error with an +; indication of ECONNREFUSED, or, if the underlying protocol supports retransmission, +; the request may be ignored so that retries may succeed. +; This should not be greater than `cat /proc/sys/net/core/somaxconn`, otherwise connections +; are silently truncated +listen.backlog = 128 + + +; static - the number of child processes is fixed (pm.max_children). +; +; dynamic - the number of child processes is set dynamically based on the following directives: +; pm.max_children, pm.start_servers, pm.min_spare_servers, pm.max_spare_servers. +; +; ondemand - the processes spawn on demand (when requested, as opposed to dynamic, where +; pm.start_servers are started when the service is started. +pm = ondemand + +; The maximum number of child processes to be created +pm.max_children = 50 + +; The number of child processes created on startup. Used only when pm is set to dynamic. +; Default Value: min_spare_servers + (max_spare_servers - min_spare_servers) / 2. +pm.start_servers = 4 + +; The desired minimum number of idle server processes. +pm.min_spare_servers = 2 + +; The desired maximum number of idle server processes. +pm.max_spare_servers = 6 + +; The number of requests each child process should execute before respawning. +; This can be useful to work around memory leaks in 3rd party libraries. +; For endless request processing specify '0'. Equivalent to PHP_FCGI_MAX_REQUESTS. +; Default value: 0. +pm.max_requests = 500 + +; The number of seconds after which an idle process will be killed. Used only when pm is set to ondemand +pm.process_idle_timeout = 10s + +; vim: set ft=dosini: diff --git a/cfg/php-fpm-5.4/devilbox-fpm.conf-pm_dynamic b/cfg/php-fpm-5.4/devilbox-fpm.conf-pm_dynamic new file mode 100644 index 00000000..59ec044b --- /dev/null +++ b/cfg/php-fpm-5.4/devilbox-fpm.conf-pm_dynamic @@ -0,0 +1,46 @@ +; ############################################################ +; # Devilbox php-fpm.conf: dynamic example +; ############################################################ +; +; Information +; ----------- +; * Do not edit this file (it belongs to git) +; * This file show a possible dynamic example configuration +; * If this file is enabled, it will overwrite the current worker settings +; +; How to enable? +; -------------- +; * Copy this file to another file with ".conf" extension +; * Only files with ".conf" extensions will be applied by PHP-FPM + + +; ### +; ### Pool configuratoin +; ### + +[www] + +; dynamic - the number of child processes is set dynamically based on the following directives: +pm = dynamic + +; The maximum number of child processes to be created +pm.max_children = 50 + +; The number of child processes created on startup. Used only when pm is set to dynamic. +; Default Value: min_spare_servers + (max_spare_servers - min_spare_servers) / 2. +pm.start_servers = 4 + +; The desired minimum number of idle server processes. +pm.min_spare_servers = 2 + +; The desired maximum number of idle server processes. +pm.max_spare_servers = 6 + +; The number of requests each child process should execute before respawning. +; This can be useful to work around memory leaks in 3rd party libraries. +; For endless request processing specify '0'. Equivalent to PHP_FCGI_MAX_REQUESTS. +; Default value: 0. +pm.max_requests = 500 + + +; vim: set ft=dosini: diff --git a/cfg/php-fpm-5.4/devilbox-fpm.conf-pm_ondemand b/cfg/php-fpm-5.4/devilbox-fpm.conf-pm_ondemand new file mode 100644 index 00000000..84cd3ca7 --- /dev/null +++ b/cfg/php-fpm-5.4/devilbox-fpm.conf-pm_ondemand @@ -0,0 +1,39 @@ +; ############################################################ +; # Devilbox php-fpm.conf: ondemand example +; ############################################################ +; +; Information +; ----------- +; * Do not edit this file (it belongs to git) +; * This file show a possible ondemand example configuration +; * If this file is enabled, it will overwrite the current worker settings +; +; How to enable? +; -------------- +; * Copy this file to another file with ".conf" extension +; * Only files with ".conf" extensions will be applied by PHP-FPM + + +; ### +; ### Pool configuratoin +; ### + +[www] + +; ondemand - the processes spawn on demand (when requested, as opposed to dynamic, where +; pm.start_servers are started when the service is started. +pm = ondemand + +; The maximum number of child processes to be created +pm.max_children = 50 + +; The number of requests each child process should execute before respawning. +; This can be useful to work around memory leaks in 3rd party libraries. +; For endless request processing specify '0'. Equivalent to PHP_FCGI_MAX_REQUESTS. +; Default value: 0. +pm.max_requests = 500 + +; The number of seconds after which an idle process will be killed. +pm.process_idle_timeout = 10s + +; vim: set ft=dosini: diff --git a/cfg/php-fpm-5.5/README.md b/cfg/php-fpm-5.5/README.md new file mode 100644 index 00000000..db30d63f --- /dev/null +++ b/cfg/php-fpm-5.5/README.md @@ -0,0 +1,54 @@ +# PHP-FPM config directory + +## General + +* Add you custom php-fpm.conf files into this directory. +* Only files ending by `.conf` will be enabled +* Only files ending by `.conf` are ignored by git + + +## Example files + +This directory also holds three example files: + +| File | Description | +|---------------------------------|---------------------------------------------| +| `devilbox-fpm.conf-default` | Represents current PHP-FPM default settings | +| `devilbox-fpm.conf-pm_dynamic` | Example settings for dynamic workers | +| `devilbox-fpm.conf-pm_ondemand` | Example settings for ondemand workers | + +* Do not edit these example files! +* Copy them to a new file (in case you want to use them) + + +## Worker configuration + +When changing worker processes or scheduler, the following commands will come in handy +to monitor number of processes and memory consumption. + +```bash +# Show current PHP-FPM child memory consumption in MB +ps -ylC php-fpm --sort:rss | awk '!/RSS/ { s+=$8 } END { printf "%dM\n", s/1024 }' + +# (repeatedly) show current PHP-FPM child memory consumption in MB +watch --interval=1 "ps -ylC php-fpm --sort:rss | awk '"'!'"/RSS/ { s+=\$8 } END { printf \"%dM\n\", s/1024 }'" + +# (repeatedly) Current number of PHP-FPM childs +watch --interval=1 "ps auxw | grep -E 'php-(cgi|fpm)' | grep -vE 'grep|master' | wc -l" +``` + + +## Overwriting + +If multiple `.conf` files are present in this directory specifying different values for the +same settings, the last file (alphabetically by filename) will overwrite any previous values. + + +## Compatibility + +**Note:** + +PHP-FPM 5.2 uses XML-style configuration and does not allow includes. +If you want to change php-fpm.conf for PHP-FPM 5.2 you need to adjust the main configuration file. + +See `php-fpm-5.2/` directory. diff --git a/cfg/php-fpm-5.5/devilbox-fpm.conf-default b/cfg/php-fpm-5.5/devilbox-fpm.conf-default new file mode 100644 index 00000000..5467dd45 --- /dev/null +++ b/cfg/php-fpm-5.5/devilbox-fpm.conf-default @@ -0,0 +1,80 @@ +; ############################################################ +; Devilbox php-fpm.conf: Current default settings +; ############################################################ +; +; Information +; ----------- +; * Do not edit this file (it belongs to git) +; * This file shows example settings that are currently effective +; * If this file is enabled, nothing will change as it reflects the current default settings +; +; How to enable? +; -------------- +; * Copy this file to another file with ".conf" extension +; * Only files with ".conf" extensions will be applied by PHP-FPM + + +; ### +; ### PHP-FPM global settings +; ### +; +[global] + +; Error log level. Possible values: alert, error, warning, notice, debug. Default value: notice. +log_level = notice + + + +; ### +; ### Pool configuratoin +; ### + +[www] + +; The timeout for serving a single request after which the worker process will be killed. +; This option should be used when the 'max_execution_time' ini option does not stop script +; execution for some reason. +request_terminate_timeout = 120s + + +; A maximum of backlog incoming connections will be queued for processing. +; If a connection request arrives with the queue full the client may receive an error with an +; indication of ECONNREFUSED, or, if the underlying protocol supports retransmission, +; the request may be ignored so that retries may succeed. +; This should not be greater than `cat /proc/sys/net/core/somaxconn`, otherwise connections +; are silently truncated +listen.backlog = 128 + + +; static - the number of child processes is fixed (pm.max_children). +; +; dynamic - the number of child processes is set dynamically based on the following directives: +; pm.max_children, pm.start_servers, pm.min_spare_servers, pm.max_spare_servers. +; +; ondemand - the processes spawn on demand (when requested, as opposed to dynamic, where +; pm.start_servers are started when the service is started. +pm = ondemand + +; The maximum number of child processes to be created +pm.max_children = 50 + +; The number of child processes created on startup. Used only when pm is set to dynamic. +; Default Value: min_spare_servers + (max_spare_servers - min_spare_servers) / 2. +pm.start_servers = 4 + +; The desired minimum number of idle server processes. +pm.min_spare_servers = 2 + +; The desired maximum number of idle server processes. +pm.max_spare_servers = 6 + +; The number of requests each child process should execute before respawning. +; This can be useful to work around memory leaks in 3rd party libraries. +; For endless request processing specify '0'. Equivalent to PHP_FCGI_MAX_REQUESTS. +; Default value: 0. +pm.max_requests = 500 + +; The number of seconds after which an idle process will be killed. Used only when pm is set to ondemand +pm.process_idle_timeout = 10s + +; vim: set ft=dosini: diff --git a/cfg/php-fpm-5.5/devilbox-fpm.conf-pm_dynamic b/cfg/php-fpm-5.5/devilbox-fpm.conf-pm_dynamic new file mode 100644 index 00000000..59ec044b --- /dev/null +++ b/cfg/php-fpm-5.5/devilbox-fpm.conf-pm_dynamic @@ -0,0 +1,46 @@ +; ############################################################ +; # Devilbox php-fpm.conf: dynamic example +; ############################################################ +; +; Information +; ----------- +; * Do not edit this file (it belongs to git) +; * This file show a possible dynamic example configuration +; * If this file is enabled, it will overwrite the current worker settings +; +; How to enable? +; -------------- +; * Copy this file to another file with ".conf" extension +; * Only files with ".conf" extensions will be applied by PHP-FPM + + +; ### +; ### Pool configuratoin +; ### + +[www] + +; dynamic - the number of child processes is set dynamically based on the following directives: +pm = dynamic + +; The maximum number of child processes to be created +pm.max_children = 50 + +; The number of child processes created on startup. Used only when pm is set to dynamic. +; Default Value: min_spare_servers + (max_spare_servers - min_spare_servers) / 2. +pm.start_servers = 4 + +; The desired minimum number of idle server processes. +pm.min_spare_servers = 2 + +; The desired maximum number of idle server processes. +pm.max_spare_servers = 6 + +; The number of requests each child process should execute before respawning. +; This can be useful to work around memory leaks in 3rd party libraries. +; For endless request processing specify '0'. Equivalent to PHP_FCGI_MAX_REQUESTS. +; Default value: 0. +pm.max_requests = 500 + + +; vim: set ft=dosini: diff --git a/cfg/php-fpm-5.5/devilbox-fpm.conf-pm_ondemand b/cfg/php-fpm-5.5/devilbox-fpm.conf-pm_ondemand new file mode 100644 index 00000000..84cd3ca7 --- /dev/null +++ b/cfg/php-fpm-5.5/devilbox-fpm.conf-pm_ondemand @@ -0,0 +1,39 @@ +; ############################################################ +; # Devilbox php-fpm.conf: ondemand example +; ############################################################ +; +; Information +; ----------- +; * Do not edit this file (it belongs to git) +; * This file show a possible ondemand example configuration +; * If this file is enabled, it will overwrite the current worker settings +; +; How to enable? +; -------------- +; * Copy this file to another file with ".conf" extension +; * Only files with ".conf" extensions will be applied by PHP-FPM + + +; ### +; ### Pool configuratoin +; ### + +[www] + +; ondemand - the processes spawn on demand (when requested, as opposed to dynamic, where +; pm.start_servers are started when the service is started. +pm = ondemand + +; The maximum number of child processes to be created +pm.max_children = 50 + +; The number of requests each child process should execute before respawning. +; This can be useful to work around memory leaks in 3rd party libraries. +; For endless request processing specify '0'. Equivalent to PHP_FCGI_MAX_REQUESTS. +; Default value: 0. +pm.max_requests = 500 + +; The number of seconds after which an idle process will be killed. +pm.process_idle_timeout = 10s + +; vim: set ft=dosini: diff --git a/cfg/php-fpm-5.6/README.md b/cfg/php-fpm-5.6/README.md new file mode 100644 index 00000000..db30d63f --- /dev/null +++ b/cfg/php-fpm-5.6/README.md @@ -0,0 +1,54 @@ +# PHP-FPM config directory + +## General + +* Add you custom php-fpm.conf files into this directory. +* Only files ending by `.conf` will be enabled +* Only files ending by `.conf` are ignored by git + + +## Example files + +This directory also holds three example files: + +| File | Description | +|---------------------------------|---------------------------------------------| +| `devilbox-fpm.conf-default` | Represents current PHP-FPM default settings | +| `devilbox-fpm.conf-pm_dynamic` | Example settings for dynamic workers | +| `devilbox-fpm.conf-pm_ondemand` | Example settings for ondemand workers | + +* Do not edit these example files! +* Copy them to a new file (in case you want to use them) + + +## Worker configuration + +When changing worker processes or scheduler, the following commands will come in handy +to monitor number of processes and memory consumption. + +```bash +# Show current PHP-FPM child memory consumption in MB +ps -ylC php-fpm --sort:rss | awk '!/RSS/ { s+=$8 } END { printf "%dM\n", s/1024 }' + +# (repeatedly) show current PHP-FPM child memory consumption in MB +watch --interval=1 "ps -ylC php-fpm --sort:rss | awk '"'!'"/RSS/ { s+=\$8 } END { printf \"%dM\n\", s/1024 }'" + +# (repeatedly) Current number of PHP-FPM childs +watch --interval=1 "ps auxw | grep -E 'php-(cgi|fpm)' | grep -vE 'grep|master' | wc -l" +``` + + +## Overwriting + +If multiple `.conf` files are present in this directory specifying different values for the +same settings, the last file (alphabetically by filename) will overwrite any previous values. + + +## Compatibility + +**Note:** + +PHP-FPM 5.2 uses XML-style configuration and does not allow includes. +If you want to change php-fpm.conf for PHP-FPM 5.2 you need to adjust the main configuration file. + +See `php-fpm-5.2/` directory. diff --git a/cfg/php-fpm-5.6/devilbox-fpm.conf-default b/cfg/php-fpm-5.6/devilbox-fpm.conf-default new file mode 100644 index 00000000..5467dd45 --- /dev/null +++ b/cfg/php-fpm-5.6/devilbox-fpm.conf-default @@ -0,0 +1,80 @@ +; ############################################################ +; Devilbox php-fpm.conf: Current default settings +; ############################################################ +; +; Information +; ----------- +; * Do not edit this file (it belongs to git) +; * This file shows example settings that are currently effective +; * If this file is enabled, nothing will change as it reflects the current default settings +; +; How to enable? +; -------------- +; * Copy this file to another file with ".conf" extension +; * Only files with ".conf" extensions will be applied by PHP-FPM + + +; ### +; ### PHP-FPM global settings +; ### +; +[global] + +; Error log level. Possible values: alert, error, warning, notice, debug. Default value: notice. +log_level = notice + + + +; ### +; ### Pool configuratoin +; ### + +[www] + +; The timeout for serving a single request after which the worker process will be killed. +; This option should be used when the 'max_execution_time' ini option does not stop script +; execution for some reason. +request_terminate_timeout = 120s + + +; A maximum of backlog incoming connections will be queued for processing. +; If a connection request arrives with the queue full the client may receive an error with an +; indication of ECONNREFUSED, or, if the underlying protocol supports retransmission, +; the request may be ignored so that retries may succeed. +; This should not be greater than `cat /proc/sys/net/core/somaxconn`, otherwise connections +; are silently truncated +listen.backlog = 128 + + +; static - the number of child processes is fixed (pm.max_children). +; +; dynamic - the number of child processes is set dynamically based on the following directives: +; pm.max_children, pm.start_servers, pm.min_spare_servers, pm.max_spare_servers. +; +; ondemand - the processes spawn on demand (when requested, as opposed to dynamic, where +; pm.start_servers are started when the service is started. +pm = ondemand + +; The maximum number of child processes to be created +pm.max_children = 50 + +; The number of child processes created on startup. Used only when pm is set to dynamic. +; Default Value: min_spare_servers + (max_spare_servers - min_spare_servers) / 2. +pm.start_servers = 4 + +; The desired minimum number of idle server processes. +pm.min_spare_servers = 2 + +; The desired maximum number of idle server processes. +pm.max_spare_servers = 6 + +; The number of requests each child process should execute before respawning. +; This can be useful to work around memory leaks in 3rd party libraries. +; For endless request processing specify '0'. Equivalent to PHP_FCGI_MAX_REQUESTS. +; Default value: 0. +pm.max_requests = 500 + +; The number of seconds after which an idle process will be killed. Used only when pm is set to ondemand +pm.process_idle_timeout = 10s + +; vim: set ft=dosini: diff --git a/cfg/php-fpm-5.6/devilbox-fpm.conf-pm_dynamic b/cfg/php-fpm-5.6/devilbox-fpm.conf-pm_dynamic new file mode 100644 index 00000000..59ec044b --- /dev/null +++ b/cfg/php-fpm-5.6/devilbox-fpm.conf-pm_dynamic @@ -0,0 +1,46 @@ +; ############################################################ +; # Devilbox php-fpm.conf: dynamic example +; ############################################################ +; +; Information +; ----------- +; * Do not edit this file (it belongs to git) +; * This file show a possible dynamic example configuration +; * If this file is enabled, it will overwrite the current worker settings +; +; How to enable? +; -------------- +; * Copy this file to another file with ".conf" extension +; * Only files with ".conf" extensions will be applied by PHP-FPM + + +; ### +; ### Pool configuratoin +; ### + +[www] + +; dynamic - the number of child processes is set dynamically based on the following directives: +pm = dynamic + +; The maximum number of child processes to be created +pm.max_children = 50 + +; The number of child processes created on startup. Used only when pm is set to dynamic. +; Default Value: min_spare_servers + (max_spare_servers - min_spare_servers) / 2. +pm.start_servers = 4 + +; The desired minimum number of idle server processes. +pm.min_spare_servers = 2 + +; The desired maximum number of idle server processes. +pm.max_spare_servers = 6 + +; The number of requests each child process should execute before respawning. +; This can be useful to work around memory leaks in 3rd party libraries. +; For endless request processing specify '0'. Equivalent to PHP_FCGI_MAX_REQUESTS. +; Default value: 0. +pm.max_requests = 500 + + +; vim: set ft=dosini: diff --git a/cfg/php-fpm-5.6/devilbox-fpm.conf-pm_ondemand b/cfg/php-fpm-5.6/devilbox-fpm.conf-pm_ondemand new file mode 100644 index 00000000..84cd3ca7 --- /dev/null +++ b/cfg/php-fpm-5.6/devilbox-fpm.conf-pm_ondemand @@ -0,0 +1,39 @@ +; ############################################################ +; # Devilbox php-fpm.conf: ondemand example +; ############################################################ +; +; Information +; ----------- +; * Do not edit this file (it belongs to git) +; * This file show a possible ondemand example configuration +; * If this file is enabled, it will overwrite the current worker settings +; +; How to enable? +; -------------- +; * Copy this file to another file with ".conf" extension +; * Only files with ".conf" extensions will be applied by PHP-FPM + + +; ### +; ### Pool configuratoin +; ### + +[www] + +; ondemand - the processes spawn on demand (when requested, as opposed to dynamic, where +; pm.start_servers are started when the service is started. +pm = ondemand + +; The maximum number of child processes to be created +pm.max_children = 50 + +; The number of requests each child process should execute before respawning. +; This can be useful to work around memory leaks in 3rd party libraries. +; For endless request processing specify '0'. Equivalent to PHP_FCGI_MAX_REQUESTS. +; Default value: 0. +pm.max_requests = 500 + +; The number of seconds after which an idle process will be killed. +pm.process_idle_timeout = 10s + +; vim: set ft=dosini: diff --git a/cfg/php-fpm-7.0/README.md b/cfg/php-fpm-7.0/README.md new file mode 100644 index 00000000..db30d63f --- /dev/null +++ b/cfg/php-fpm-7.0/README.md @@ -0,0 +1,54 @@ +# PHP-FPM config directory + +## General + +* Add you custom php-fpm.conf files into this directory. +* Only files ending by `.conf` will be enabled +* Only files ending by `.conf` are ignored by git + + +## Example files + +This directory also holds three example files: + +| File | Description | +|---------------------------------|---------------------------------------------| +| `devilbox-fpm.conf-default` | Represents current PHP-FPM default settings | +| `devilbox-fpm.conf-pm_dynamic` | Example settings for dynamic workers | +| `devilbox-fpm.conf-pm_ondemand` | Example settings for ondemand workers | + +* Do not edit these example files! +* Copy them to a new file (in case you want to use them) + + +## Worker configuration + +When changing worker processes or scheduler, the following commands will come in handy +to monitor number of processes and memory consumption. + +```bash +# Show current PHP-FPM child memory consumption in MB +ps -ylC php-fpm --sort:rss | awk '!/RSS/ { s+=$8 } END { printf "%dM\n", s/1024 }' + +# (repeatedly) show current PHP-FPM child memory consumption in MB +watch --interval=1 "ps -ylC php-fpm --sort:rss | awk '"'!'"/RSS/ { s+=\$8 } END { printf \"%dM\n\", s/1024 }'" + +# (repeatedly) Current number of PHP-FPM childs +watch --interval=1 "ps auxw | grep -E 'php-(cgi|fpm)' | grep -vE 'grep|master' | wc -l" +``` + + +## Overwriting + +If multiple `.conf` files are present in this directory specifying different values for the +same settings, the last file (alphabetically by filename) will overwrite any previous values. + + +## Compatibility + +**Note:** + +PHP-FPM 5.2 uses XML-style configuration and does not allow includes. +If you want to change php-fpm.conf for PHP-FPM 5.2 you need to adjust the main configuration file. + +See `php-fpm-5.2/` directory. diff --git a/cfg/php-fpm-7.0/devilbox-fpm.conf-default b/cfg/php-fpm-7.0/devilbox-fpm.conf-default new file mode 100644 index 00000000..5467dd45 --- /dev/null +++ b/cfg/php-fpm-7.0/devilbox-fpm.conf-default @@ -0,0 +1,80 @@ +; ############################################################ +; Devilbox php-fpm.conf: Current default settings +; ############################################################ +; +; Information +; ----------- +; * Do not edit this file (it belongs to git) +; * This file shows example settings that are currently effective +; * If this file is enabled, nothing will change as it reflects the current default settings +; +; How to enable? +; -------------- +; * Copy this file to another file with ".conf" extension +; * Only files with ".conf" extensions will be applied by PHP-FPM + + +; ### +; ### PHP-FPM global settings +; ### +; +[global] + +; Error log level. Possible values: alert, error, warning, notice, debug. Default value: notice. +log_level = notice + + + +; ### +; ### Pool configuratoin +; ### + +[www] + +; The timeout for serving a single request after which the worker process will be killed. +; This option should be used when the 'max_execution_time' ini option does not stop script +; execution for some reason. +request_terminate_timeout = 120s + + +; A maximum of backlog incoming connections will be queued for processing. +; If a connection request arrives with the queue full the client may receive an error with an +; indication of ECONNREFUSED, or, if the underlying protocol supports retransmission, +; the request may be ignored so that retries may succeed. +; This should not be greater than `cat /proc/sys/net/core/somaxconn`, otherwise connections +; are silently truncated +listen.backlog = 128 + + +; static - the number of child processes is fixed (pm.max_children). +; +; dynamic - the number of child processes is set dynamically based on the following directives: +; pm.max_children, pm.start_servers, pm.min_spare_servers, pm.max_spare_servers. +; +; ondemand - the processes spawn on demand (when requested, as opposed to dynamic, where +; pm.start_servers are started when the service is started. +pm = ondemand + +; The maximum number of child processes to be created +pm.max_children = 50 + +; The number of child processes created on startup. Used only when pm is set to dynamic. +; Default Value: min_spare_servers + (max_spare_servers - min_spare_servers) / 2. +pm.start_servers = 4 + +; The desired minimum number of idle server processes. +pm.min_spare_servers = 2 + +; The desired maximum number of idle server processes. +pm.max_spare_servers = 6 + +; The number of requests each child process should execute before respawning. +; This can be useful to work around memory leaks in 3rd party libraries. +; For endless request processing specify '0'. Equivalent to PHP_FCGI_MAX_REQUESTS. +; Default value: 0. +pm.max_requests = 500 + +; The number of seconds after which an idle process will be killed. Used only when pm is set to ondemand +pm.process_idle_timeout = 10s + +; vim: set ft=dosini: diff --git a/cfg/php-fpm-7.0/devilbox-fpm.conf-pm_dynamic b/cfg/php-fpm-7.0/devilbox-fpm.conf-pm_dynamic new file mode 100644 index 00000000..59ec044b --- /dev/null +++ b/cfg/php-fpm-7.0/devilbox-fpm.conf-pm_dynamic @@ -0,0 +1,46 @@ +; ############################################################ +; # Devilbox php-fpm.conf: dynamic example +; ############################################################ +; +; Information +; ----------- +; * Do not edit this file (it belongs to git) +; * This file show a possible dynamic example configuration +; * If this file is enabled, it will overwrite the current worker settings +; +; How to enable? +; -------------- +; * Copy this file to another file with ".conf" extension +; * Only files with ".conf" extensions will be applied by PHP-FPM + + +; ### +; ### Pool configuratoin +; ### + +[www] + +; dynamic - the number of child processes is set dynamically based on the following directives: +pm = dynamic + +; The maximum number of child processes to be created +pm.max_children = 50 + +; The number of child processes created on startup. Used only when pm is set to dynamic. +; Default Value: min_spare_servers + (max_spare_servers - min_spare_servers) / 2. +pm.start_servers = 4 + +; The desired minimum number of idle server processes. +pm.min_spare_servers = 2 + +; The desired maximum number of idle server processes. +pm.max_spare_servers = 6 + +; The number of requests each child process should execute before respawning. +; This can be useful to work around memory leaks in 3rd party libraries. +; For endless request processing specify '0'. Equivalent to PHP_FCGI_MAX_REQUESTS. +; Default value: 0. +pm.max_requests = 500 + + +; vim: set ft=dosini: diff --git a/cfg/php-fpm-7.0/devilbox-fpm.conf-pm_ondemand b/cfg/php-fpm-7.0/devilbox-fpm.conf-pm_ondemand new file mode 100644 index 00000000..84cd3ca7 --- /dev/null +++ b/cfg/php-fpm-7.0/devilbox-fpm.conf-pm_ondemand @@ -0,0 +1,39 @@ +; ############################################################ +; # Devilbox php-fpm.conf: ondemand example +; ############################################################ +; +; Information +; ----------- +; * Do not edit this file (it belongs to git) +; * This file show a possible ondemand example configuration +; * If this file is enabled, it will overwrite the current worker settings +; +; How to enable? +; -------------- +; * Copy this file to another file with ".conf" extension +; * Only files with ".conf" extensions will be applied by PHP-FPM + + +; ### +; ### Pool configuratoin +; ### + +[www] + +; ondemand - the processes spawn on demand (when requested, as opposed to dynamic, where +; pm.start_servers are started when the service is started. +pm = ondemand + +; The maximum number of child processes to be created +pm.max_children = 50 + +; The number of requests each child process should execute before respawning. +; This can be useful to work around memory leaks in 3rd party libraries. +; For endless request processing specify '0'. Equivalent to PHP_FCGI_MAX_REQUESTS. +; Default value: 0. +pm.max_requests = 500 + +; The number of seconds after which an idle process will be killed. +pm.process_idle_timeout = 10s + +; vim: set ft=dosini: diff --git a/cfg/php-fpm-7.1/README.md b/cfg/php-fpm-7.1/README.md new file mode 100644 index 00000000..db30d63f --- /dev/null +++ b/cfg/php-fpm-7.1/README.md @@ -0,0 +1,54 @@ +# PHP-FPM config directory + +## General + +* Add you custom php-fpm.conf files into this directory. +* Only files ending by `.conf` will be enabled +* Only files ending by `.conf` are ignored by git + + +## Example files + +This directory also holds three example files: + +| File | Description | +|---------------------------------|---------------------------------------------| +| `devilbox-fpm.conf-default` | Represents current PHP-FPM default settings | +| `devilbox-fpm.conf-pm_dynamic` | Example settings for dynamic workers | +| `devilbox-fpm.conf-pm_ondemand` | Example settings for ondemand workers | + +* Do not edit these example files! +* Copy them to a new file (in case you want to use them) + + +## Worker configuration + +When changing worker processes or scheduler, the following commands will come in handy +to monitor number of processes and memory consumption. + +```bash +# Show current PHP-FPM child memory consumption in MB +ps -ylC php-fpm --sort:rss | awk '!/RSS/ { s+=$8 } END { printf "%dM\n", s/1024 }' + +# (repeatedly) show current PHP-FPM child memory consumption in MB +watch --interval=1 "ps -ylC php-fpm --sort:rss | awk '"'!'"/RSS/ { s+=\$8 } END { printf \"%dM\n\", s/1024 }'" + +# (repeatedly) Current number of PHP-FPM childs +watch --interval=1 "ps auxw | grep -E 'php-(cgi|fpm)' | grep -vE 'grep|master' | wc -l" +``` + + +## Overwriting + +If multiple `.conf` files are present in this directory specifying different values for the +same settings, the last file (alphabetically by filename) will overwrite any previous values. + + +## Compatibility + +**Note:** + +PHP-FPM 5.2 uses XML-style configuration and does not allow includes. +If you want to change php-fpm.conf for PHP-FPM 5.2 you need to adjust the main configuration file. + +See `php-fpm-5.2/` directory. diff --git a/cfg/php-fpm-7.1/devilbox-fpm.conf-default b/cfg/php-fpm-7.1/devilbox-fpm.conf-default new file mode 100644 index 00000000..5467dd45 --- /dev/null +++ b/cfg/php-fpm-7.1/devilbox-fpm.conf-default @@ -0,0 +1,80 @@ +; ############################################################ +; Devilbox php-fpm.conf: Current default settings +; ############################################################ +; +; Information +; ----------- +; * Do not edit this file (it belongs to git) +; * This file shows example settings that are currently effective +; * If this file is enabled, nothing will change as it reflects the current default settings +; +; How to enable? +; -------------- +; * Copy this file to another file with ".conf" extension +; * Only files with ".conf" extensions will be applied by PHP-FPM + + +; ### +; ### PHP-FPM global settings +; ### +; +[global] + +; Error log level. Possible values: alert, error, warning, notice, debug. Default value: notice. +log_level = notice + + + +; ### +; ### Pool configuratoin +; ### + +[www] + +; The timeout for serving a single request after which the worker process will be killed. +; This option should be used when the 'max_execution_time' ini option does not stop script +; execution for some reason. +request_terminate_timeout = 120s + + +; A maximum of backlog incoming connections will be queued for processing. +; If a connection request arrives with the queue full the client may receive an error with an +; indication of ECONNREFUSED, or, if the underlying protocol supports retransmission, +; the request may be ignored so that retries may succeed. +; This should not be greater than `cat /proc/sys/net/core/somaxconn`, otherwise connections +; are silently truncated +listen.backlog = 128 + + +; static - the number of child processes is fixed (pm.max_children). +; +; dynamic - the number of child processes is set dynamically based on the following directives: +; pm.max_children, pm.start_servers, pm.min_spare_servers, pm.max_spare_servers. +; +; ondemand - the processes spawn on demand (when requested, as opposed to dynamic, where +; pm.start_servers are started when the service is started. +pm = ondemand + +; The maximum number of child processes to be created +pm.max_children = 50 + +; The number of child processes created on startup. Used only when pm is set to dynamic. +; Default Value: min_spare_servers + (max_spare_servers - min_spare_servers) / 2. +pm.start_servers = 4 + +; The desired minimum number of idle server processes. +pm.min_spare_servers = 2 + +; The desired maximum number of idle server processes. +pm.max_spare_servers = 6 + +; The number of requests each child process should execute before respawning. +; This can be useful to work around memory leaks in 3rd party libraries. +; For endless request processing specify '0'. Equivalent to PHP_FCGI_MAX_REQUESTS. +; Default value: 0. +pm.max_requests = 500 + +; The number of seconds after which an idle process will be killed. Used only when pm is set to ondemand +pm.process_idle_timeout = 10s + +; vim: set ft=dosini: diff --git a/cfg/php-fpm-7.1/devilbox-fpm.conf-pm_dynamic b/cfg/php-fpm-7.1/devilbox-fpm.conf-pm_dynamic new file mode 100644 index 00000000..59ec044b --- /dev/null +++ b/cfg/php-fpm-7.1/devilbox-fpm.conf-pm_dynamic @@ -0,0 +1,46 @@ +; ############################################################ +; # Devilbox php-fpm.conf: dynamic example +; ############################################################ +; +; Information +; ----------- +; * Do not edit this file (it belongs to git) +; * This file show a possible dynamic example configuration +; * If this file is enabled, it will overwrite the current worker settings +; +; How to enable? +; -------------- +; * Copy this file to another file with ".conf" extension +; * Only files with ".conf" extensions will be applied by PHP-FPM + + +; ### +; ### Pool configuratoin +; ### + +[www] + +; dynamic - the number of child processes is set dynamically based on the following directives: +pm = dynamic + +; The maximum number of child processes to be created +pm.max_children = 50 + +; The number of child processes created on startup. Used only when pm is set to dynamic. +; Default Value: min_spare_servers + (max_spare_servers - min_spare_servers) / 2. +pm.start_servers = 4 + +; The desired minimum number of idle server processes. +pm.min_spare_servers = 2 + +; The desired maximum number of idle server processes. +pm.max_spare_servers = 6 + +; The number of requests each child process should execute before respawning. +; This can be useful to work around memory leaks in 3rd party libraries. +; For endless request processing specify '0'. Equivalent to PHP_FCGI_MAX_REQUESTS. +; Default value: 0. +pm.max_requests = 500 + + +; vim: set ft=dosini: diff --git a/cfg/php-fpm-7.1/devilbox-fpm.conf-pm_ondemand b/cfg/php-fpm-7.1/devilbox-fpm.conf-pm_ondemand new file mode 100644 index 00000000..84cd3ca7 --- /dev/null +++ b/cfg/php-fpm-7.1/devilbox-fpm.conf-pm_ondemand @@ -0,0 +1,39 @@ +; ############################################################ +; # Devilbox php-fpm.conf: ondemand example +; ############################################################ +; +; Information +; ----------- +; * Do not edit this file (it belongs to git) +; * This file show a possible ondemand example configuration +; * If this file is enabled, it will overwrite the current worker settings +; +; How to enable? +; -------------- +; * Copy this file to another file with ".conf" extension +; * Only files with ".conf" extensions will be applied by PHP-FPM + + +; ### +; ### Pool configuratoin +; ### + +[www] + +; ondemand - the processes spawn on demand (when requested, as opposed to dynamic, where +; pm.start_servers are started when the service is started. +pm = ondemand + +; The maximum number of child processes to be created +pm.max_children = 50 + +; The number of requests each child process should execute before respawning. +; This can be useful to work around memory leaks in 3rd party libraries. +; For endless request processing specify '0'. Equivalent to PHP_FCGI_MAX_REQUESTS. +; Default value: 0. +pm.max_requests = 500 + +; The number of seconds after which an idle process will be killed. +pm.process_idle_timeout = 10s + +; vim: set ft=dosini: diff --git a/cfg/php-fpm-7.2/README.md b/cfg/php-fpm-7.2/README.md new file mode 100644 index 00000000..db30d63f --- /dev/null +++ b/cfg/php-fpm-7.2/README.md @@ -0,0 +1,54 @@ +# PHP-FPM config directory + +## General + +* Add you custom php-fpm.conf files into this directory. +* Only files ending by `.conf` will be enabled +* Only files ending by `.conf` are ignored by git + + +## Example files + +This directory also holds three example files: + +| File | Description | +|---------------------------------|---------------------------------------------| +| `devilbox-fpm.conf-default` | Represents current PHP-FPM default settings | +| `devilbox-fpm.conf-pm_dynamic` | Example settings for dynamic workers | +| `devilbox-fpm.conf-pm_ondemand` | Example settings for ondemand workers | + +* Do not edit these example files! +* Copy them to a new file (in case you want to use them) + + +## Worker configuration + +When changing worker processes or scheduler, the following commands will come in handy +to monitor number of processes and memory consumption. + +```bash +# Show current PHP-FPM child memory consumption in MB +ps -ylC php-fpm --sort:rss | awk '!/RSS/ { s+=$8 } END { printf "%dM\n", s/1024 }' + +# (repeatedly) show current PHP-FPM child memory consumption in MB +watch --interval=1 "ps -ylC php-fpm --sort:rss | awk '"'!'"/RSS/ { s+=\$8 } END { printf \"%dM\n\", s/1024 }'" + +# (repeatedly) Current number of PHP-FPM childs +watch --interval=1 "ps auxw | grep -E 'php-(cgi|fpm)' | grep -vE 'grep|master' | wc -l" +``` + + +## Overwriting + +If multiple `.conf` files are present in this directory specifying different values for the +same settings, the last file (alphabetically by filename) will overwrite any previous values. + + +## Compatibility + +**Note:** + +PHP-FPM 5.2 uses XML-style configuration and does not allow includes. +If you want to change php-fpm.conf for PHP-FPM 5.2 you need to adjust the main configuration file. + +See `php-fpm-5.2/` directory. diff --git a/cfg/php-fpm-7.2/devilbox-fpm.conf-default b/cfg/php-fpm-7.2/devilbox-fpm.conf-default new file mode 100644 index 00000000..5467dd45 --- /dev/null +++ b/cfg/php-fpm-7.2/devilbox-fpm.conf-default @@ -0,0 +1,80 @@ +; ############################################################ +; Devilbox php-fpm.conf: Current default settings +; ############################################################ +; +; Information +; ----------- +; * Do not edit this file (it belongs to git) +; * This file shows example settings that are currently effective +; * If this file is enabled, nothing will change as it reflects the current default settings +; +; How to enable? +; -------------- +; * Copy this file to another file with ".conf" extension +; * Only files with ".conf" extensions will be applied by PHP-FPM + + +; ### +; ### PHP-FPM global settings +; ### +; +[global] + +; Error log level. Possible values: alert, error, warning, notice, debug. Default value: notice. +log_level = notice + + + +; ### +; ### Pool configuratoin +; ### + +[www] + +; The timeout for serving a single request after which the worker process will be killed. +; This option should be used when the 'max_execution_time' ini option does not stop script +; execution for some reason. +request_terminate_timeout = 120s + + +; A maximum of backlog incoming connections will be queued for processing. +; If a connection request arrives with the queue full the client may receive an error with an +; indication of ECONNREFUSED, or, if the underlying protocol supports retransmission, +; the request may be ignored so that retries may succeed. +; This should not be greater than `cat /proc/sys/net/core/somaxconn`, otherwise connections +; are silently truncated +listen.backlog = 128 + + +; static - the number of child processes is fixed (pm.max_children). +; +; dynamic - the number of child processes is set dynamically based on the following directives: +; pm.max_children, pm.start_servers, pm.min_spare_servers, pm.max_spare_servers. +; +; ondemand - the processes spawn on demand (when requested, as opposed to dynamic, where +; pm.start_servers are started when the service is started. +pm = ondemand + +; The maximum number of child processes to be created +pm.max_children = 50 + +; The number of child processes created on startup. Used only when pm is set to dynamic. +; Default Value: min_spare_servers + (max_spare_servers - min_spare_servers) / 2. +pm.start_servers = 4 + +; The desired minimum number of idle server processes. +pm.min_spare_servers = 2 + +; The desired maximum number of idle server processes. +pm.max_spare_servers = 6 + +; The number of requests each child process should execute before respawning. +; This can be useful to work around memory leaks in 3rd party libraries. +; For endless request processing specify '0'. Equivalent to PHP_FCGI_MAX_REQUESTS. +; Default value: 0. +pm.max_requests = 500 + +; The number of seconds after which an idle process will be killed. Used only when pm is set to ondemand +pm.process_idle_timeout = 10s + +; vim: set ft=dosini: diff --git a/cfg/php-fpm-7.2/devilbox-fpm.conf-pm_dynamic b/cfg/php-fpm-7.2/devilbox-fpm.conf-pm_dynamic new file mode 100644 index 00000000..59ec044b --- /dev/null +++ b/cfg/php-fpm-7.2/devilbox-fpm.conf-pm_dynamic @@ -0,0 +1,46 @@ +; ############################################################ +; # Devilbox php-fpm.conf: dynamic example +; ############################################################ +; +; Information +; ----------- +; * Do not edit this file (it belongs to git) +; * This file show a possible dynamic example configuration +; * If this file is enabled, it will overwrite the current worker settings +; +; How to enable? +; -------------- +; * Copy this file to another file with ".conf" extension +; * Only files with ".conf" extensions will be applied by PHP-FPM + + +; ### +; ### Pool configuratoin +; ### + +[www] + +; dynamic - the number of child processes is set dynamically based on the following directives: +pm = dynamic + +; The maximum number of child processes to be created +pm.max_children = 50 + +; The number of child processes created on startup. Used only when pm is set to dynamic. +; Default Value: min_spare_servers + (max_spare_servers - min_spare_servers) / 2. +pm.start_servers = 4 + +; The desired minimum number of idle server processes. +pm.min_spare_servers = 2 + +; The desired maximum number of idle server processes. +pm.max_spare_servers = 6 + +; The number of requests each child process should execute before respawning. +; This can be useful to work around memory leaks in 3rd party libraries. +; For endless request processing specify '0'. Equivalent to PHP_FCGI_MAX_REQUESTS. +; Default value: 0. +pm.max_requests = 500 + + +; vim: set ft=dosini: diff --git a/cfg/php-fpm-7.2/devilbox-fpm.conf-pm_ondemand b/cfg/php-fpm-7.2/devilbox-fpm.conf-pm_ondemand new file mode 100644 index 00000000..84cd3ca7 --- /dev/null +++ b/cfg/php-fpm-7.2/devilbox-fpm.conf-pm_ondemand @@ -0,0 +1,39 @@ +; ############################################################ +; # Devilbox php-fpm.conf: ondemand example +; ############################################################ +; +; Information +; ----------- +; * Do not edit this file (it belongs to git) +; * This file show a possible ondemand example configuration +; * If this file is enabled, it will overwrite the current worker settings +; +; How to enable? +; -------------- +; * Copy this file to another file with ".conf" extension +; * Only files with ".conf" extensions will be applied by PHP-FPM + + +; ### +; ### Pool configuratoin +; ### + +[www] + +; ondemand - the processes spawn on demand (when requested, as opposed to dynamic, where +; pm.start_servers are started when the service is started. +pm = ondemand + +; The maximum number of child processes to be created +pm.max_children = 50 + +; The number of requests each child process should execute before respawning. +; This can be useful to work around memory leaks in 3rd party libraries. +; For endless request processing specify '0'. Equivalent to PHP_FCGI_MAX_REQUESTS. +; Default value: 0. +pm.max_requests = 500 + +; The number of seconds after which an idle process will be killed. +pm.process_idle_timeout = 10s + +; vim: set ft=dosini: diff --git a/cfg/php-fpm-7.3/README.md b/cfg/php-fpm-7.3/README.md new file mode 100644 index 00000000..db30d63f --- /dev/null +++ b/cfg/php-fpm-7.3/README.md @@ -0,0 +1,54 @@ +# PHP-FPM config directory + +## General + +* Add you custom php-fpm.conf files into this directory. +* Only files ending by `.conf` will be enabled +* Only files ending by `.conf` are ignored by git + + +## Example files + +This directory also holds three example files: + +| File | Description | +|---------------------------------|---------------------------------------------| +| `devilbox-fpm.conf-default` | Represents current PHP-FPM default settings | +| `devilbox-fpm.conf-pm_dynamic` | Example settings for dynamic workers | +| `devilbox-fpm.conf-pm_ondemand` | Example settings for ondemand workers | + +* Do not edit these example files! +* Copy them to a new file (in case you want to use them) + + +## Worker configuration + +When changing worker processes or scheduler, the following commands will come in handy +to monitor number of processes and memory consumption. + +```bash +# Show current PHP-FPM child memory consumption in MB +ps -ylC php-fpm --sort:rss | awk '!/RSS/ { s+=$8 } END { printf "%dM\n", s/1024 }' + +# (repeatedly) show current PHP-FPM child memory consumption in MB +watch --interval=1 "ps -ylC php-fpm --sort:rss | awk '"'!'"/RSS/ { s+=\$8 } END { printf \"%dM\n\", s/1024 }'" + +# (repeatedly) Current number of PHP-FPM childs +watch --interval=1 "ps auxw | grep -E 'php-(cgi|fpm)' | grep -vE 'grep|master' | wc -l" +``` + + +## Overwriting + +If multiple `.conf` files are present in this directory specifying different values for the +same settings, the last file (alphabetically by filename) will overwrite any previous values. + + +## Compatibility + +**Note:** + +PHP-FPM 5.2 uses XML-style configuration and does not allow includes. +If you want to change php-fpm.conf for PHP-FPM 5.2 you need to adjust the main configuration file. + +See `php-fpm-5.2/` directory. diff --git a/cfg/php-fpm-7.3/devilbox-fpm.conf-default b/cfg/php-fpm-7.3/devilbox-fpm.conf-default new file mode 100644 index 00000000..5467dd45 --- /dev/null +++ b/cfg/php-fpm-7.3/devilbox-fpm.conf-default @@ -0,0 +1,80 @@ +; ############################################################ +; Devilbox php-fpm.conf: Current default settings +; ############################################################ +; +; Information +; ----------- +; * Do not edit this file (it belongs to git) +; * This file shows example settings that are currently effective +; * If this file is enabled, nothing will change as it reflects the current default settings +; +; How to enable? +; -------------- +; * Copy this file to another file with ".conf" extension +; * Only files with ".conf" extensions will be applied by PHP-FPM + + +; ### +; ### PHP-FPM global settings +; ### +; +[global] + +; Error log level. Possible values: alert, error, warning, notice, debug. Default value: notice. +log_level = notice + + + +; ### +; ### Pool configuratoin +; ### + +[www] + +; The timeout for serving a single request after which the worker process will be killed. +; This option should be used when the 'max_execution_time' ini option does not stop script +; execution for some reason. +request_terminate_timeout = 120s + + +; A maximum of backlog incoming connections will be queued for processing. +; If a connection request arrives with the queue full the client may receive an error with an +; indication of ECONNREFUSED, or, if the underlying protocol supports retransmission, +; the request may be ignored so that retries may succeed. +; This should not be greater than `cat /proc/sys/net/core/somaxconn`, otherwise connections +; are silently truncated +listen.backlog = 128 + + +; static - the number of child processes is fixed (pm.max_children). +; +; dynamic - the number of child processes is set dynamically based on the following directives: +; pm.max_children, pm.start_servers, pm.min_spare_servers, pm.max_spare_servers. +; +; ondemand - the processes spawn on demand (when requested, as opposed to dynamic, where +; pm.start_servers are started when the service is started. +pm = ondemand + +; The maximum number of child processes to be created +pm.max_children = 50 + +; The number of child processes created on startup. Used only when pm is set to dynamic. +; Default Value: min_spare_servers + (max_spare_servers - min_spare_servers) / 2. +pm.start_servers = 4 + +; The desired minimum number of idle server processes. +pm.min_spare_servers = 2 + +; The desired maximum number of idle server processes. +pm.max_spare_servers = 6 + +; The number of requests each child process should execute before respawning. +; This can be useful to work around memory leaks in 3rd party libraries. +; For endless request processing specify '0'. Equivalent to PHP_FCGI_MAX_REQUESTS. +; Default value: 0. +pm.max_requests = 500 + +; The number of seconds after which an idle process will be killed. Used only when pm is set to ondemand +pm.process_idle_timeout = 10s + +; vim: set ft=dosini: diff --git a/cfg/php-fpm-7.3/devilbox-fpm.conf-pm_dynamic b/cfg/php-fpm-7.3/devilbox-fpm.conf-pm_dynamic new file mode 100644 index 00000000..59ec044b --- /dev/null +++ b/cfg/php-fpm-7.3/devilbox-fpm.conf-pm_dynamic @@ -0,0 +1,46 @@ +; ############################################################ +; # Devilbox php-fpm.conf: dynamic example +; ############################################################ +; +; Information +; ----------- +; * Do not edit this file (it belongs to git) +; * This file show a possible dynamic example configuration +; * If this file is enabled, it will overwrite the current worker settings +; +; How to enable? +; -------------- +; * Copy this file to another file with ".conf" extension +; * Only files with ".conf" extensions will be applied by PHP-FPM + + +; ### +; ### Pool configuratoin +; ### + +[www] + +; dynamic - the number of child processes is set dynamically based on the following directives: +pm = dynamic + +; The maximum number of child processes to be created +pm.max_children = 50 + +; The number of child processes created on startup. Used only when pm is set to dynamic. +; Default Value: min_spare_servers + (max_spare_servers - min_spare_servers) / 2. +pm.start_servers = 4 + +; The desired minimum number of idle server processes. +pm.min_spare_servers = 2 + +; The desired maximum number of idle server processes. +pm.max_spare_servers = 6 + +; The number of requests each child process should execute before respawning. +; This can be useful to work around memory leaks in 3rd party libraries. +; For endless request processing specify '0'. Equivalent to PHP_FCGI_MAX_REQUESTS. +; Default value: 0. +pm.max_requests = 500 + + +; vim: set ft=dosini: diff --git a/cfg/php-fpm-7.3/devilbox-fpm.conf-pm_ondemand b/cfg/php-fpm-7.3/devilbox-fpm.conf-pm_ondemand new file mode 100644 index 00000000..84cd3ca7 --- /dev/null +++ b/cfg/php-fpm-7.3/devilbox-fpm.conf-pm_ondemand @@ -0,0 +1,39 @@ +; ############################################################ +; # Devilbox php-fpm.conf: ondemand example +; ############################################################ +; +; Information +; ----------- +; * Do not edit this file (it belongs to git) +; * This file show a possible ondemand example configuration +; * If this file is enabled, it will overwrite the current worker settings +; +; How to enable? +; -------------- +; * Copy this file to another file with ".conf" extension +; * Only files with ".conf" extensions will be applied by PHP-FPM + + +; ### +; ### Pool configuratoin +; ### + +[www] + +; ondemand - the processes spawn on demand (when requested, as opposed to dynamic, where +; pm.start_servers are started when the service is started. +pm = ondemand + +; The maximum number of child processes to be created +pm.max_children = 50 + +; The number of requests each child process should execute before respawning. +; This can be useful to work around memory leaks in 3rd party libraries. +; For endless request processing specify '0'. Equivalent to PHP_FCGI_MAX_REQUESTS. +; Default value: 0. +pm.max_requests = 500 + +; The number of seconds after which an idle process will be killed. +pm.process_idle_timeout = 10s + +; vim: set ft=dosini: From eb0f119f7af7bdbe5c5e15b1bcac70512390d891 Mon Sep 17 00:00:00 2001 From: cytopia Date: Sat, 4 Aug 2018 02:12:22 +0200 Subject: [PATCH 03/25] Adjust gitignore for PHP 5.2, 5.3 and 7.3 --- .gitignore | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.gitignore b/.gitignore index 8d53e772..388720cc 100644 --- a/.gitignore +++ b/.gitignore @@ -48,30 +48,39 @@ docker-compose.override.yml /cfg/percona-5.7/*.cnf # Ignore custom PHP.ini configs +/cfg/php-ini-5.2/*.ini +/cfg/php-ini-5.3/*.ini /cfg/php-ini-5.4/*.ini /cfg/php-ini-5.5/*.ini /cfg/php-ini-5.6/*.ini /cfg/php-ini-7.0/*.ini /cfg/php-ini-7.1/*.ini /cfg/php-ini-7.2/*.ini +/cfg/php-ini-7.3/*.ini #/cfg/hhvm-latest/*.ini # Ignore custom PHP-FPM configs +/cfg/php-fpm-5.2/php-fpm.xml +/cfg/php-fpm-5.3/*.conf /cfg/php-fpm-5.4/*.conf /cfg/php-fpm-5.5/*.conf /cfg/php-fpm-5.6/*.conf /cfg/php-fpm-7.0/*.conf /cfg/php-fpm-7.1/*.conf /cfg/php-fpm-7.2/*.conf +/cfg/php-fpm-7.3/*.conf #/cfg/hhvm-latest/*.conf # Ignore custom PHP-FPM modules +/mod/php-fpm-5.2/*.so +/mod/php-fpm-5.3/*.so /mod/php-fpm-5.4/*.so /mod/php-fpm-5.5/*.so /mod/php-fpm-5.6/*.so /mod/php-fpm-7.0/*.so /mod/php-fpm-7.1/*.so /mod/php-fpm-7.2/*.so +/mod/php-fpm-7.3/*.so #/mod/hhvm-latest/*.so # Ignore custom bash and other confi files From 1502a7e22bc8fdb83934414a9f19827f94c9dc7b Mon Sep 17 00:00:00 2001 From: cytopia Date: Sat, 4 Aug 2018 02:20:47 +0200 Subject: [PATCH 04/25] Adjust documentation to newly create Xdebug default configuration --- docs/intermediate/configure-php-xdebug/xdebug-lin.rst | 3 ++- docs/intermediate/configure-php-xdebug/xdebug-mac.rst | 6 ++++-- docs/intermediate/configure-php-xdebug/xdebug-win.rst | 6 ++++-- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/docs/intermediate/configure-php-xdebug/xdebug-lin.rst b/docs/intermediate/configure-php-xdebug/xdebug-lin.rst index 895490ea..2dfe5447 100644 --- a/docs/intermediate/configure-php-xdebug/xdebug-lin.rst +++ b/docs/intermediate/configure-php-xdebug/xdebug-lin.rst @@ -51,9 +51,10 @@ The following example show how to configure PHP Xdebug for PHP 5.6: .. code-block:: ini :caption: xdebug.ini - :emphasize-lines: 6,10 + :emphasize-lines: 7,11 # Defaults + xdebug.default_enable=1 xdebug.remote_enable=1 xdebug.remote_port=9000 diff --git a/docs/intermediate/configure-php-xdebug/xdebug-mac.rst b/docs/intermediate/configure-php-xdebug/xdebug-mac.rst index 2767500d..d6739b20 100644 --- a/docs/intermediate/configure-php-xdebug/xdebug-mac.rst +++ b/docs/intermediate/configure-php-xdebug/xdebug-mac.rst @@ -75,9 +75,10 @@ The following example show how to configure PHP Xdebug for PHP 5.6: .. code-block:: ini :caption: xdebug.ini - :emphasize-lines: 6-7,11 + :emphasize-lines: 7-8,12 # Defaults + xdebug.default_enable=1 xdebug.remote_enable=1 xdebug.remote_port=9000 @@ -138,9 +139,10 @@ The following example show how to configure PHP Xdebug for PHP 5.6: .. code-block:: ini :caption: xdebug.ini - :emphasize-lines: 6-7,11 + :emphasize-lines: 7-8,12 # Defaults + xdebug.default_enable=1 xdebug.remote_enable=1 xdebug.remote_port=9000 diff --git a/docs/intermediate/configure-php-xdebug/xdebug-win.rst b/docs/intermediate/configure-php-xdebug/xdebug-win.rst index 5095ca56..eefc8b14 100644 --- a/docs/intermediate/configure-php-xdebug/xdebug-win.rst +++ b/docs/intermediate/configure-php-xdebug/xdebug-win.rst @@ -68,9 +68,10 @@ The following example show how to configure PHP Xdebug for PHP 5.6: .. code-block:: ini :caption: xdebug.ini - :emphasize-lines: 6-7,11 + :emphasize-lines: 7-8,12 # Defaults + xdebug.default_enable=1 xdebug.remote_enable=1 xdebug.remote_port=9000 @@ -137,9 +138,10 @@ The following example show how to configure PHP Xdebug for PHP 5.6: .. code-block:: ini :caption: xdebug.ini - :emphasize-lines: 6-7,11 + :emphasize-lines: 7-8,12 # Defaults + xdebug.default_enable=1 xdebug.remote_enable=1 xdebug.remote_port=9000 From 1589dc96fe2ea9b667bb1243b0191251a4c53690 Mon Sep 17 00:00:00 2001 From: cytopia Date: Sat, 4 Aug 2018 12:52:24 +0200 Subject: [PATCH 05/25] Fixes #234 and fixes #311 performance issues and 504 Gateway timeouts --- docker-compose.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index affd8922..e416e8e1 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -94,7 +94,7 @@ services: # PHP / HHVM # ------------------------------------------------------------ php: - image: devilbox/php-fpm:${PHP_SERVER:-7.0}-work + image: devilbox/php-fpm:${PHP_SERVER:-7.0}-work-0.28 ## ## All .env variables @@ -204,7 +204,7 @@ services: # Web Server # ------------------------------------------------------------ httpd: - image: devilbox/${HTTPD_SERVER:-nginx-stable}:0.18 + image: devilbox/${HTTPD_SERVER:-nginx-stable}:0.20 environment: From 3c7fea1e0fd9c224b6956dac7768149e6e197705 Mon Sep 17 00:00:00 2001 From: cytopia Date: Sat, 4 Aug 2018 12:52:47 +0200 Subject: [PATCH 06/25] Adding PHP 5.2 compatibility mode --- docker-compose.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/docker-compose.yml b/docker-compose.yml index e416e8e1..663bc33b 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -249,6 +249,7 @@ services: ## ## PHP-FPM Remote Server ## + - COMPAT=${PHP_SERVER:-7.0} - PHP_FPM_ENABLE=1 - PHP_FPM_SERVER_ADDR=php - PHP_FPM_SERVER_PORT=9000 From 42daba8ba69b5cdd740a6c78111e72c011189af3 Mon Sep 17 00:00:00 2001 From: cytopia Date: Sat, 4 Aug 2018 13:21:46 +0200 Subject: [PATCH 07/25] Add documentation links --- README.md | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/README.md b/README.md index 07366c89..3f5d03bc 100644 --- a/README.md +++ b/README.md @@ -92,6 +92,12 @@ $ vim .env $ docker-compose up ``` +> **See documentation:** +> +> * [Install the Devilbox](https://devilbox.readthedocs.io/en/latest/getting-started/install-the-devilbox.html) +> * [Start the Devilbox](https://devilbox.readthedocs.io/en/latest/getting-started/start-the-devilbox.html) + + #### Selective start The above will start all containers, you can however also just start the containers you actually need. This is achieved by simply specifying them in the docker-compose command. @@ -99,6 +105,11 @@ The above will start all containers, you can however also just start the contain ```shell $ docker-compose up httpd php mysql redis ``` +> **See documentation:** +> +> * [Start only some container](https://devilbox.readthedocs.io/en/latest/getting-started/start-the-devilbox.html#start-some-container) + + ![Devilbox](docs/img/devilbox-dash-selective.png) #### Run different versions @@ -237,6 +248,12 @@ root@php-7.0.19 in /shared/httpd $ Your projects can be found in `/shared/httpd`. DNS records are automatically available inside the php container. Also every other service will be available on `127.0.0.1` inside the php container (tricky socat port-forwarding). +> **See documentation:** +> +> * [Work inside the PHP container](https://devilbox.readthedocs.io/en/latest/intermediate/work-inside-the-php-container.html) +> * [Directory overview](https://devilbox.readthedocs.io/en/latest/getting-started/directory-overview.html) + + #### Quick Video intro [![Devilbox setup and workflow](docs/img/devilbox_01-setup-and-workflow.png "devilbox - setup and workflow")](https://www.youtube.com/watch?v=reyZMyt2Zzo) @@ -302,6 +319,12 @@ The devilbox has everything setup for you. The only thing you will have to insta +> **See documentation:** +> +> * [Setup Auto DNS](https://devilbox.readthedocs.io/en/latest/intermediate/setup-auto-dns.html) +> * [Setup valid HTTPS](https://devilbox.readthedocs.io/en/latest/intermediate/setup-valid-https.html) +> * [Configure Xdebug](https://devilbox.readthedocs.io/en/latest/intermediate/configure-php-xdebug.html) +> * [Customize PHP](https://devilbox.readthedocs.io/en/latest/advanced/customize-php-globally.html) #### Batteries From 9e0f65b14770639c5cffb74a3b679417d08ac5f5 Mon Sep 17 00:00:00 2001 From: cytopia Date: Sat, 4 Aug 2018 13:22:06 +0200 Subject: [PATCH 08/25] Add PHP 5.2 information --- README.md | 34 +++++++++++++++++++++++++++------- 1 file changed, 27 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 3f5d03bc..171e55b2 100644 --- a/README.md +++ b/README.md @@ -135,7 +135,7 @@ Every single attachable container comes with many different versions. In order t 2.2 stable - 5.3 + 5.2[1] 5.5 5.5 5.5 @@ -147,7 +147,7 @@ Every single attachable container comes with many different versions. In order t 2.4 mainline - 5.4 + 5.3 5.6 10.0 5.6 @@ -159,7 +159,7 @@ Every single attachable container comes with many different versions. In order t - 5.5 + 5.4 5.7 10.1 5.7 @@ -171,7 +171,7 @@ Every single attachable container comes with many different versions. In order t - 5.6 + 5.5 8.0 10.2 @@ -183,7 +183,7 @@ Every single attachable container comes with many different versions. In order t - 7.0 + 5.6 10.3 @@ -195,7 +195,7 @@ Every single attachable container comes with many different versions. In order t - 7.1 + 7.0 @@ -207,7 +207,7 @@ Every single attachable container comes with many different versions. In order t - 7.2 + 7.1 @@ -216,6 +216,18 @@ Every single attachable container comes with many different versions. In order t latest + + + + 7.2 + + + + + + + + @@ -231,6 +243,14 @@ Every single attachable container comes with many different versions. In order t +[1] PHP 5.2 is available to use, but it is not officially supported. The Devilbox intranet does not work with this version as PHP 5.2 does not support namespaces. +Furthermore PHP 5.2 does only work with Apache 2.4, Nginx stable and Nginx mainline. It does not work with Apache 2.2. Use at your own risk. + +> **See documentation:** +> +> * [Change container versions](https://devilbox.readthedocs.io/en/latest/getting-started/change-container-versions.html) + + #### Enter the container You can also work directly inside the php container. Simply use the bundled scripts `shell.sh`. The `PS1` will automatically be populated with current chosen php version. From 66708e2b7656e58c14f3fe487fa3ed2a8ef80395 Mon Sep 17 00:00:00 2001 From: cytopia Date: Sat, 4 Aug 2018 13:22:26 +0200 Subject: [PATCH 09/25] Fix framework links --- README.md | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/README.md b/README.md index 171e55b2..cde0726c 100644 --- a/README.md +++ b/README.md @@ -481,21 +481,21 @@ You can also copy any custom modules into `mod/(php-fpm)-` and add a cu As far as tested there are no limitations and you can use any Framework or CMS just as you would on your live environment. Below are a few examples of extensively tested Frameworks and CMS: -[![CakePHP](docs/img/logo_fw/cake.png)](https://cakephp.org) -[![CakePHP](docs/img/logo_fw/codeigniter.png)](https://www.codeigniter.com/) -[![Drupal](docs/img/logo_fw/drupal.png)](https://www.drupal.org) -[![Joomla](docs/img/logo_fw/joomla.png)](https://www.joomla.org) -[![Laravel](docs/img/logo_fw/laravel.png)](https://laravel.com) -[![Magento](docs/img/logo_fw/magento.png)](https://magento.com) -[![Phalcon](docs/img/logo_fw/phalcon.png)](https://phalconphp.com) -[![PhotonCMS](docs/img/logo_fw/photoncms.png)](https://www.photonics.com/) -[![PrestaShop](docs/img/logo_fw/prestashop.png)](https://www.prestashop.com/en) -[![Shopware](docs/img/logo_fw/shopware.png)](https://en.shopware.com/) -[![Symfony](docs/img/logo_fw/symfony.png)](https://symfony.com) -[![Typo3](docs/img/logo_fw/typo3.png)](https://typo3.org/) -[![Wordpress](docs/img/logo_fw/wordpress.png)](https://wordpress.org) -[![Yii](docs/img/logo_fw/yii.png)](http://www.yiiframework.com) -[![Zend](docs/img/logo_fw/zend.png)](https://framework.zend.com) +Devilbox +Devilbox +Devilbox +Devilbox +Devilbox +Devilbox +Devilbox +Devilbox +Devilbox +Devilbox +Devilbox +Devilbox +Devilbox +Devilbox +Devilbox ## Intranet overview From f1a350c5b3e145778c3008c00ffadee6c49b631e Mon Sep 17 00:00:00 2001 From: cytopia Date: Sat, 4 Aug 2018 13:36:49 +0200 Subject: [PATCH 10/25] Add documentation links --- README.md | 41 ++++++++++++++++++++++++++++++++++------- 1 file changed, 34 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index cde0726c..f0134113 100644 --- a/README.md +++ b/README.md @@ -23,7 +23,7 @@ -The devilbox is a modern and highly customisable **dockerized PHP stack** supporting full **LAMP** and **MEAN** and running on all major platforms. The main goal is to easily switch and combine any version required for local development. It supports an **unlimited number of projects** for which vhosts, **SSL certificates** and **DNS records** are created automatically. Email catch-all and popular development tools will be at your service as well. Configuration is not necessary, as everything is pre-setup with mass virtual hosting. +The Devilbox is a modern and highly customisable **dockerized PHP stack** supporting full **LAMP** and **MEAN** and running on all major platforms. The main goal is to easily switch and combine any version required for local development. It supports an **unlimited number of projects** for which vhosts, **SSL certificates** and **DNS records** are created automatically. Email catch-all and popular development tools will be at your service as well. Configuration is not necessary, as everything is pre-setup with mass virtual hosting. **Requirements** @@ -78,7 +78,7 @@ Find documentation and help here You are up and running in four simple steps: ```shell -# Get the devilbox +# Get the Devilbox $ git clone https://github.com/cytopia/devilbox $ cd devilbox @@ -282,7 +282,11 @@ Your projects can be found in `/shared/httpd`. DNS records are automatically ava ## Feature overview -The devilbox has everything setup for you. The only thing you will have to install is [docker](https://docs.docker.com/engine/installation/) and [docker-compose](https://docs.docker.com/compose/install/). Virtual hosts and DNS entries will be created automatically, just by adding new project folders. +The Devilbox has everything setup for you. The only thing you will have to install is [Docker](https://docs.docker.com/engine/installation/) and [Docker Compose](https://docs.docker.com/compose/install/). Virtual hosts and DNS entries will be created automatically, just by adding new project folders. + +> **See documentation:** +> +> * [Devilbox Prerequisites](https://devilbox.readthedocs.io/en/latest/getting-started/prerequisites.html) #### Features @@ -298,7 +302,7 @@ The devilbox has everything setup for you. The only thing you will have to insta :star: Unlimited vhosts - Run as many projects as you need with a single instance of the devilbox. + Run as many projects as you need with a single instance of the Devilbox. :star: Custom vhosts @@ -469,10 +473,13 @@ Well-known and popular tools will be at your service as well: #### Available PHP Modules -The devilbox is a development stack, so it is made sure that a lot of PHP modules are available out of the box in order to work with many different frameworks. +The Devilbox is a development stack, so it is made sure that a lot of PHP modules are available out of the box in order to work with many different frameworks. > *amqp, apcu, bcmath, bz2, calendar, Core, ctype, curl, date, dba, dom, enchant, exif, fileinfo, filter, ftp, gd, gettext, gmp, hash, iconv, igbinary, imagick, imap, interbase, intl, json, ldap, libxml, mbstring, mcrypt, memcache, memcached, mongodb, msgpack, mysqli, mysqlnd, openssl, pcntl, pcre, PDO, pdo_dblib, PDO_Firebird, pdo_mysql, pdo_pgsql, pdo_sqlite, pgsql, phalcon, Phar, posix, pspell, readline, recode, redis, Reflection, session, shmop, SimpleXML, snmp, soap, sockets, sodium, SPL, sqlite3, standard, swoole, sysvmsg, sysvsem, sysvshm, tidy, tokenizer, uploadprogress, wddx, xdebug, xml, xmlreader, xmlrpc, xmlwriter, xsl, Zend OPcache, zip, zlib* +**See [PHP-FPM Docker image](https://github.com/devilbox/docker-php-fpm)** + + #### Custom PHP Modules You can also copy any custom modules into `mod/(php-fpm)-` and add a custom `*.ini` file to load them. @@ -497,10 +504,27 @@ As far as tested there are no limitations and you can use any Framework or CMS j Devilbox Devilbox +> **See documentation:**
+> [Setup CakePHP](https://devilbox.readthedocs.io/en/latest/examples/setup-cakephp.html) | +> [Setup CodeIgniter](https://devilbox.readthedocs.io/en/latest/examples/setup-codeigniter.html) | +> [Setup Drupal](https://devilbox.readthedocs.io/en/latest/examples/setup-drupal.html) | +> [Setup Joomla](https://devilbox.readthedocs.io/en/latest/examples/setup-joomla.html) | +> [Setup Laravel](https://devilbox.readthedocs.io/en/latest/examples/setup-laravel.html) | +> [Setup Magento](https://devilbox.readthedocs.io/en/latest/examples/setup-magento.html) | +> [Setup PhalconPHP](https://devilbox.readthedocs.io/en/latest/examples/setup-phalcon.html) | +> [Setup PhotonCMS](https://devilbox.readthedocs.io/en/latest/examples/setup-photon-cms.html) | +> [Setup PrestaShop](https://devilbox.readthedocs.io/en/latest/examples/setup-presta-shop.html) | +> [Setup Shopware](https://devilbox.readthedocs.io/en/latest/examples/setup-shopware.html) | +> [Setup Symfony](https://devilbox.readthedocs.io/en/latest/examples/setup-symfony.html) | +> [Setup Typo3](https://devilbox.readthedocs.io/en/latest/examples/setup-typo3.html) | +> [Setup Wordpress](https://devilbox.readthedocs.io/en/latest/examples/setup-wordpress.html) | +> [Setup Yii](https://devilbox.readthedocs.io/en/latest/examples/setup-yii.html) | +> [Setup Zend](https://devilbox.readthedocs.io/en/latest/examples/setup-zend.html) + ## Intranet overview -The devilbox comes with a pre-configured intranet on `http://localhost`. This can be explicitly disabled or password-protected. The intranet will not only show you, the chosen configuration, but also validate the status of the current configuration, such as if **DNS records** exists (on host and container), are directories properly set-up. Additionally it provides external tools to let you interact with databases and emails. +The Devilbox comes with a pre-configured intranet on `http://localhost`. This can be explicitly disabled or password-protected. The intranet will not only show you, the chosen configuration, but also validate the status of the current configuration, such as if **DNS records** exists (on host and container), are directories properly set-up. Additionally it provides external tools to let you interact with databases and emails. * **Virtual Host overview** (validates directories and DNS) * **Database overview** (MySQL, PgSQL, Redis, Memcache, ...) @@ -510,6 +534,9 @@ The devilbox comes with a pre-configured intranet on `http://localhost`. This ca * **[Adminer](https://www.adminer.org)** * **[OpcacheGUI](https://github.com/PeeHaa/OpCacheGUI)** +> **See documentation:** +> +> * [Devilbox Intranet](https://devilbox.readthedocs.io/en/latest/getting-started/devilbox-intranet.html) ## Screenshots @@ -548,7 +575,7 @@ To increase visibility and bug-free operation: * Open up issues for bugs and feature requests * Clone this project and submit fixes or features -Additionally you can [subscribe to devilbox on CodeTriage](https://www.codetriage.com/cytopia/devilbox), +Additionally you can [subscribe to Devilbox on CodeTriage](https://www.codetriage.com/cytopia/devilbox), read up on [CONTRIBUTING.md](CONTRIBUTING.md) and check the [ROADMAP](https://github.com/cytopia/devilbox/issues/23) about what is already planned for the near future. From 7d0e0a8fa6c51bb1ead28e9341a830acd5ea2420 Mon Sep 17 00:00:00 2001 From: cytopia Date: Sat, 4 Aug 2018 13:59:31 +0200 Subject: [PATCH 11/25] Documentation about PHP 5.2 --- docs/configuration-files/env-file.rst | 20 +++++++++++++------ docs/configuration-files/php-fpm-conf.rst | 1 + docs/configuration-files/php-ini.rst | 1 + .../change-container-versions.rst | 9 ++++++--- env-example | 5 +++++ 5 files changed, 27 insertions(+), 9 deletions(-) diff --git a/docs/configuration-files/env-file.rst b/docs/configuration-files/env-file.rst index c8da9c90..d700d98d 100644 --- a/docs/configuration-files/env-file.rst +++ b/docs/configuration-files/env-file.rst @@ -525,20 +525,28 @@ PHP_SERVER This variable choses your desired PHP-FPM version to be started. -+-------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------+-----------------+ -| Name | Allowed values | Default value | -+=========================+====================================================================================================================================================================+=================+ -| ``PHP_SERVER`` | ``php-fpm-5.3`` |br| ``php-fpm-5.4`` |br| ``php-fpm-5.5`` |br| ``php-fpm-5.6`` |br| ``php-fpm-7.0`` |br| ``php-fpm-7.1`` |br| ``php-fpm-7.2`` |br| ``php-fpm-7.2`` | ``php-fpm-7.1`` | -+-------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------+-----------------+ ++-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-----------------+ +| Name | Allowed values | Default value | ++=========================+=========================================================================================================================================================================================+=================+ +| ``PHP_SERVER`` | ``php-fpm-5.2`` |br| ``php-fpm-5.3`` |br| ``php-fpm-5.4`` |br| ``php-fpm-5.5`` |br| ``php-fpm-5.6`` |br| ``php-fpm-7.0`` |br| ``php-fpm-7.1`` |br| ``php-fpm-7.2`` |br| ``php-fpm-7.3`` | ``php-fpm-7.1`` | ++-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-----------------+ + +.. important:: + **PHP 5.2** is available to use, but it is not officially supported. The Devilbox intranet does + not work with this version as PHP 5.2 does not support namespaces. Furthermore PHP 5.2 does only + work with Apache 2.4, Nginx stable and Nginx mainline. It does not work with Apache 2.2. + **Use at your own risk.** + All values are already available in the ``.env`` file and just need to be commented or uncommented. If multiple values are uncommented, the last uncommented variable one takes precedences: .. code-block:: bash :caption: .env - :emphasize-lines: 7 + :emphasize-lines: 9 host> grep PHP_SERVER .env + #PHP_SERVER=php-fpm-5.2 #PHP_SERVER=php-fpm-5.3 #PHP_SERVER=php-fpm-5.4 #PHP_SERVER=php-fpm-5.5 diff --git a/docs/configuration-files/php-fpm-conf.rst b/docs/configuration-files/php-fpm-conf.rst index 1b192f97..f22eec4a 100644 --- a/docs/configuration-files/php-fpm-conf.rst +++ b/docs/configuration-files/php-fpm-conf.rst @@ -31,6 +31,7 @@ See the directory structure for PHP-FPM configuration directories inside ``./cfg host> ls -l path/to/devilbox/cfg/ | grep 'php-fpm' + drwxr-xr-x 2 cytopia cytopia 4096 Mar 5 21:53 php-fpm-5.2/ drwxr-xr-x 2 cytopia cytopia 4096 Mar 5 21:53 php-fpm-5.3/ drwxr-xr-x 2 cytopia cytopia 4096 Mar 5 21:53 php-fpm-5.4/ drwxr-xr-x 2 cytopia cytopia 4096 Mar 5 21:53 php-fpm-5.5/ diff --git a/docs/configuration-files/php-ini.rst b/docs/configuration-files/php-ini.rst index 8ce78610..b6e74a43 100644 --- a/docs/configuration-files/php-ini.rst +++ b/docs/configuration-files/php-ini.rst @@ -24,6 +24,7 @@ See the directory structure for PHP configuration directories inside ``./cfg/`` host> ls -l path/to/devilbox/cfg/ | grep 'php-ini' + drwxr-xr-x 2 cytopia cytopia 4096 Mar 5 21:53 php-ini-5.2/ drwxr-xr-x 2 cytopia cytopia 4096 Mar 5 21:53 php-ini-5.3/ drwxr-xr-x 2 cytopia cytopia 4096 Mar 5 21:53 php-ini-5.4/ drwxr-xr-x 2 cytopia cytopia 4096 Mar 5 21:53 php-ini-5.5/ diff --git a/docs/getting-started/change-container-versions.rst b/docs/getting-started/change-container-versions.rst index edce608e..e5bfb424 100644 --- a/docs/getting-started/change-container-versions.rst +++ b/docs/getting-started/change-container-versions.rst @@ -77,8 +77,9 @@ It will look something like this: .. code-block:: bash :caption: .env - :emphasize-lines: 6 + :emphasize-lines: 7 + #PHP_SERVER=5.2 #PHP_SERVER=5.3 #PHP_SERVER=5.4 #PHP_SERVER=5.5 @@ -99,8 +100,9 @@ In order to enable PHP 5.5, you would change the ``.env`` file like this: .. code-block:: bash :caption: .env - :emphasize-lines: 3 + :emphasize-lines: 4 + #PHP_SERVER=5.2 #PHP_SERVER=5.3 #PHP_SERVER=5.4 PHP_SERVER=5.5 @@ -216,8 +218,9 @@ Consider this ``.env`` file: .. code-block:: bash :caption: .env - :emphasize-lines: 3,5 + :emphasize-lines: 4,6 + #PHP_SERVER=5.2 #PHP_SERVER=5.3 #PHP_SERVER=5.4 PHP_SERVER=5.5 diff --git a/env-example b/env-example index d2956599..898c5b83 100644 --- a/env-example +++ b/env-example @@ -219,6 +219,11 @@ DEVILBOX_UI_ENABLE=1 ### ### 1.1 Choose PHP Server Image ### +### Note: PHP 5.2 is not officially supported. Intranet won't work (due to lack of namespace support). +### PHP 5.2 only works with Apache 2.4, Nginx stable and Nginx mainline. +### Use at your own risk. +### +#PHP_SERVER=5.2 #PHP_SERVER=5.3 #PHP_SERVER=5.4 #PHP_SERVER=5.5 From 306107d1c6a60252a2113887eb37b1c8f51e24c5 Mon Sep 17 00:00:00 2001 From: cytopia Date: Sat, 4 Aug 2018 13:59:52 +0200 Subject: [PATCH 12/25] Documentation about new php default configuration --- docs/configuration-files/php-fpm-conf.rst | 24 ++++++++++++++++++++--- docs/configuration-files/php-ini.rst | 19 +++++++++++++++--- 2 files changed, 37 insertions(+), 6 deletions(-) diff --git a/docs/configuration-files/php-fpm-conf.rst b/docs/configuration-files/php-fpm-conf.rst index f22eec4a..6307350c 100644 --- a/docs/configuration-files/php-fpm-conf.rst +++ b/docs/configuration-files/php-fpm-conf.rst @@ -44,12 +44,30 @@ See the directory structure for PHP-FPM configuration directories inside ``./cfg Customization is achieved by placing a file into ``cfg/php-fpm-X.X/`` (where ``X.X`` stands for your PHP version). The file must end by ``.conf`` in order to be sourced by the PHP-FPM server. -Each of the PHP-FPM conf configuration directories already contain an example file: -``devilbox-custom.conf-example``, that can simply be renamed to ``devilbox-custom.conf``. -This file holds some example values that can be adjusted or commented out. +Each of the PHP-FPM conf configuration directories already contains three example file: +``devilbox-fpm.conf-default``, ``devilbox-fpm.conf-pm_dynamic`` and ``devilbox-fpm.conf-pm_ondemand``. + +**devilbox-fpm.conf-default** + +This file holds the exact settings that are currently in place by each PHP-FPM container. +Copy it (do not simply rename it) to a different file ending by ``.conf`` and start adjusting it. + +**devilbox-fpm.conf-pm_dynamic** + +This file holds some sane example configuration to switch PHP-FPM scheduler to ``dynamic`` +(The default is ``ondemand``). +Copy it (do not simply rename it) to a different file ending by ``.conf`` and start adjusting it. + +**devilbox-fpm.conf-pm_ondemand** + +This file holds the current default values for the PHP-FPM scheduler which is using ``ondemand``. +Copy it (do not simply rename it) to a different file ending by ``.conf`` and start adjusting it. + +**How to apply the settings** In order for the changes to be applied, you will have to restart the Devilbox. + .. seealso:: To find out about all available PHP-FPM directives, global or pool specific have a look at its documentation: https://secure.php.net/manual/en/install.fpm.configuration.php diff --git a/docs/configuration-files/php-ini.rst b/docs/configuration-files/php-ini.rst index b6e74a43..53d16617 100644 --- a/docs/configuration-files/php-ini.rst +++ b/docs/configuration-files/php-ini.rst @@ -37,9 +37,22 @@ See the directory structure for PHP configuration directories inside ``./cfg/`` Customization is achieved by placing a file into ``cfg/php-ini-X.X/`` (where ``X.X`` stands for your PHP version). The file must end by ``.ini`` in order to be sourced by the PHP-FPM server. -Each of the PHP ini configuration directories already contain an example file: -``devilbox-custom.ini-example``, that can simply be renamed to ``devilbox-custom.ini``. -This file holds some example values that can be adjusted or commented out. +Each of the PHP ini configuration directories already contains two example files: +``devilbox-php.ini-default`` and ``devilbox-php.ini-xdebug``. + +**devilbox-php.ini-default** + +This file holds the exact settings that are currently in place by each PHP-FPM container. +Copy it (do not simply rename it) to a different file ending by ``.ini`` and start adjusting it. + +**devilbox-php.ini-xdebug** + +This file holds some sane example configuration to get you started with Xdebug. +Copy it (do not simply rename it) to a different file ending by ``.ini`` and start adjusting it. + +.. important:: For Xdebug to work, there are other changes requires as well: :ref:`configure_php_xdebug` + +**How to apply the settings** In order for the changes to be applied, you will have to restart the Devilbox. From d50f9c5c2488f77b54ef77ef987586b67aa1a8f5 Mon Sep 17 00:00:00 2001 From: cytopia Date: Sat, 4 Aug 2018 14:21:27 +0200 Subject: [PATCH 13/25] Documentation: do not use official domains for TLD_SUFFIX --- docs/configuration-files/env-file.rst | 15 +++++++----- docs/support/troubleshooting.rst | 26 ++++++++++++++++++++ docs/vhost-gen/example-add-subdomains.rst | 30 +++++++++++------------ 3 files changed, 50 insertions(+), 21 deletions(-) diff --git a/docs/configuration-files/env-file.rst b/docs/configuration-files/env-file.rst index d700d98d..4edae035 100644 --- a/docs/configuration-files/env-file.rst +++ b/docs/configuration-files/env-file.rst @@ -223,12 +223,6 @@ this project visible to everyone in your corporate LAN. +-------------+----------------+---------------------------+ | www.test | ``local`` | ``http://www.test.local`` | +-------------+----------------+---------------------------+ -| my-test | ``net`` | ``http://my-test.net`` | -+-------------+----------------+---------------------------+ -| example | ``com`` | ``http://example.com`` | -+-------------+----------------+---------------------------+ -| www.test | ``org`` | ``http://www.test.org`` | -+-------------+----------------+---------------------------+ .. warning:: Do not use ``dev`` as a domain suffix (I know, it's tempting). @@ -246,6 +240,15 @@ this project visible to everyone in your corporate LAN. **See also:** |ext_lnk_domain_rfc_localhost| and |ext_lnk_domain_docker_rel_notes_localhost| +.. warning:: + **Do not use official domain endings** such as ``.com``, ``.org``, ``.net``, etc. + If you do, all name resolutions to any ``.com`` address (e.g.: google.com) will be resolved + to the Devilbox's PHP server IP address. + + The bundled DNS server does a catch-all on the given TLD_SUFFIX and resolves everything + below it to the PHP container. + + .. _env_extra_hosts: EXTRA_HOSTS diff --git a/docs/support/troubleshooting.rst b/docs/support/troubleshooting.rst index bc028e47..559c8d8b 100644 --- a/docs/support/troubleshooting.rst +++ b/docs/support/troubleshooting.rst @@ -136,6 +136,32 @@ This error occurs when using ``localhost`` as the :ref:`env_tld_suffix`. * https://github.com/cytopia/devilbox/issues/291 +SSL issues +========== + +unable to get local issuer certificate +-------------------------------------- + +.. code-block:: bash + + Errors occurred when trying to connect to www.example.com: + cURL error 77: error setting certificate verify locations: CAfile: certificate ./ca/cacert.pem CApath: /etc/ssl/certs + +This issue might arise if you set :ref:`env_tld_suffix` to an official top level domain such as ``.com``. +What happens is that the bundled DNS server does a catch-all on the TLD and redirects all name +resolution to the Devilbox's PHP container IP address. + +If you want to access ``https://www.example.com`` in that case, the request goes to the PHP +container which does not have a valid SSL certificate for that domain. + +**Do not user official TLD's** for :ref:`env_tld_suffix`. + +.. seealso:: + + * :ref:`env_tld_suffix` + * https://github.com/cytopia/devilbox/issues/275 + + Web server issues ================= diff --git a/docs/vhost-gen/example-add-subdomains.rst b/docs/vhost-gen/example-add-subdomains.rst index c7526b3c..84807f11 100644 --- a/docs/vhost-gen/example-add-subdomains.rst +++ b/docs/vhost-gen/example-add-subdomains.rst @@ -22,21 +22,21 @@ Simple sub domains for one project When you just want to serve your project under different sub domains, you simply name your project directory by the name of it. See the following examples how you build up your project URL. -+----------------+----------------+-------------------------------+ -| Project dir | ``TLD_SUFFIX`` | Project URL | -+================+================+===============================+ -| my-test | ``loc`` | ``http://my-test.loc`` | -+----------------+----------------+-------------------------------+ -| www.my-test | ``loc`` | ``http://www.my-test.loc`` | -+----------------+----------------+-------------------------------+ -| t1.www.my-test | ``loc`` | ``http://t1.www.my-test.loc`` | -+----------------+----------------+-------------------------------+ -| my-test | ``com`` | ``http://my-test.com`` | -+----------------+----------------+-------------------------------+ -| www.my-test | ``com`` | ``http://www.my-test.com`` | -+----------------+----------------+-------------------------------+ -| t2.www.my-test | ``com`` | ``http://t2.www.my-test.com`` | -+----------------+----------------+-------------------------------+ ++----------------+----------------+---------------------------------+ +| Project dir | ``TLD_SUFFIX`` | Project URL | ++================+================+=================================+ +| my-test | ``loc`` | ``http://my-test.loc`` | ++----------------+----------------+---------------------------------+ +| www.my-test | ``loc`` | ``http://www.my-test.loc`` | ++----------------+----------------+---------------------------------+ +| t1.www.my-test | ``loc`` | ``http://t1.www.my-test.loc`` | ++----------------+----------------+---------------------------------+ +| my-test | ``local`` | ``http://my-test.local`` | ++----------------+----------------+---------------------------------+ +| www.my-test | ``local`` | ``http://www.my-test.local`` | ++----------------+----------------+---------------------------------+ +| t2.www.my-test | ``local`` | ``http://t2.www.my-test.local`` | ++----------------+----------------+---------------------------------+ Whatever name you want to have in front of the ``TLD_SUFFIX`` is actually just the directory you create. Generically, it looks like this: From 10b99953f1b067c3fb66826c47a4290aa8b47ac3 Mon Sep 17 00:00:00 2001 From: cytopia Date: Sat, 4 Aug 2018 14:55:08 +0200 Subject: [PATCH 14/25] Add quickstart instructions for Windows --- README.md | 47 ++++++++++++++++++++++++++++++++++++----------- 1 file changed, 36 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index f0134113..1b4b5ffb 100644 --- a/README.md +++ b/README.md @@ -77,7 +77,15 @@ Find documentation and help here You are up and running in four simple steps: -```shell +> **See documentation:** +> +> * [Install the Devilbox](https://devilbox.readthedocs.io/en/latest/getting-started/install-the-devilbox.html) +> * [Start the Devilbox](https://devilbox.readthedocs.io/en/latest/getting-started/start-the-devilbox.html) +> * [.env file](https://devilbox.readthedocs.io/en/latest/configuration-files/env-file.html) + +##### Linux and MacOS + +```bash # Get the Devilbox $ git clone https://github.com/cytopia/devilbox $ cd devilbox @@ -92,17 +100,22 @@ $ vim .env $ docker-compose up ``` -> **See documentation:** -> -> * [Install the Devilbox](https://devilbox.readthedocs.io/en/latest/getting-started/install-the-devilbox.html) -> * [Start the Devilbox](https://devilbox.readthedocs.io/en/latest/getting-started/start-the-devilbox.html) +##### Windows +1. Clone https://github.com/cytopia/devilbox to `C:\devilbox` with [Git for Windows](https://git-scm.com/download/win) +2. Copy `C:\devilbox\env-example` to `C:\devilbox\.env` +3. Adjust `C:\devilbox\.env` with your favourite editor +4. [Open terminal on Windows](https://devilbox.readthedocs.io/en/latest/howto/terminal/open-terminal-on-win.html) and type: +```bash +C:\> cd C:\devilbox +C:\devilbox> docker-compose up +``` #### Selective start The above will start all containers, you can however also just start the containers you actually need. This is achieved by simply specifying them in the docker-compose command. -```shell +```bash $ docker-compose up httpd php mysql redis ``` > **See documentation:** @@ -253,15 +266,27 @@ Furthermore PHP 5.2 does only work with Apache 2.4, Nginx stable and Nginx mainl #### Enter the container -You can also work directly inside the php container. Simply use the bundled scripts `shell.sh`. The `PS1` will automatically be populated with current chosen php version. -```shell +You can also work directly inside the php container. Simply use the bundled scripts `shell.sh` (or `shell.bat` for Windows). +The `PS1` will automatically be populated with current chosen php version. + +##### Linux and MacOS +```bash # Enter as user devilbox (normal operation / development) host> ./shell.sh devilbox@php-7.0.19 in /shared/httpd $ + +# Become root user (do root stuff) +devilbox@php-7.0.19 in /shared/httpd $ sudo su - +root@php-7.0.19 in /shared/httpd $ ``` -```shell -# Enter as root user (do root stuff) -host> ./shell.sh + +##### Windows +```bash +# Enter as user devilbox (normal operation / development) +C:\devilbox> shell.bat +devilbox@php-7.0.19 in /shared/httpd $ + +# Become root user (do root stuff) devilbox@php-7.0.19 in /shared/httpd $ sudo su - root@php-7.0.19 in /shared/httpd $ ``` From a0982e9bb624202f1f3744255650bbc240141175 Mon Sep 17 00:00:00 2001 From: cytopia Date: Sat, 4 Aug 2018 15:24:16 +0200 Subject: [PATCH 15/25] Link documentation and fix minor typos --- README.md | 76 +++++++++++++++++++++++-------------------------------- 1 file changed, 32 insertions(+), 44 deletions(-) diff --git a/README.md b/README.md index 1b4b5ffb..12b0ee16 100644 --- a/README.md +++ b/README.md @@ -18,12 +18,14 @@ [![Build Status](https://travis-ci.org/cytopia/devilbox.svg?branch=master)](https://travis-ci.org/cytopia/devilbox) [![Documentation Status](https://readthedocs.org/projects/devilbox/badge/?version=latest)](https://devilbox.readthedocs.io) ![Tag](https://img.shields.io/github/tag/cytopia/devilbox.svg) -[![type](https://img.shields.io/badge/type-Docker-orange.svg)](https://www.docker.com/) +[![type](https://img.shields.io/badge/type-Docker-red.svg)](https://www.docker.com/) [![License](https://img.shields.io/badge/license-MIT-blue.svg)](https://opensource.org/licenses/MIT) -The Devilbox is a modern and highly customisable **dockerized PHP stack** supporting full **LAMP** and **MEAN** and running on all major platforms. The main goal is to easily switch and combine any version required for local development. It supports an **unlimited number of projects** for which vhosts, **SSL certificates** and **DNS records** are created automatically. Email catch-all and popular development tools will be at your service as well. Configuration is not necessary, as everything is pre-setup with mass virtual hosting. +The Devilbox is a modern and highly customisable **dockerized PHP stack** supporting full **LAMP** and **MEAN** and running on all major platforms. The main goal is to easily switch and combine any version required for local development. It supports an **unlimited number of projects** for which **vhosts**, **SSL certificates** and **DNS records** are created automatically. Email catch-all and popular development tools will be at your service as well. Configuration is not necessary, as everything is already pre-setup. + +Furthermore, the Devilbox provides an **identical** and **reproducable development environment** for different host operating systems. **Requirements** @@ -75,13 +77,10 @@ Find documentation and help here #### Quick start -You are up and running in four simple steps: - -> **See documentation:** -> -> * [Install the Devilbox](https://devilbox.readthedocs.io/en/latest/getting-started/install-the-devilbox.html) -> * [Start the Devilbox](https://devilbox.readthedocs.io/en/latest/getting-started/start-the-devilbox.html) -> * [.env file](https://devilbox.readthedocs.io/en/latest/configuration-files/env-file.html) +> **Documentation:** +> [Install the Devilbox](https://devilbox.readthedocs.io/en/latest/getting-started/install-the-devilbox.html) | +> [Start the Devilbox](https://devilbox.readthedocs.io/en/latest/getting-started/start-the-devilbox.html) | +> [.env file](https://devilbox.readthedocs.io/en/latest/configuration-files/env-file.html) ##### Linux and MacOS @@ -118,9 +117,8 @@ The above will start all containers, you can however also just start the contain ```bash $ docker-compose up httpd php mysql redis ``` -> **See documentation:** -> -> * [Start only some container](https://devilbox.readthedocs.io/en/latest/getting-started/start-the-devilbox.html#start-some-container) +> **Documentation:** +> [Start only some container](https://devilbox.readthedocs.io/en/latest/getting-started/start-the-devilbox.html#start-some-container) ![Devilbox](docs/img/devilbox-dash-selective.png) @@ -259,44 +257,33 @@ Every single attachable container comes with many different versions. In order t [1] PHP 5.2 is available to use, but it is not officially supported. The Devilbox intranet does not work with this version as PHP 5.2 does not support namespaces. Furthermore PHP 5.2 does only work with Apache 2.4, Nginx stable and Nginx mainline. It does not work with Apache 2.2. Use at your own risk. -> **See documentation:** -> -> * [Change container versions](https://devilbox.readthedocs.io/en/latest/getting-started/change-container-versions.html) +> **Documentation:** +> [Change container versions](https://devilbox.readthedocs.io/en/latest/getting-started/change-container-versions.html) #### Enter the container You can also work directly inside the php container. Simply use the bundled scripts `shell.sh` (or `shell.bat` for Windows). The `PS1` will automatically be populated with current chosen php version. +Navigate the the Devilbox directory and type the below listed command: ##### Linux and MacOS ```bash -# Enter as user devilbox (normal operation / development) host> ./shell.sh devilbox@php-7.0.19 in /shared/httpd $ - -# Become root user (do root stuff) -devilbox@php-7.0.19 in /shared/httpd $ sudo su - -root@php-7.0.19 in /shared/httpd $ ``` ##### Windows ```bash -# Enter as user devilbox (normal operation / development) C:\devilbox> shell.bat devilbox@php-7.0.19 in /shared/httpd $ - -# Become root user (do root stuff) -devilbox@php-7.0.19 in /shared/httpd $ sudo su - -root@php-7.0.19 in /shared/httpd $ ``` Your projects can be found in `/shared/httpd`. DNS records are automatically available inside the php container. Also every other service will be available on `127.0.0.1` inside the php container (tricky socat port-forwarding). -> **See documentation:** -> -> * [Work inside the PHP container](https://devilbox.readthedocs.io/en/latest/intermediate/work-inside-the-php-container.html) -> * [Directory overview](https://devilbox.readthedocs.io/en/latest/getting-started/directory-overview.html) +> **Documentation:** +> [Work inside the PHP container](https://devilbox.readthedocs.io/en/latest/intermediate/work-inside-the-php-container.html) | +> [Directory overview](https://devilbox.readthedocs.io/en/latest/getting-started/directory-overview.html) #### Quick Video intro @@ -309,9 +296,8 @@ Your projects can be found in `/shared/httpd`. DNS records are automatically ava The Devilbox has everything setup for you. The only thing you will have to install is [Docker](https://docs.docker.com/engine/installation/) and [Docker Compose](https://docs.docker.com/compose/install/). Virtual hosts and DNS entries will be created automatically, just by adding new project folders. -> **See documentation:** -> -> * [Devilbox Prerequisites](https://devilbox.readthedocs.io/en/latest/getting-started/prerequisites.html) +> **Documentation:** +> [Devilbox Prerequisites](https://devilbox.readthedocs.io/en/latest/getting-started/prerequisites.html) #### Features @@ -368,12 +354,11 @@ The Devilbox has everything setup for you. The only thing you will have to insta -> **See documentation:** -> -> * [Setup Auto DNS](https://devilbox.readthedocs.io/en/latest/intermediate/setup-auto-dns.html) -> * [Setup valid HTTPS](https://devilbox.readthedocs.io/en/latest/intermediate/setup-valid-https.html) -> * [Configure Xdebug](https://devilbox.readthedocs.io/en/latest/intermediate/configure-php-xdebug.html) -> * [Customize PHP](https://devilbox.readthedocs.io/en/latest/advanced/customize-php-globally.html) +> **Documentation:** +> [Setup Auto DNS](https://devilbox.readthedocs.io/en/latest/intermediate/setup-auto-dns.html) | +> [Setup valid HTTPS](https://devilbox.readthedocs.io/en/latest/intermediate/setup-valid-https.html) | +> [Configure Xdebug](https://devilbox.readthedocs.io/en/latest/intermediate/configure-php-xdebug.html) | +> [Customize PHP](https://devilbox.readthedocs.io/en/latest/advanced/customize-php-globally.html) #### Batteries @@ -502,7 +487,10 @@ The Devilbox is a development stack, so it is made sure that a lot of PHP module > *amqp, apcu, bcmath, bz2, calendar, Core, ctype, curl, date, dba, dom, enchant, exif, fileinfo, filter, ftp, gd, gettext, gmp, hash, iconv, igbinary, imagick, imap, interbase, intl, json, ldap, libxml, mbstring, mcrypt, memcache, memcached, mongodb, msgpack, mysqli, mysqlnd, openssl, pcntl, pcre, PDO, pdo_dblib, PDO_Firebird, pdo_mysql, pdo_pgsql, pdo_sqlite, pgsql, phalcon, Phar, posix, pspell, readline, recode, redis, Reflection, session, shmop, SimpleXML, snmp, soap, sockets, sodium, SPL, sqlite3, standard, swoole, sysvmsg, sysvsem, sysvshm, tidy, tokenizer, uploadprogress, wddx, xdebug, xml, xmlreader, xmlrpc, xmlwriter, xsl, Zend OPcache, zip, zlib* -**See [PHP-FPM Docker image](https://github.com/devilbox/docker-php-fpm)** +PHP modules can be enabled or disabled on demand to reflect the state of your target environment. + +> **Documentation:** +> [Enable/disable PHP modules](https://devilbox.readthedocs.io/en/latest/intermediate/enable-disable-php-modules.html) #### Custom PHP Modules @@ -529,7 +517,7 @@ As far as tested there are no limitations and you can use any Framework or CMS j Devilbox Devilbox -> **See documentation:**
+> **Documentation:**
> [Setup CakePHP](https://devilbox.readthedocs.io/en/latest/examples/setup-cakephp.html) | > [Setup CodeIgniter](https://devilbox.readthedocs.io/en/latest/examples/setup-codeigniter.html) | > [Setup Drupal](https://devilbox.readthedocs.io/en/latest/examples/setup-drupal.html) | @@ -549,7 +537,7 @@ As far as tested there are no limitations and you can use any Framework or CMS j ## Intranet overview -The Devilbox comes with a pre-configured intranet on `http://localhost`. This can be explicitly disabled or password-protected. The intranet will not only show you, the chosen configuration, but also validate the status of the current configuration, such as if **DNS records** exists (on host and container), are directories properly set-up. Additionally it provides external tools to let you interact with databases and emails. +The Devilbox comes with a pre-configured intranet on `http://localhost` and `https://localhost`. This can be explicitly disabled or password-protected. The intranet will not only show you, the chosen configuration, but also validate the status of the current configuration, such as if **DNS records** exists (on host and container), are directories properly set-up. Additionally it provides external tools to let you interact with databases and emails. * **Virtual Host overview** (validates directories and DNS) * **Database overview** (MySQL, PgSQL, Redis, Memcache, ...) @@ -559,9 +547,9 @@ The Devilbox comes with a pre-configured intranet on `http://localhost`. This ca * **[Adminer](https://www.adminer.org)** * **[OpcacheGUI](https://github.com/PeeHaa/OpCacheGUI)** -> **See documentation:** -> -> * [Devilbox Intranet](https://devilbox.readthedocs.io/en/latest/getting-started/devilbox-intranet.html) +> **Documentation:** +> [Devilbox Intranet](https://devilbox.readthedocs.io/en/latest/getting-started/devilbox-intranet.html) + ## Screenshots From 24851eb58da77e38510cd03be67a05e14dda46a8 Mon Sep 17 00:00:00 2001 From: cytopia Date: Sat, 4 Aug 2018 16:14:20 +0200 Subject: [PATCH 16/25] Apply new vhost-gen templates --- templates/vhost-gen/apache24.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/templates/vhost-gen/apache24.yml b/templates/vhost-gen/apache24.yml index 53de2a70..2b5e0ead 100644 --- a/templates/vhost-gen/apache24.yml +++ b/templates/vhost-gen/apache24.yml @@ -120,14 +120,17 @@ features: # PHP-FPM will not be applied to a reverse proxy! php_fpm: | + # In case for PHP-FPM 5.2 compatibility use 'GENERIC' instead of 'FPM' + # https://httpd.apache.org/docs/2.4/mod/mod_proxy_fcgi.html#proxyfcgibackendtype + ProxyFCGIBackendType FPM + # PHP-FPM Definition Require all granted SetHandler proxy:fcgi://__PHP_ADDR__:__PHP_PORT__ - # enablereuse requires Apache 2.4.11 or later - + # If the php file doesn't exist, disable the proxy handler. From 4ecee3f677a63e264d756e37de1f6ac381954277 Mon Sep 17 00:00:00 2001 From: cytopia Date: Sat, 4 Aug 2018 16:15:27 +0200 Subject: [PATCH 17/25] Add Docker logo --- README.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 12b0ee16..41509f95 100644 --- a/README.md +++ b/README.md @@ -29,7 +29,11 @@ Furthermore, the Devilbox provides an **identical** and **reproducable developme **Requirements** -![Linux](https://raw.githubusercontent.com/cytopia/icons/master/64x64/linux.png) ![Windows](https://raw.githubusercontent.com/cytopia/icons/master/64x64/windows.png) ![OSX](https://raw.githubusercontent.com/cytopia/icons/master/64x64/osx.png) +![Linux](https://raw.githubusercontent.com/cytopia/icons/master/64x64/linux.png) +![OSX](https://raw.githubusercontent.com/cytopia/icons/master/64x64/osx.png) +![Windows](https://raw.githubusercontent.com/cytopia/icons/master/64x64/windows.png) +![Plus](https://raw.githubusercontent.com/cytopia/icons/master/64x64/plus.png) +![Docker](https://raw.githubusercontent.com/cytopia/icons/master/64x64/docker.png) * [Docker Engine 1.12.0+](https://docs.docker.com/compose/compose-file/compose-versioning/#version-21) * [Docker Compose 1.9.0+](https://docs.docker.com/compose/compose-file/compose-versioning/#version-21) From f9db50f03a248cf79ace6aecfb7dc753328cf92f Mon Sep 17 00:00:00 2001 From: cytopia Date: Sat, 4 Aug 2018 16:22:54 +0200 Subject: [PATCH 18/25] Warn about problematic TLDs --- docs/features.rst | 4 ++-- docs/support/faq.rst | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/features.rst b/docs/features.rst index b3b49cc7..c1f97198 100644 --- a/docs/features.rst +++ b/docs/features.rst @@ -53,8 +53,8 @@ separetely. Virtual host domains ^^^^^^^^^^^^^^^^^^^^ -Each of your virtual host will have its own domain. TLD can be freely chosen, such as ``*.loc``, -``*.local``, ``*.com``, ``*.org`` or whatever you require. +Each of your virtual host will have its own domain. TLD can be freely chosen, such as ``*.loc`` or +``*.local``. Be aware that some TLD's can cause problems. Read more here: :ref:`_env_tld_suffix`. Service and version choice diff --git a/docs/support/faq.rst b/docs/support/faq.rst index e2b6f468..cae39dde 100644 --- a/docs/support/faq.rst +++ b/docs/support/faq.rst @@ -125,6 +125,7 @@ you want. See :ref:`env_tld_suffix`. .. warning:: Be aware not to use ``dev`` or ``localhost``. See :ref:`env_tld_suffix` for more details. + Also do not use any official domain TLDs such as ``com``, ``net``, ``org``, etc. Can I just start PHP and MySQL instead of all container? From 75765c206372e76a0835b540ed2adefe41fe17f9 Mon Sep 17 00:00:00 2001 From: cytopia Date: Sat, 4 Aug 2018 16:53:36 +0200 Subject: [PATCH 19/25] Fix default listen.backlog --- cfg/php-fpm-5.2/php-fpm.xml-example | 2 +- cfg/php-fpm-5.3/devilbox-fpm.conf-default | 2 +- cfg/php-fpm-5.4/devilbox-fpm.conf-default | 2 +- cfg/php-fpm-5.5/devilbox-fpm.conf-default | 2 +- cfg/php-fpm-5.6/devilbox-fpm.conf-default | 2 +- cfg/php-fpm-7.0/devilbox-fpm.conf-default | 2 +- cfg/php-fpm-7.1/devilbox-fpm.conf-default | 2 +- cfg/php-fpm-7.2/devilbox-fpm.conf-default | 2 +- cfg/php-fpm-7.3/devilbox-fpm.conf-default | 2 +- 9 files changed, 9 insertions(+), 9 deletions(-) diff --git a/cfg/php-fpm-5.2/php-fpm.xml-example b/cfg/php-fpm-5.2/php-fpm.xml-example index 8cb47397..d835ddb2 100644 --- a/cfg/php-fpm-5.2/php-fpm.xml-example +++ b/cfg/php-fpm-5.2/php-fpm.xml-example @@ -40,7 +40,7 @@ Set listen(2) backlog - 128 + 1024 Set permissions for unix socket, if one used. In Linux read/write permissions must be set in order to allow connections from web server. Many BSD-derrived systems allow connections regardless of permissions. diff --git a/cfg/php-fpm-5.3/devilbox-fpm.conf-default b/cfg/php-fpm-5.3/devilbox-fpm.conf-default index 5467dd45..37e1f8ed 100644 --- a/cfg/php-fpm-5.3/devilbox-fpm.conf-default +++ b/cfg/php-fpm-5.3/devilbox-fpm.conf-default @@ -43,7 +43,7 @@ request_terminate_timeout = 120s ; the request may be ignored so that retries may succeed. ; This should not be greater than `cat /proc/sys/net/core/somaxconn`, otherwise connections ; are silently truncated -listen.backlog = 128 +listen.backlog = 1024 ; static - the number of child processes is fixed (pm.max_children). diff --git a/cfg/php-fpm-5.4/devilbox-fpm.conf-default b/cfg/php-fpm-5.4/devilbox-fpm.conf-default index 5467dd45..37e1f8ed 100644 --- a/cfg/php-fpm-5.4/devilbox-fpm.conf-default +++ b/cfg/php-fpm-5.4/devilbox-fpm.conf-default @@ -43,7 +43,7 @@ request_terminate_timeout = 120s ; the request may be ignored so that retries may succeed. ; This should not be greater than `cat /proc/sys/net/core/somaxconn`, otherwise connections ; are silently truncated -listen.backlog = 128 +listen.backlog = 1024 ; static - the number of child processes is fixed (pm.max_children). diff --git a/cfg/php-fpm-5.5/devilbox-fpm.conf-default b/cfg/php-fpm-5.5/devilbox-fpm.conf-default index 5467dd45..37e1f8ed 100644 --- a/cfg/php-fpm-5.5/devilbox-fpm.conf-default +++ b/cfg/php-fpm-5.5/devilbox-fpm.conf-default @@ -43,7 +43,7 @@ request_terminate_timeout = 120s ; the request may be ignored so that retries may succeed. ; This should not be greater than `cat /proc/sys/net/core/somaxconn`, otherwise connections ; are silently truncated -listen.backlog = 128 +listen.backlog = 1024 ; static - the number of child processes is fixed (pm.max_children). diff --git a/cfg/php-fpm-5.6/devilbox-fpm.conf-default b/cfg/php-fpm-5.6/devilbox-fpm.conf-default index 5467dd45..37e1f8ed 100644 --- a/cfg/php-fpm-5.6/devilbox-fpm.conf-default +++ b/cfg/php-fpm-5.6/devilbox-fpm.conf-default @@ -43,7 +43,7 @@ request_terminate_timeout = 120s ; the request may be ignored so that retries may succeed. ; This should not be greater than `cat /proc/sys/net/core/somaxconn`, otherwise connections ; are silently truncated -listen.backlog = 128 +listen.backlog = 1024 ; static - the number of child processes is fixed (pm.max_children). diff --git a/cfg/php-fpm-7.0/devilbox-fpm.conf-default b/cfg/php-fpm-7.0/devilbox-fpm.conf-default index 5467dd45..37e1f8ed 100644 --- a/cfg/php-fpm-7.0/devilbox-fpm.conf-default +++ b/cfg/php-fpm-7.0/devilbox-fpm.conf-default @@ -43,7 +43,7 @@ request_terminate_timeout = 120s ; the request may be ignored so that retries may succeed. ; This should not be greater than `cat /proc/sys/net/core/somaxconn`, otherwise connections ; are silently truncated -listen.backlog = 128 +listen.backlog = 1024 ; static - the number of child processes is fixed (pm.max_children). diff --git a/cfg/php-fpm-7.1/devilbox-fpm.conf-default b/cfg/php-fpm-7.1/devilbox-fpm.conf-default index 5467dd45..37e1f8ed 100644 --- a/cfg/php-fpm-7.1/devilbox-fpm.conf-default +++ b/cfg/php-fpm-7.1/devilbox-fpm.conf-default @@ -43,7 +43,7 @@ request_terminate_timeout = 120s ; the request may be ignored so that retries may succeed. ; This should not be greater than `cat /proc/sys/net/core/somaxconn`, otherwise connections ; are silently truncated -listen.backlog = 128 +listen.backlog = 1024 ; static - the number of child processes is fixed (pm.max_children). diff --git a/cfg/php-fpm-7.2/devilbox-fpm.conf-default b/cfg/php-fpm-7.2/devilbox-fpm.conf-default index 5467dd45..37e1f8ed 100644 --- a/cfg/php-fpm-7.2/devilbox-fpm.conf-default +++ b/cfg/php-fpm-7.2/devilbox-fpm.conf-default @@ -43,7 +43,7 @@ request_terminate_timeout = 120s ; the request may be ignored so that retries may succeed. ; This should not be greater than `cat /proc/sys/net/core/somaxconn`, otherwise connections ; are silently truncated -listen.backlog = 128 +listen.backlog = 1024 ; static - the number of child processes is fixed (pm.max_children). diff --git a/cfg/php-fpm-7.3/devilbox-fpm.conf-default b/cfg/php-fpm-7.3/devilbox-fpm.conf-default index 5467dd45..37e1f8ed 100644 --- a/cfg/php-fpm-7.3/devilbox-fpm.conf-default +++ b/cfg/php-fpm-7.3/devilbox-fpm.conf-default @@ -43,7 +43,7 @@ request_terminate_timeout = 120s ; the request may be ignored so that retries may succeed. ; This should not be greater than `cat /proc/sys/net/core/somaxconn`, otherwise connections ; are silently truncated -listen.backlog = 128 +listen.backlog = 1024 ; static - the number of child processes is fixed (pm.max_children). From ca33060d25e744631ceb3da63d7684d4b567e40f Mon Sep 17 00:00:00 2001 From: cytopia Date: Sat, 4 Aug 2018 21:51:18 +0200 Subject: [PATCH 20/25] Use new PHP-FPM images --- docker-compose.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker-compose.yml b/docker-compose.yml index 663bc33b..da47047c 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -94,7 +94,7 @@ services: # PHP / HHVM # ------------------------------------------------------------ php: - image: devilbox/php-fpm:${PHP_SERVER:-7.0}-work-0.28 + image: devilbox/php-fpm:${PHP_SERVER:-7.0}-work-0.29 ## ## All .env variables From 0e61de538e369c168f43e432713e109fab1f48ea Mon Sep 17 00:00:00 2001 From: cytopia Date: Sat, 4 Aug 2018 21:51:55 +0200 Subject: [PATCH 21/25] Documentation: extend Magento setup instructions --- docs/examples/setup-magento.rst | 3 +++ 1 file changed, 3 insertions(+) diff --git a/docs/examples/setup-magento.rst b/docs/examples/setup-magento.rst index 5119c33e..e9480486 100644 --- a/docs/examples/setup-magento.rst +++ b/docs/examples/setup-magento.rst @@ -178,4 +178,7 @@ host operating systems ``/etc/hosts`` file (or ``C:\Windows\System32\drivers\etc All set now, you can visit http://my-magento.loc or https://my-magento.loc in your browser and follow the installation steps. +.. important:: + Use ``127.0.0.1`` for the MySQL database hostname. + .. seealso:: :ref:`setup_valid_https` From 708991712601d991b075f3ce734d9885a79f2f57 Mon Sep 17 00:00:00 2001 From: cytopia Date: Sun, 5 Aug 2018 02:41:42 +0200 Subject: [PATCH 22/25] Make mails survive reboot --- .gitignore | 3 +++ docker-compose.yml | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 388720cc..ecd4ae28 100644 --- a/.gitignore +++ b/.gitignore @@ -25,6 +25,9 @@ # Ignore Certificate Authority /ca/* +# Ignore emails +/mail/* + # Ignore compose override file docker-compose.override.yml diff --git a/docker-compose.yml b/docker-compose.yml index da47047c..d63172b7 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -173,7 +173,7 @@ services: - ${DEVILBOX_PATH}/log/php-fpm-${PHP_SERVER}:/var/log/php # Mount Mail directory - #- ${DEVILBOX_PATH}/run/mail:/var/mail + - ${DEVILBOX_PATH}/mail:/var/mail # Mount DB Backup directory - ${DEVILBOX_PATH}/backups:/shared/backups From e28d56b05353ee3e816ddc446e6779ee52f61c05 Mon Sep 17 00:00:00 2001 From: cytopia Date: Sun, 5 Aug 2018 02:43:22 +0200 Subject: [PATCH 23/25] Move sentence to correct headline --- docs/features.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/features.rst b/docs/features.rst index c1f97198..b4c18f6f 100644 --- a/docs/features.rst +++ b/docs/features.rst @@ -37,13 +37,13 @@ imported into your local browser to make all certificates valid and trusted. Automated DNS records ^^^^^^^^^^^^^^^^^^^^^ The built-in DNS server will automatically make any DNS record available to your host system by -using a wild-card DNS record. +using a wild-card DNS record. This removes the need to create developer DNS records +in ``/etc/hosts``. Email catch-all ^^^^^^^^^^^^^^^ All outgoing emails originating from your projects are intercepted, stored locally and -can be viewed within the bundled intranet. This removes the need to create developer DNS records -in ``/etc/hosts``. +can be viewed within the bundled intranet. Log files ^^^^^^^^^ From c0e220b1bd73040eb3de739ab90a98edd7c7fd0e Mon Sep 17 00:00:00 2001 From: cytopia Date: Sun, 5 Aug 2018 03:04:03 +0200 Subject: [PATCH 24/25] Make timeout from httpd to php-fpm configurable --- docker-compose.yml | 3 ++- docs/configuration-files/env-file.rst | 26 ++++++++++++++++++++++++++ docs/features.rst | 2 +- docs/support/troubleshooting.rst | 4 +++- env-example | 10 ++++++++++ templates/vhost-gen/apache22.yml | 2 +- templates/vhost-gen/apache24.yml | 2 ++ templates/vhost-gen/nginx.yml | 4 ++++ 8 files changed, 49 insertions(+), 4 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index d63172b7..0bf55bdd 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -204,7 +204,7 @@ services: # Web Server # ------------------------------------------------------------ httpd: - image: devilbox/${HTTPD_SERVER:-nginx-stable}:0.20 + image: devilbox/${HTTPD_SERVER:-nginx-stable}:0.21 environment: @@ -253,6 +253,7 @@ services: - PHP_FPM_ENABLE=1 - PHP_FPM_SERVER_ADDR=php - PHP_FPM_SERVER_PORT=9000 + - PHP_FPM_TIMEOUT=${HTTPD_TIMEOUT_TO_PHP_FPM:-180} ports: # ---- Format: ---- diff --git a/docs/configuration-files/env-file.rst b/docs/configuration-files/env-file.rst index 4edae035..78ef333e 100644 --- a/docs/configuration-files/env-file.rst +++ b/docs/configuration-files/env-file.rst @@ -1401,6 +1401,32 @@ changing the server name or adding locations to other assets. .. * :ref:`customize_all_virtual_hosts_globally` +.. _env_httpd_timeout_to_php_fpm: + +HTTPD_TIMEOUT_TO_PHP_FPM +^^^^^^^^^^^^^^^^^^^^^^^^ + +This variable specifies after how many seconds the webserver should quit an unanswered connection +to PHP-FPM. + +Ensure that this value is higher than PHP's ``max_execution_time``, otherwise the PHP script +could still run and the webserver will simply drop the connection before getting an answer +by PHP. + +If ``HTTPD_TIMEOUT_TO_PHP_FPM`` is smaller then ``max_execution_time`` and a script runs longer +than ``max_execution_time``, you will get a: ``504 Gateway timeout`` in the browser. + +If ``HTTPD_TIMEOUT_TO_PHP_FPM`` is greater then ``max_execution_time`` and a script runs longer +than ``max_execution_time``, you will get a proper PHP error message in the browser. + + ++------------------------------+-------------------+------------------+ +| Name | Allowed values | Default value | ++==============================+===================+==================+ +| ``HTTPD_TIMEOUT_TO_PHP_FPM`` | positive integer | ``180`` | ++------------------------------+-------------------+------------------+ + + MySQL ----- diff --git a/docs/features.rst b/docs/features.rst index b4c18f6f..a648c2db 100644 --- a/docs/features.rst +++ b/docs/features.rst @@ -54,7 +54,7 @@ separetely. Virtual host domains ^^^^^^^^^^^^^^^^^^^^ Each of your virtual host will have its own domain. TLD can be freely chosen, such as ``*.loc`` or -``*.local``. Be aware that some TLD's can cause problems. Read more here: :ref:`_env_tld_suffix`. +``*.local``. Be aware that some TLD's can cause problems. Read more here: :ref:`env_tld_suffix`. Service and version choice diff --git a/docs/support/troubleshooting.rst b/docs/support/troubleshooting.rst index 559c8d8b..e96c9098 100644 --- a/docs/support/troubleshooting.rst +++ b/docs/support/troubleshooting.rst @@ -207,10 +207,12 @@ Check your Docker settings to allow shared volumes for the path of the Devilbox This error occurs when the upstream PHP-FPM server takes longer to execute a script, than the timeout value set in the web server for PHP-FPM to answer. -For that to fix one must increase the PHP-FPM/Proxy timeout settings on the virtual host. +For that to fix one must increase the PHP-FPM/Proxy timeout settings in the ``.env`` file. +:ref:`env_httpd_timeout_to_php_fpm` .. seealso:: + * :ref:`env_httpd_timeout_to_php_fpm` * https://github.com/cytopia/devilbox/issues/280 * https://github.com/cytopia/devilbox/issues/234 diff --git a/env-example b/env-example index 898c5b83..06677397 100644 --- a/env-example +++ b/env-example @@ -478,6 +478,16 @@ HTTPD_DOCROOT_DIR=htdocs HTTPD_TEMPLATE_DIR=.devilbox +### +### Webserver timeout (in seconds) to upstream PHP-FPM server +### +### This value should be greater than PHP's max_execution_time, +### otherwise the php script could still run and the webserver will +### simply drop the connection before getting an answer by PHP. +### +HTTPD_TIMEOUT_TO_PHP_FPM=180 + + ################################################################################ ### diff --git a/templates/vhost-gen/apache22.yml b/templates/vhost-gen/apache22.yml index e7d2e5da..158de62e 100644 --- a/templates/vhost-gen/apache22.yml +++ b/templates/vhost-gen/apache22.yml @@ -120,7 +120,7 @@ features: # PHP-FPM will not be applied to a reverse proxy! php_fpm: | # PHP-FPM Definition - ProxyPassMatch ^/(.*\.php(/.*)?)$ fcgi://__PHP_ADDR__:__PHP_PORT____DOCUMENT_ROOT__/$1 + ProxyPassMatch ^/(.*\.php(/.*)?)$ fcgi://__PHP_ADDR__:__PHP_PORT____DOCUMENT_ROOT__/$1 timeout=__PHP_TIMEOUT__ alias: | # Alias Definition diff --git a/templates/vhost-gen/apache24.yml b/templates/vhost-gen/apache24.yml index 2b5e0ead..8703d096 100644 --- a/templates/vhost-gen/apache24.yml +++ b/templates/vhost-gen/apache24.yml @@ -131,6 +131,8 @@ features: + ProxySet timeout=__PHP_TIMEOUT__ + ProxySet connectiontimeout=__PHP_TIMEOUT__ # If the php file doesn't exist, disable the proxy handler. diff --git a/templates/vhost-gen/nginx.yml b/templates/vhost-gen/nginx.yml index c76f9210..44c4c09f 100644 --- a/templates/vhost-gen/nginx.yml +++ b/templates/vhost-gen/nginx.yml @@ -112,10 +112,14 @@ features: try_files $uri = 404; include fastcgi_params; + # https://stackoverflow.com/questions/1733306/nginx-errors-readv-and-recv-failed/51457613#51457613 + fastcgi_keep_conn off; + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_split_path_info ^(.+\.php)(.*)$; fastcgi_pass __PHP_ADDR__:__PHP_PORT__; + fastcgi_read_timeout __PHP_TIMEOUT__; fastcgi_index index.php; fastcgi_intercept_errors on; From c093aff25c3e8ac56629559d02824bfd34a6f47a Mon Sep 17 00:00:00 2001 From: cytopia Date: Sun, 5 Aug 2018 05:13:45 +0200 Subject: [PATCH 25/25] Adding mail dir --- mail/.keepme | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 mail/.keepme diff --git a/mail/.keepme b/mail/.keepme new file mode 100644 index 00000000..e69de29b