Merge branch 'master' of github.com:cytopia/devilbox into mount-options

This commit is contained in:
Kushal Hada 2018-08-09 20:45:07 -04:00
commit c036270510
346 changed files with 12180 additions and 2306 deletions

View File

@ -157,7 +157,7 @@ $messages = $MyMbox->get($sortOrderArr);
<tbody>
<?php foreach ($messages as $data): ?>
<?php
$message = $data['raw'];
$message = htmlentities($data['raw']);
$structure = $data['decoded'];
?>
<tr id="<?php echo $data['num'];?>" class="subject">
@ -167,17 +167,17 @@ $messages = $MyMbox->get($sortOrderArr);
<small><?php echo date('Y-m-d', strtotime($structure->headers['date']));?></small>
</td>
<td><?php echo htmlentities($structure->headers['from']);?></td>
<td><?php echo $structure->headers['x-original-to'];?></td>
<td><?php echo $structure->headers['subject'];?></td>
<td><?php echo htmlentities($structure->headers['x-original-to']);?></td>
<td><?php echo htmlentities($structure->headers['subject']);?></td>
</tr>
<tr></tr>
<tr id="mail-<?php echo $data['num'];?>" style="display:none">
<td></td>
<td colspan="4">
<?php if (isset($structure->body)): ?>
<?php echo $structure->body ?>
<?php echo htmlentities($structure->body) ?>
<?php elseif(isset($structure->parts[1]->body)): ?>
<?php echo $structure->parts[1]->body ?>
<?php echo htmlentities($structure->parts[1]->body) ?>
<?php elseif(isset($structure->parts[0]->body)): ?>
<?php echo htmlentities($structure->parts[0]->body) ?>
<?php else: ?>

View File

@ -15,6 +15,8 @@
* cookie. Needs to be 32 chars long.
*/
$cfg['blowfish_secret'] = 'GObO60^(04#^5637%fdUGo(*6$%6#dy4'; /* YOU MUST FILL IN THIS FOR COOKIE AUTH! */
$cfg['CheckConfigurationPermissions'] = false;
/**
* Servers configuration

View File

@ -14,6 +14,8 @@
* Custom overwrites
*/
$cfg['TempDir'] = '/tmp';
$cfg['CheckConfigurationPermissions'] = false;
/**
* This is needed for cookie based authentication to encrypt password in

View File

@ -832,9 +832,15 @@ class Mail_mimeDecode extends PEAR
// Remove soft line breaks
$input = preg_replace("/=\r?\n/", '', $input);
// cytopia edit
if (version_compare(PHP_VERSION, '7.2.0', '>=')) {
$cb = function($matches) {
return chr(hexdec($matches[0]));
};
} else {
// Replace encoded characters
$cb = create_function('$matches', ' return chr(hexdec($matches[0]));');
}
$input = preg_replace_callback( '/=([a-f0-9]{2})/i', $cb, $input);

View File

@ -1,13 +0,0 @@
If you encounter a bug and something does not work, make sure you have done the following and check those boxes before submitting an issue - thank you!
- [ ] Pull latest dockers (e.g.: `docker pull cytopia/<used_docker>`) before running `docker-compose up`
- [ ] Specify used docker versions (php, web and database)
- [ ] Attach logs for php, mysql and webserver (found in `log/` directory)
- [ ] Start with debug mode and attach docker-compose output (`.env` setting `DEBUG_COMPOSE_ENTRYPOINT=1`)
- [ ] Never use different mysql|mariadb versions on the same `HOST_PATH_MYSQL_DATADIR` on existing database files. Different mysql|mariadb versions might upgrade/corrupt existing database files. If you have done that already, start with a different path of `HOST_PATH_MYSQL_DATADIR` (to an empty directory) and try again.
Please also specify the following info:
- [ ] Which operating system are you at (Linux, OSX or Windows)
- [ ] `docker version`
- [ ] `docker-compose version`

50
.github/ISSUE_TEMPLATE/bug_report.md vendored Normal file
View File

@ -0,0 +1,50 @@
---
name: 🐛 Bug report
about: Create a report to help us improve
---
<!---
1. Verify first that your issue/request is not already reported on GitHub.
2. Verify that your question is not covered in the docs: https://devilbox.readthedocs.io
3. PLEASE FILL OUT ALL REQUIRED INFORMATION BELOW! Otherwise it might take more time to properly handle this bug report.
-->
#### ISSUE TYPE
<!-- DO NOT CHANGE THIS -->
- Bug Report
<!-- DO NOT CHANGE THIS -->
#### OS / ENVIRONMENT
<!-- COMPLETE ALL 6 BULLET POINTS BELOW: -->
1. Host operating system:
2. Native Docker or Docker Toolbox:
3. Docker version:
4. Docker Compose version:
5. What containers are running:
6. Container versions:
#### SUMMARY
<!-- Explain the problem briefly -->
#### STEPS TO REPRODUCE
<!-- Show exactly how to reproduce the problem -->
#### EXPECTED BEHAVIOUR
<!-- What is the expected behaviour? -->
#### ACTUAL BEHAVIOUR
<!-- What is the actual behaviour? -->
#### OTHER INFORMATION
<!-- Add anything else here, such as all non-default customization you have already made -->

28
.github/ISSUE_TEMPLATE/documentation.md vendored Normal file
View File

@ -0,0 +1,28 @@
---
name: 📝 Documentation
about: Anything related to the Devilbox documentation
---
<!---
1. Verify first that your question is not already reported on GitHub.
2. Verify that your question is not covered in the docs: https://devilbox.readthedocs.io
3. PLEASE FILL OUT ALL REQUIRED INFORMATION BELOW! Otherwise it might take more time to properly handle this question.
-->
#### ISSUE TYPE
<!-- DO NOT CHANGE THIS -->
- Documentation
<!-- DO NOT CHANGE THIS -->
#### SUMMARY
<!-- Add your information here -->
#### Goal
<!-- Explain what you actually want to accomplish -->

View File

@ -0,0 +1,28 @@
---
name: ✨ Feature request
about: Suggest an idea for this project
---
<!---
1. Verify first that your feature request is not already reported on GitHub.
2. Verify that your feature is not already implemented: https://devilbox.readthedocs.io
3. PLEASE FILL OUT ALL REQUIRED INFORMATION BELOW! Otherwise it might take more time to properly handle this feature request
-->
#### ISSUE TYPE
<!-- DO NOT CHANGE THIS -->
- Feature request
<!-- DO NOT CHANGE THIS -->
#### SUMMARY
<!-- Explain your feature idea briefly -->
#### Goal
<!-- Explain what you actually want to accomplish with that feature -->

28
.github/ISSUE_TEMPLATE/question.md vendored Normal file
View File

@ -0,0 +1,28 @@
---
name: ❔ Question
about: General question
---
<!---
1. Verify first that your question is not already reported on GitHub.
2. Verify that your question is not covered in the docs: https://devilbox.readthedocs.io
3. PLEASE FILL OUT ALL REQUIRED INFORMATION BELOW! Otherwise it might take more time to properly handle this question.
-->
#### ISSUE TYPE
<!-- DO NOT CHANGE THIS -->
- Question
<!-- DO NOT CHANGE THIS -->
#### SUMMARY
<!-- Ask your question here -->
#### Goal
<!-- Explain what you actually want to accomplish -->

View File

@ -1,10 +1,9 @@
<!-- Add a name to your PR below -->
# FEATURE_NAME
#### Short description
#### DESCRIPTION
<!-- Enter a short description here -->
<!-- Link to issues in case it fixes an issue -->
#### Tasks done
* [ ] Updated `$DEVILBOX_DATE` in [config.php](https://github.com/cytopia/devilbox/blob/master/.devilbox/www/config.php#L17)

19
.gitignore vendored
View File

@ -25,9 +25,17 @@
# Ignore Certificate Authority
/ca/*
# Ignore emails
/mail/*
# Ignore compose override file
docker-compose.override.yml
# Ignore custom global vhost gen templates
/cfg/vhost-gen/apache22.conf
/cfg/vhost-gen/apache24.conf
/cfg/vhost-gen/nginx.conf
# Ignore custom HTTPD configs
/cfg/apache-2.2/*.conf
/cfg/apache-2.4/*.conf
@ -48,30 +56,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
@ -82,7 +99,7 @@ docker-compose.override.yml
# Ignore documentation sphinx build
/docs/_build/
/docs/make.bat
/docs/Makefile
/docs/linkcheck
*.rst.todo
# Keep folders

View File

@ -185,7 +185,9 @@ before_script:
script:
- if [ "${S1}" = "DOCUMENTATION" ]; then
cd docs/;
sphinx-build -a -W -E -j auto -n -v . _build/html/;
make build;
make linkcheck;
make linkcheck2;
else
.tests/test_single.sh . "${S1}" "${V1}" "${S2}" "${V2}";
fi

View File

@ -21,3 +21,19 @@ Please see [ROADMAP](https://github.com/cytopia/devilbox/issues/23) for what is
* [ ] Better layout
* [ ] Better logos
* [ ] Try to remove as much vendor dependencies as possible
## Updating Vendors
#### phpMyAdmin
The following settings must be applied to `config.inc.php`:
```php
<?php
$cfg['TempDir'] = '/tmp';
$cfg['CheckConfigurationPermissions'] = false;
$cfg['blowfish_secret'] = 'add whatever value here';
$cfg['Servers'][$i]['host'] = 'mysql';
$cfg['Servers'][$i]['AllowNoPassword'] = true;
```

276
README.md
View File

@ -2,7 +2,7 @@
<h1 align="center">The Devilbox</h1>
</p>
![Devilbox](docs/img/devilbox-banner.png)
![Devilbox](docs/img/banner.png)
**[Usage](#usage)** |
**[Community](#community)** |
@ -13,21 +13,27 @@
**[Logos](#logos)** |
**[License](#license)**
![Devilbox](docs/_static/img/devilbox-dash-full.png)
![Devilbox](docs/_includes/figures/devilbox/devilbox-intranet-dash-all.png)
[![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)
<img width="200" style="width:200px;" src="docs/_static/img/global-configuration/https-ssl-address-bar.png" />
<img width="200" style="width:200px;" src="docs/_includes/figures/https/https-ssl-address-bar.png" />
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**
![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)
@ -75,31 +81,56 @@ Find documentation and help here
#### Quick start
You are up and running in four simple steps:
```shell
# Get the devilbox
$ git clone https://github.com/cytopia/devilbox
<table width="100%" style="width:100%; display:table;">
<thead>
<tr>
<th width="50%" style="width:33%;">Linux and MacOS</th>
<th width="50%" style="width:33%;">Windows</th>
</tr>
</thead>
<tbody style="vertical-align: bottom;">
<tr>
<td>
<pre># Get the Devilbox
$ git clone https://github.com/cytopia/devilbox</pre>
<pre># Create docker-compose environment file
$ cd devilbox
$ cp env-example .env</pre>
<pre># Edit your configuration
$ vim .env</pre>
<pre># Start all container
$ docker-compose up</pre>
</td>
<td>
1. Clone <code>https://github.com/cytopia/devilbox</code> to <code>C:\devilbox</code> with <a href="https://git-scm.com/downloads">Git for Windows</a><br/><br/>
2. Copy <code>C:\devilbox\env-example</code> to <code>C:\devilbox\.env</code><br/><br/>
3. Edit <code>C:\devilbox\.env</code><br/><br/>
4. <a href="https://devilbox.readthedocs.io/en/latest/howto/terminal/open-terminal-on-win.html">Open a terminal on Windows</a> and type:<br/><br/><br/>
<pre># Start all container
C:\devilbox> docker-compose up</pre></div>
</td>
</tr>
</tbody>
</table>
# Create docker-compose environment file
$ cp env-example .env
> **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)
# Edit your configuration
$ vim .env
# Start all containers
$ 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
```
![Devilbox](docs/_static/img/devilbox-dash-selective.png)
> **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
@ -124,7 +155,7 @@ Every single attachable container comes with many different versions. In order t
<tr>
<td><a target="_blank" title="Apache 2.2" href="https://github.com/devilbox/docker-apache-2.2">2.2</a></td>
<td><a target="_blank" title="Nginx stable" href="https://github.com/devilbox/docker-nginx-stable">stable</a></td>
<td><a target="_blank" title="PHP 5.3" href="https://github.com/devilbox/docker-php-fpm">5.3</a></td>
<td><a target="_blank" title="PHP 5.2" href="https://github.com/devilbox/docker-php-fpm">5.2</a><sup>[1]</sup></td>
<td><a target="_blank" title="MySQL 5.5" href="https://github.com/cytopia/docker-mysql-5.5">5.5</a></td>
<td><a target="_blank" title="MariaDB 5.5" href="https://github.com/cytopia/docker-mariadb-5.5">5.5</a></td>
<td><a target="_blank" title="PerconaDB 5.5" href="https://github.com/cytopia/docker-percona-5.5">5.5</a></td>
@ -136,7 +167,7 @@ Every single attachable container comes with many different versions. In order t
<tr>
<td><a target="_blank" title="Apache 2.4" href="https://github.com/devilbox/docker-apache-2.4">2.4</a></td>
<td><a target="_blank" title="Nginx mainline" href="https://github.com/devilbox/docker-nginx-mainline">mainline</a></td>
<td><a target="_blank" title="PHP 5.4" href="https://github.com/devilbox/docker-php-fpm">5.4</a></td>
<td><a target="_blank" title="PHP 5.3" href="https://github.com/devilbox/docker-php-fpm">5.3</a></td>
<td><a target="_blank" title="MySQL 5.6" href="https://github.com/cytopia/docker-mysql-5.6">5.6</a></td>
<td><a target="_blank" title="MariaDB 10.0" href="https://github.com/cytopia/docker-mariadb-10.0">10.0</a></td>
<td><a target="_blank" title="PerconaDB 5.6" href="https://github.com/cytopia/docker-percona-5.6">5.6</a></td>
@ -148,7 +179,7 @@ Every single attachable container comes with many different versions. In order t
<tr>
<td></td>
<td></td>
<td><a target="_blank" title="PHP 5.5" href="https://github.com/devilbox/docker-php-fpm">5.5</a></td>
<td><a target="_blank" title="PHP 5.4" href="https://github.com/devilbox/docker-php-fpm">5.4</a></td>
<td><a target="_blank" title="MySQL 5.7" href="https://github.com/cytopia/docker-mysql-5.7">5.7</a></td>
<td><a target="_blank" title="MariaDB 10.1" href="https://github.com/cytopia/docker-mariadb-10.1">10.1</a></td>
<td><a target="_blank" title="PerconaDB 5.7" href="https://github.com/cytopia/docker-percona-5.7">5.7</a></td>
@ -160,7 +191,7 @@ Every single attachable container comes with many different versions. In order t
<tr>
<td></td>
<td></td>
<td><a target="_blank" title="PHP 5.6" href="https://github.com/devilbox/docker-php-fpm">5.6</a></td>
<td><a target="_blank" title="PHP 5.5" href="https://github.com/devilbox/docker-php-fpm">5.5</a></td>
<td><a target="_blank" title="MySQL 8.0" href="https://github.com/cytopia/docker-mysql-8.0">8.0</a></td>
<td><a target="_blank" title="MariaDB 10.2" href="https://github.com/cytopia/docker-mariadb-10.2">10.2</a></td>
<td></td>
@ -172,7 +203,7 @@ Every single attachable container comes with many different versions. In order t
<tr>
<td></td>
<td></td>
<td><a target="_blank" title="PHP 7.0" href="https://github.com/devilbox/docker-php-fpm">7.0</a></td>
<td><a target="_blank" title="PHP 5.6" href="https://github.com/devilbox/docker-php-fpm">5.6</a></td>
<td></td>
<td><a target="_blank" title="MariaDB 10.3" href="https://github.com/cytopia/docker-mariadb-10.3">10.3</a></td>
<td></td>
@ -184,7 +215,7 @@ Every single attachable container comes with many different versions. In order t
<tr>
<td></td>
<td></td>
<td><a target="_blank" title="PHP 7.1" href="https://github.com/devilbox/docker-php-fpm">7.1</a></td>
<td><a target="_blank" title="PHP 7.0" href="https://github.com/devilbox/docker-php-fpm">7.0</a></td>
<td></td>
<td></td>
<td></td>
@ -196,7 +227,7 @@ Every single attachable container comes with many different versions. In order t
<tr>
<td></td>
<td></td>
<td><a target="_blank" title="PHP 7.2" href="https://github.com/devilbox/docker-php-fpm">7.2</a></td>
<td><a target="_blank" title="PHP 7.1" href="https://github.com/devilbox/docker-php-fpm">7.1</a></td>
<td></td>
<td></td>
<td></td>
@ -205,6 +236,18 @@ Every single attachable container comes with many different versions. In order t
<td><a target="_blank" title="Memcached latest" href="https://github.com/docker-library/memcached">latest</a></td>
<td></td>
</tr>
<tr>
<td></td>
<td></td>
<td><a target="_blank" title="PHP 7.2" href="https://github.com/devilbox/docker-php-fpm">7.2</a></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td></td>
<td></td>
@ -220,23 +263,47 @@ Every single attachable container comes with many different versions. In order t
</tbody>
</table>
<strong><sup>[1]</sup></strong> <strong>PHP 5.2</strong> 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.
> **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.
```shell
# Enter as user devilbox (normal operation / development)
host> ./shell.sh
devilbox@php-7.0.19 in /shared/httpd $
```
```shell
# Enter as root user (do root stuff)
host> ./shell.sh
devilbox@php-7.0.19 in /shared/httpd $ sudo su -
root@php-7.0.19 in /shared/httpd $
```
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:
<table width="100%" style="width:100%; display:table;">
<thead>
<tr>
<th width="50%" style="width:33%;">Linux and MacOS</th>
<th width="50%" style="width:33%;">Windows</th>
</tr>
</thead>
<tbody style="vertical-align: bottom;">
<tr>
<td>
<pre>host> ./shell.sh
devilbox@php-7.0.19 in /shared/httpd $</pre>
</td>
<td>
<pre>C:\devilbox> shell.bat
devilbox@php-7.0.19 in /shared/httpd $</pre>
</td>
</tr>
</tbody>
</table>
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).
> **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)
@ -245,7 +312,10 @@ 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.
> **Documentation:**
> [Devilbox Prerequisites](https://devilbox.readthedocs.io/en/latest/getting-started/prerequisites.html)
#### Features
@ -261,7 +331,7 @@ The devilbox has everything setup for you. The only thing you will have to insta
</tr>
<tr>
<td>:star: Unlimited vhosts</td>
<td>Run as many projects as you need with a single instance of the devilbox.</td>
<td>Run as many projects as you need with a single instance of the Devilbox.</td>
</tr>
<tr>
<td>:star: Custom vhosts</td>
@ -302,6 +372,11 @@ The devilbox has everything setup for you. The only thing you will have to insta
</tbody>
</table>
> **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
@ -337,41 +412,104 @@ The following tools will assist you on creating new projects easily as well as h
<td width="220" style="width:220px;">:wrench: <a href="https://github.com/cytopia/awesome-ci">awesome-ci</a></td>
<td>A set of tools for static code analysis:<br/><br/><code>file-cr</code>, <code>file-crlf</code>, <code>file-empty</code>, <code>file-nullbyte-char</code>, <code>file-trailing-newline</code>, <code>file-trailing-single-newline</code>, <code>file-trailing-space</code>, <code>file-utf8</code>, <code>file-utf8-bom</code>, <code>git-conflicts</code>, <code>git-ignored</code>, <code>inline-css</code>, <code>inline-js</code>, <code>regex-grep</code>, <code>regex-perl</code>, <code>syntax-bash</code>, <code>syntax-css</code>, <code>syntax-js</code>, <code>syntax-json</code>, <code>syntax-markdown</code>, <code>syntax-perl</code>, <code>syntax-php</code>, <code>syntax-python</code>, <code>syntax-ruby</code>, <code>syntax-scss</code>, <code>syntax-sh</code></td>
</tr>
<tr>
<td>:wrench: <a href="https://github.com/nvie/gitflow">git flow</a></td>
<td><code>git-flow</code> is a Git extensions to provide high-level repository operations for Vincent Driessen's branching model.</td>
</tr>
<tr>
<td>:wrench: <a href="https://github.com/zaach/jsonlint">json lint</a></td>
<td><code>jsonlint</code> is a command line linter for JSON files.</td>
</tr>
<tr>
<td>:wrench: <a href="https://github.com/laravel/installer">laravel installer</a></td>
<td><code>laravel</code> is a command line tool that lets you easily install the Laravel framework.</td>
</tr>
<tr>
<td>:wrench: <a href="https://github.com/cytopia/linkcheck">linkcheck</a></td>
<td><code>linkcheck</code> is a command line tool that searches for URLs in files (optionally limited by extension) and validates their HTTP status code.</td>
</tr>
<tr>
<td>:wrench: <a href="https://linuxbrew.sh/">linuxbrew</a></td>
<td><code>brew</code> is a MacOS Homenbrew clone for Linux.</td>
</tr>
<tr>
<td>:wrench: <a href="https://github.com/DavidAnson/markdownlint">markdownlint</a></td>
<td><code>markdownlint</code> is a markdown linter.</td>
</tr>
<tr>
<td>:wrench: <a href="https://github.com/markdownlint/markdownlint">mdl</a></td>
<td><code>mdl</code> is a markdown linter.</td>
</tr>
<tr>
<td>:wrench: <a href="https://github.com/phalcon/phalcon-devtools">phalcon devtools</a></td>
<td><code>phalcon</code> is a command line tool that lets you easily install the PhalconPHP framework.</td>
</tr>
<tr>
<td>:wrench: <a href="https://github.com/photoncms/installer">photon installer</a></td>
<td><code>photon</code> is a command line tool that lets you easily install the PhotonCMS.</td>
</tr>
<tr>
<td>:wrench: <a href="https://github.com/squizlabs/PHP_CodeSniffer">php code sniffer</a></td>
<td><code>phpcs</code> is a command line tool that tokenizes PHP, JavaScript and CSS files and detects violations of a defined set of coding standards.</td>
</tr>
<tr>
<td>:wrench: <a href="https://github.com/squizlabs/PHP_CodeSniffer">php code beautifier</a></td>
<td><code>phpcbf</code> is a command line tool that automatically correct coding standard violations.</td>
</tr>
<tr>
<td>:wrench: <a href="https://github.com/brigade/scss-lint/">scss-lint</a></td>
<td><code>scss-lint</code> is a css/scss linter.</td>
</tr>
<tr>
<td>:wrench: <a href="https://github.com/symfony/symfony-installer">symfony installer</a></td>
<td><code>symfony</code> is a command line tool that lets you easily install the Symfony framework.</td>
</tr>
<tr>
<td>:wrench: <a href="https://github.com/jonas/tig">tig</a></td>
<td><code>tig</code> is a text-mode interface for git.</td>
</tr>
<tr>
<td>:wrench: <a href="https://wp-cli.org">wp-cli</a></td>
<td><code>wp</code> is a command line tool that lets you easily install Wordpress.</td>
</tr>
<tr>
<td>:wrench: <a href="https://github.com/adrienverge/yamllint">yamllint</a></td>
<td><code>yamllint</code> is a linter for yaml files.</td>
</tr>
</tbody>
</table>
Well-known and popular tools will be at your service as well:
<a target="_blank" title="Ansible" href="https://www.ansible.com/"><img width="64" style="width:64px" src="docs/img/logo_tools/ansible.png" alt="Devilbox"/></a>
<a target="_blank" title="CodeCeption" href="https://codeception.com/"><img width="64" style="width:64px" src="docs/img/logo_tools/codeception.png" alt="Devilbox"/></a>
<a target="_blank" title="Composer" href="https://getcomposer.org"><img width="64" style="width:64px" src="docs/img/logo_tools/composer.png" alt="Devilbox"/></a>
<a target="_blank" title="Drupal Console" href="https://drupalconsole.com"><img width="64" style="battery" src="docs/img/logo_tools/drupal-console.png" alt="Devilbox"/></a>
<a target="_blank" title="Drush" href="https://www.drupal.org/project/drush"><img width="64" style="width:64px;" src="docs/img/logo_tools/drush.png" alt="Devilbox"/></a>
<a target="_blank" title="ESLint" href="https://eslint.org/"><img width="64" style="width:64px;" src="docs/img/logo_tools/eslint.png" alt="Devilbox"/></a>
<a target="_blank" title="Git" href="https://git-scm.com"><img width="64" style="width:64px;" src="docs/img/logo_tools/git.png" alt="Devilbox"/></a>
<a target="_blank" title="Gulp" href="https://gulpjs.com/"><img width="64" style="width:64px;" src="docs/img/logo_tools/gulp.png" alt="Devilbox"/></a>
<a target="_blank" title="Grunt" href="https://gruntjs.com/"><img width="64" style="width:64px;" src="docs/img/logo_tools/grunt.png" alt="Devilbox"/></a>
<a target="_blank" title="mysqldump-secure" href="https://mysqldump-secure.org"><img width="64" style="width:64px;" src="docs/img/logo_tools/mysqldump-secure.png" alt="Devilbox"/></a>
<a target="_blank" title="NodeJS" href="https://nodejs.org"><img width="64" style="width:64px;" src="docs/img/logo_tools/nodejs.png" alt="Devilbox"/></a>
<a target="_blank" title="NPM" href="https://www.npmjs.com"><img width="64" style="width:64px;" src="docs/img/logo_tools/npm.png" alt="Devilbox"/></a>
<a target="_blank" title="PHPUnit" href="https://phpunit.de/"><img width="64" style="width:64px;" src="docs/img/logo_tools/phpunit.png" alt="Devilbox"/></a>
<a target="_blank" title="Sass" href="https://sass-lang.com/"><img width="64" style="width:64px;" src="docs/img/logo_tools/sass.png" alt="Devilbox"/></a>
<a target="_blank" title="Webpack" href="https://webpack.js.org/"><img width="64" style="width:64px;" src="docs/img/logo_tools/webpack.png" alt="Devilbox"/></a>
<a target="_blank" title="Yarn" href="https://yarnpkg.com/en/"><img width="64" style="width:64px;" src="docs/img/logo_tools/yarn.png" alt="Devilbox"/></a>
#### 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*
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)
> *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, SPL, sqlite3, standard, swoole, sysvmsg, sysvsem, sysvshm, tidy, tokenizer, uploadprogress, wddx, xdebug, xml, xmlreader, xmlrpc, xmlwriter, xsl, Zend OPcache, zip, zlib*
#### Custom PHP Modules
@ -381,20 +519,45 @@ You can also copy any custom modules into `mod/(php-fpm)-<VERSION>` 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)
[![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)
[![Phalcon](docs/img/logo_fw/phalcon.png)](https://phalconphp.com)
[![Symfony](docs/img/logo_fw/symfony.png)](https://symfony.com)
[![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)
<a target="_blank" title="CakePHP" href="https://cakephp.org"><img width="64" style="width:64px" src="docs/img/logo_fw/cake.png" alt="Devilbox"/></a>
<a target="_blank" title="CodeIgniter" href="https://www.codeigniter.com"><img width="64" style="width:64px" src="docs/img/logo_fw/codeigniter.png" alt="Devilbox"/></a>
<a target="_blank" title="CraftCMS" href="https://craftcms.com/"><img width="64" style="width:64px" src="docs/img/logo_fw/craftcms.png" alt="Devilbox"/></a>
<a target="_blank" title="Drupal" href="https://www.drupal.org"><img width="64" style="width:64px" src="docs/img/logo_fw/drupal.png" alt="Devilbox"/></a>
<a target="_blank" title="Joomla" href="https://www.joomla.org"><img width="64" style="width:64px" src="docs/img/logo_fw/joomla.png" alt="Devilbox"/></a>
<a target="_blank" title="Laravel" href="https://laravel.com"><img width="64" style="width:64px" src="docs/img/logo_fw/laravel.png" alt="Devilbox"/></a>
<a target="_blank" title="Magento" href="https://magento.com"><img width="64" style="width:64px" src="docs/img/logo_fw/magento.png" alt="Devilbox"/></a>
<a target="_blank" title="PhalconPHP" href="https://phalconphp.com"><img width="64" style="width:64px" src="docs/img/logo_fw/phalcon.png" alt="Devilbox"/></a>
<a target="_blank" title="PhotonCMS" href="https://photoncms.com"><img width="64" style="width:64px" src="docs/img/logo_fw/photoncms.png" alt="Devilbox"/></a>
<a target="_blank" title="PrestaShop" href="https://www.prestashop.com/en"><img width="64" style="width:64px" src="docs/img/logo_fw/prestashop.png" alt="Devilbox"/></a>
<a target="_blank" title="Shopware" href="https://en.shopware.com"><img width="64" style="width:64px" src="docs/img/logo_fw/shopware.png" alt="Devilbox"/></a>
<a target="_blank" title="Symfony" href="https://symfony.com"><img width="64" style="width:64px" src="docs/img/logo_fw/symfony.png" alt="Devilbox"/></a>
<a target="_blank" title="Typo3" href="https://typo3.org"><img width="64" style="width:64px" src="docs/img/logo_fw/typo3.png" alt="Devilbox"/></a>
<a target="_blank" title="Wordpress" href="https://wordpress.org"><img width="64" style="width:64px" src="docs/img/logo_fw/wordpress.png" alt="Devilbox"/></a>
<a target="_blank" title="Yii" href="http://www.yiiframework.com"><img width="64" style="width:64px" src="docs/img/logo_fw/yii.png" alt="Devilbox"/></a>
<a target="_blank" title="Zend" href="https://framework.zend.com"><img width="64" style="width:64px" src="docs/img/logo_fw/zend.png" alt="Devilbox"/></a>
> **Documentation:**<br/>
> [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 CraftCMS](https://devilbox.readthedocs.io/en/latest/examples/setup-craftcms.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` 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, ...)
@ -404,6 +567,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)**
> **Documentation:**
> [Devilbox Intranet](https://devilbox.readthedocs.io/en/latest/getting-started/devilbox-intranet.html)
## Screenshots
@ -442,7 +608,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.

0
cfg/php-fpm-5.2/.keepme Normal file
View File

View File

@ -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.

View File

@ -0,0 +1,156 @@
<?xml version="1.0" ?>
<configuration>
All relative paths in this config are relative to php's install prefix
<section name="global_options">
Pid file
<value name="pid_file">/var/run/php-fpm.pid</value>
Error log file
<value name="error_log">/proc/self/fd/2</value>
Log level
<value name="log_level">notice</value>
When this amount of php processes exited with SIGSEGV or SIGBUS ...
<value name="emergency_restart_threshold">10</value>
... 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.
<value name="emergency_restart_interval">1m</value>
Time limit on waiting child's reaction on signals from master
<value name="process_control_timeout">5s</value>
Set to 'no' to debug fpm
<value name="daemonize">no</value>
</section>
<workers>
<section name="pool">
Name of pool. Used in logs and stats.
<value name="name">www</value>
Address to accept fastcgi requests on.
Valid syntax is 'ip.ad.re.ss:port' or just 'port' or '/path/to/unix/socket'
<value name="listen_address">0.0.0.0:9000</value>
<value name="listen_options">
Set listen(2) backlog
<value name="backlog">1024</value>
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.
<value name="owner"></value>
<value name="group"></value>
<value name="mode">0666</value>
</value>
Additional php.ini defines, specific to this pool of workers.
<value name="php_defines">
<value name="error_reporting">-1</value>
<value name="xmlrpc_errors">0</value>
<value name="report_memleaks">1</value>
<value name="display_errors">1</value>
<value name="display_startup_errors">1</value>
<value name="track_errors">1</value>
<value name="log_errors">1</value>
<value name="html_errors">1</value>
</value>
Unix user of processes
<value name="user">devilbox</value>
Unix group of processes
<value name="group">devilbox</value>
Process manager settings
<value name="pm">
Sets style of controling worker process count.
Valid values are 'static' and 'apache-like'
<value name="style">apache-like</value>
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.
<value name="max_children">5</value>
Settings group for 'apache-like' pm style
<value name="apache_like">
Sets the number of server processes created on startup.
Used only when 'apache-like' pm_style is selected
<value name="StartServers">3</value>
Sets the desired minimum number of idle server processes.
Used only when 'apache-like' pm_style is selected
<value name="MinSpareServers">2</value>
Sets the desired maximum number of idle server processes.
Used only when 'apache-like' pm_style is selected
<value name="MaxSpareServers">4</value>
</value>
</value>
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'
<value name="request_terminate_timeout">120s</value>
The timeout (in seconds) for serving of single request after which a php backtrace will be dumped to slow.log file
'0s' means 'off'
<value name="request_slowlog_timeout">0s</value>
The log file for slow requests
<value name="slowlog">/proc/self/fd/2</value>
Set open file desc rlimit
<value name="rlimit_files">1024</value>
Set max core size rlimit
<value name="rlimit_core">0</value>
Chroot to this directory at the start, absolute path
<value name="chroot"></value>
Chdir to this directory at the start, absolute path
<value name="chdir"></value>
Redirect workers' stdout and stderr into main error log.
If not set, they will be redirected to /dev/null, according to FastCGI specs
<value name="catch_workers_output">yes</value>
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
<value name="max_requests">500</value>
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.
<!-- <value name="allowed_clients">127.0.0.1</value> -->
Pass environment variables like LD_LIBRARY_PATH
All $VARIABLEs are taken from current environment
<value name="environment">
<value name="HOSTNAME">$HOSTNAME</value>
<value name="PATH">/usr/local/bin:/usr/bin:/bin</value>
<value name="TMP">/tmp</value>
<value name="TMPDIR">/tmp</value>
<value name="TEMP">/tmp</value>
<value name="OSTYPE">$OSTYPE</value>
<value name="MACHTYPE">$MACHTYPE</value>
<value name="MALLOC_CHECK_">2</value>
</value>
</section>
</workers>
</configuration>

54
cfg/php-fpm-5.3/README.md Normal file
View File

@ -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.

View File

@ -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 = 1024
; 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:

View File

@ -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:

View File

@ -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:

54
cfg/php-fpm-5.4/README.md Normal file
View File

@ -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.

View File

@ -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 = 1024
; 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:

View File

@ -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:

View File

@ -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:

54
cfg/php-fpm-5.5/README.md Normal file
View File

@ -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.

View File

@ -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 = 1024
; 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:

View File

@ -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:

View File

@ -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:

54
cfg/php-fpm-5.6/README.md Normal file
View File

@ -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.

View File

@ -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 = 1024
; 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:

View File

@ -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:

View File

@ -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:

54
cfg/php-fpm-7.0/README.md Normal file
View File

@ -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.

View File

@ -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 = 1024
; 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:

View File

@ -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:

View File

@ -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:

54
cfg/php-fpm-7.1/README.md Normal file
View File

@ -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.

View File

@ -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 = 1024
; 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:

View File

@ -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:

View File

@ -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:

54
cfg/php-fpm-7.2/README.md Normal file
View File

@ -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.

View File

@ -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 = 1024
; 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:

View File

@ -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:

View File

@ -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:

54
cfg/php-fpm-7.3/README.md Normal file
View File

@ -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.

View File

@ -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 = 1024
; 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:

View File

@ -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:

View File

@ -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:

0
cfg/php-ini-5.2/.keepme Normal file
View File

26
cfg/php-ini-5.2/README.md Normal file
View File

@ -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.

View File

@ -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:

View File

@ -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:

26
cfg/php-ini-5.3/README.md Normal file
View File

@ -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.

View File

@ -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

View File

@ -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:

View File

@ -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:

26
cfg/php-ini-5.4/README.md Normal file
View File

@ -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.

View File

@ -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

View File

@ -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:

View File

@ -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:

26
cfg/php-ini-5.5/README.md Normal file
View File

@ -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.

View File

@ -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

View File

@ -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:

View File

@ -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:

26
cfg/php-ini-5.6/README.md Normal file
View File

@ -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.

View File

@ -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

View File

@ -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:

View File

@ -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:

26
cfg/php-ini-7.0/README.md Normal file
View File

@ -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.

View File

@ -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

View File

@ -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:

View File

@ -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:

26
cfg/php-ini-7.1/README.md Normal file
View File

@ -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.

View File

@ -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

View File

@ -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:

View File

@ -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:

26
cfg/php-ini-7.2/README.md Normal file
View File

@ -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.

View File

@ -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

View File

@ -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:

View File

@ -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:

26
cfg/php-ini-7.3/README.md Normal file
View File

@ -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.

View File

@ -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

View File

@ -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:

View File

@ -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:

0
cfg/vhost-gen/.keepme Normal file
View File

14
cfg/vhost-gen/README.md Normal file
View File

@ -0,0 +1,14 @@
# Global vhost-gen configurations
Enabling templates in this directory will change the webserver vhost configuration globally for all projects which do not have their own specific vhost-gen template in place.
In order for template files to be picked up by the web server they must have the correct name.
Copy the example templates to a new file with the correct name.
| Web server | Example template | Template name |
|----------------|-------------------------|----------------|
| Apache 2.2 | `apache22.yml-example` | `apache22.yml` |
| Apache 2.4 | `apache24.yml-example` | `apache24.yml` |
| Nginx stable | `nginx.yml-example` | `nginx.yml` |
| Nginx mainline | `nginx.yml-example` | `nginx.yml` |

View File

@ -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

View File

@ -120,14 +120,19 @@ 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
<FilesMatch \.php$>
Require all granted
SetHandler proxy:fcgi://__PHP_ADDR__:__PHP_PORT__
</FilesMatch>
# enablereuse requires Apache 2.4.11 or later
<Proxy "fcgi://__PHP_ADDR__:__PHP_PORT__/" enablereuse=on max=10>
<Proxy "fcgi://__PHP_ADDR__:__PHP_PORT__/">
ProxySet timeout=__PHP_TIMEOUT__
ProxySet connectiontimeout=__PHP_TIMEOUT__
</Proxy>
# If the php file doesn't exist, disable the proxy handler.

View File

@ -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;

View File

@ -85,6 +85,7 @@ services:
docker.for.lin.host.internal: 172.16.238.1
docker.for.lin.localhost: 172.16.238.1
hostname: bind
networks:
app_net:
ipv4_address: 172.16.238.100
@ -94,8 +95,7 @@ services:
# PHP / HHVM
# ------------------------------------------------------------
php:
image: devilbox/php-fpm:${PHP_SERVER:-7.0}-work
restart: always
image: devilbox/php-fpm:${PHP_SERVER:-7.0}-work-0.30
##
## All .env variables
@ -156,6 +156,7 @@ services:
docker.for.lin.host.internal: 172.16.238.1
docker.for.lin.localhost: 172.16.238.1
hostname: php
networks:
app_net:
ipv4_address: 172.16.238.10
@ -174,7 +175,7 @@ services:
- ${DEVILBOX_PATH}/log/php-fpm-${PHP_SERVER}:/var/log/php:z
# Mount Mail directory
#- ${DEVILBOX_PATH}/run/mail:/var/mail
- ${DEVILBOX_PATH}/mail:/var/mail
# Mount DB Backup directory
- ${DEVILBOX_PATH}/backups:/shared/backups:z
@ -205,8 +206,7 @@ services:
# Web Server
# ------------------------------------------------------------
httpd:
image: devilbox/${HTTPD_SERVER:-nginx-stable}:0.17
restart: always
image: devilbox/${HTTPD_SERVER:-nginx-stable}:0.22
environment:
@ -251,9 +251,11 @@ services:
##
## PHP-FPM Remote Server
##
- COMPAT=${PHP_SERVER:-7.0}
- 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: ----
@ -261,6 +263,7 @@ services:
- "${LOCAL_LISTEN_ADDR}${HOST_PORT_HTTPD}:80"
- "${LOCAL_LISTEN_ADDR}${HOST_PORT_HTTPD_SSL}:443"
hostname: httpd
networks:
app_net:
ipv4_address: 172.16.238.11
@ -278,6 +281,9 @@ services:
# Mount custom web server config directory
- ${DEVILBOX_PATH}/cfg/${HTTPD_SERVER}:/etc/httpd-custom.d:z
# Mount custom vhost-templates
- ${DEVILBOX_PATH}/cfg/vhost-gen:/etc/vhost-gen.d
# Mount logs
- ${DEVILBOX_PATH}/log/${HTTPD_SERVER}:/var/log/${HTTPD_SERVER}:z
@ -326,6 +332,7 @@ services:
# [local-machine:]local-port:docker-port
- "${LOCAL_LISTEN_ADDR}${HOST_PORT_MYSQL}:3306"
hostname: mysql
networks:
app_net:
ipv4_address: 172.16.238.12
@ -369,6 +376,7 @@ services:
# [local-machine:]local-port:docker-port
- "${LOCAL_LISTEN_ADDR}${HOST_PORT_PGSQL}:5432"
hostname: pgsql
networks:
app_net:
ipv4_address: 172.16.238.13
@ -399,6 +407,7 @@ services:
# [local-machine:]local-port:docker-port
- "${LOCAL_LISTEN_ADDR}${HOST_PORT_REDIS}:6379"
hostname: redis
networks:
app_net:
ipv4_address: 172.16.238.14
@ -426,6 +435,7 @@ services:
# [local-machine:]local-port:docker-port
- "${LOCAL_LISTEN_ADDR}${HOST_PORT_MEMCD}:11211"
hostname: memcd
networks:
app_net:
ipv4_address: 172.16.238.15
@ -453,6 +463,7 @@ services:
# [local-machine:]local-port:docker-port
- "${LOCAL_LISTEN_ADDR}${HOST_PORT_MONGO}:27017"
hostname: mongo
networks:
app_net:
ipv4_address: 172.16.238.16

64
docs/Makefile Normal file
View File

@ -0,0 +1,64 @@
# Minimal makefile for Sphinx documentation
#
# You can set these variables from the command line.
SPHINXOPTS =
SPHINXBUILD = sphinx-build
SPHINXPROJ = devilbox
SOURCEDIR = .
BUILDDIR = _build
# Put it first so that "make" without argument is like "make help".
help:
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
@echo
@echo "Devilbox additional commands:"
@echo " build Build and test documentation"
@echo " autobuild Continuously run and build (http://127.0.0.1:8000)"
.PHONY: help Makefile test build autobuild
# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
%: Makefile
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
#
# Devilbox additions
#
#
# Used Sphinx options:
# --------------------
#
# -a: Always write all output files. The default is to only write output files
# for new and changed source files.
#
# -E: Dont use a saved environment (the structure caching all cross-references),
# but rebuild it completely.
#
# -n: Run in nit-picky mode. Currently, this generates warnings for all
# missing references. See the config value nitpick_ignore for a way to
# exclude some references as “known missing”.
#
# -q: Do not output anything on standard output, only write warnings and errors
# to standard error.
#
# -W: Turn warnings into errors. This means that the build stops at the first
# warning and sphinx-build exits with exit status 1.
linkcheck2:
ifeq ($(wildcard file1),)
bash -c 'curl -Ss -o linkcheck https://raw.githubusercontent.com/cytopia/linkcheck/master/linkcheck 2>/dev/null'
else
bash -c 'curl -Ss -o linkcheck -z linkcheck https://raw.githubusercontent.com/cytopia/linkcheck/master/linkcheck 2>/dev/null'
endif
chmod +x linkcheck
./linkcheck -r 30 -t 30 -e rst _includes/
build:
sphinx-build -a -E -n -j auto -q -W . _build/html
autobuild:
sphinx-autobuild . _build/html

View File

@ -26,17 +26,15 @@ sudo pip install sphinx_rtd_theme
#### How to build and error-check
```
cd docs/
sphinx-build -a -E -j auto -n -q . _build/html/
make build
```
#### How to build continuously
```
cd docs/
sphinx-autobuild . _build/html
make autobuild
```
#### How to view
Open you browser on http://127.0.0.1:8000
When using `make autobuild` your documentation is served at: http://127.0.0.1:8000

38
docs/_includes/all.rst Normal file
View File

@ -0,0 +1,38 @@
..
============================================================
HTML
============================================================
.. include:: /_includes/html/defaults.rst
..
============================================================
Images
============================================================
.. include:: /_includes/images/external.rst
..
============================================================
Links
============================================================
.. include:: /_includes/links/apps.rst
.. include:: /_includes/links/blogs.rst
.. include:: /_includes/links/dns.rst
.. include:: /_includes/links/documentation.rst
.. include:: /_includes/links/docker.rst
.. include:: /_includes/links/docker-compose.rst
.. include:: /_includes/links/docker-images.rst
.. include:: /_includes/links/examples.rst
.. include:: /_includes/links/git.rst
.. include:: /_includes/links/prerequistes.rst
.. include:: /_includes/links/ssh.rst
.. include:: /_includes/links/ssl.rst
.. include:: /_includes/links/tools.rst
.. include:: /_includes/links/uid.rst
.. include:: /_includes/links/xdebug.rst

View File

Before

Width:  |  Height:  |  Size: 56 KiB

After

Width:  |  Height:  |  Size: 56 KiB

View File

@ -0,0 +1,2 @@
.. figure:: /_includes/figures/blogs/youtube-email-catch-all.png
:target: https://www.youtube.com/watch?v=e-U-C5WhxGY

View File

Before

Width:  |  Height:  |  Size: 56 KiB

After

Width:  |  Height:  |  Size: 56 KiB

View File

@ -0,0 +1,2 @@
.. figure:: /_includes/figures/blogs/youtube-setup-and-workflow.png
:target: https://www.youtube.com/watch?v=reyZMyt2Zzo

View File

Before

Width:  |  Height:  |  Size: 120 KiB

After

Width:  |  Height:  |  Size: 120 KiB

View File

@ -0,0 +1,3 @@
.. figure:: /_includes/figures/devilbox/devilbox-intranet-dash-all.png
Devilbox intranet: index dash view for all started container

Some files were not shown because too many files have changed in this diff Show More