├── .env.example ├── .gitignore ├── README.md ├── data ├── mysql │ └── .gitignore └── redis │ └── .gitignore ├── docker-compose.example.yml ├── etc ├── mysql │ ├── my.cnf │ └── my.cnf.d │ │ └── .gitkeep ├── nginx │ ├── conf.d │ │ └── default.conf │ ├── nginx.conf │ └── ssl │ │ ├── localhost.crt │ │ └── localhost.key └── php-fpm │ ├── crontabs │ └── .gitignore │ └── php-fpm.ini └── wwwroot └── default └── index.php /.env.example: -------------------------------------------------------------------------------- 1 | TZ=Asia/Shanghai 2 | 3 | PHP_VERSION=metowolf/php:7.4.6 4 | 5 | MYSQL_VERSION=mysql/mysql-server:8.0.20 6 | MYSQL_ROOT_PASSWORD=root 7 | 8 | PMA_VERSION=phpmyadmin/phpmyadmin:5.0.2 9 | 10 | NGINX_VERSION=metowolf/nginx:1.17.10 11 | 12 | REDIS_VERSION=redis:6.0.2-alpine 13 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .env 2 | log 3 | docker-compose.yml 4 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Docker LEMP 2 | 3 | |name|pulls|version|layers|image size| 4 | |:---:|:---:|:---:|:---:|:---:| 5 | |[metowolf/php](https://hub.docker.com/r/metowolf/php)|![Pulls Count](https://img.shields.io/docker/pulls/metowolf/php.svg?style=flat-square)|![GitHub release (latest by date)](https://img.shields.io/github/v/tag/metowolf/docker-php?style=flat-square)|![Layers](https://shields.beevelop.com/docker/image/layers/metowolf/php/latest.svg?style=flat-square)|![image size](https://shields.beevelop.com/docker/image/image-size/metowolf/php/latest.svg?style=flat-square)| 6 | |[metowolf/nginx](https://hub.docker.com/r/metowolf/nginx)|![Pulls Count](https://img.shields.io/docker/pulls/metowolf/nginx.svg?style=flat-square)|![GitHub release (latest by date)](https://img.shields.io/github/v/tag/metowolf/docker-nginx?style=flat-square)|![](https://shields.beevelop.com/docker/image/layers/metowolf/nginx/latest.svg?style=flat-square)|![](https://shields.beevelop.com/docker/image/image-size/metowolf/nginx/latest.svg?style=flat-square)| 7 | |[mysql/mysql-server](https://hub.docker.com/r/mysql/mysql-server)|![Pulls Count](https://img.shields.io/docker/pulls/mysql/mysql-server.svg?style=flat-square)||![](https://shields.beevelop.com/docker/image/layers/mysql/mysql-server/latest.svg?style=flat-square)|![](https://shields.beevelop.com/docker/image/image-size/mysql/mysql-server/latest.svg?style=flat-square)| 8 | |[library/redis](https://hub.docker.com/_/redis)|![Pulls Count](https://img.shields.io/docker/pulls/library/redis.svg?style=flat-square)||![](https://shields.beevelop.com/docker/image/layers/library/redis/alpine.svg?style=flat-square)|![](https://shields.beevelop.com/docker/image/image-size/library/redis/alpine.svg?style=flat-square)| 9 | |[phpmyadmin/phpmyadmin](https://hub.docker.com/r/phpmyadmin/phpmyadmin)|![Pulls Count](https://img.shields.io/docker/pulls/phpmyadmin/phpmyadmin.svg?style=flat-square)||![](https://shields.beevelop.com/docker/image/layers/phpmyadmin/phpmyadmin/latest.svg?style=flat-square)|![](https://shields.beevelop.com/docker/image/image-size/phpmyadmin/phpmyadmin/latest.svg?style=flat-square)| 10 | 11 | ## Requirements 12 | 13 | Install [Docker](https://get.docker.com/) and [Compose](https://docs.docker.com/compose/install/) 14 | 15 | ## Usage 16 | 17 | 1. Clone docker-lemp inside your project 18 | ```bash 19 | git clone https://github.com/metowolf/docker-lemp.git 20 | ``` 21 | 2. Enter the docker-lemp folder and rename .env.example to .env. 22 | ```bash 23 | cd docker-lemp 24 | cp .env.example .env 25 | cp docker-compose.example.yml docker-compose.yml 26 | ``` 27 | 3. Open your project’s .env file and set the following: 28 | ```ini 29 | MYSQL_ROOT_PASSWORD=your_password 30 | ``` 31 | 4. Run your containers: 32 | ```bash 33 | docker-compose up -d 34 | ``` 35 | 36 | ### Running `QUIC` 37 | 38 | The following configuration file can be used as a starting point to enable HTTP/3 support: 39 | ```nginx 40 | http { 41 | server { 42 | # Enable QUIC, HTTP/3 and HTTP/2 on both IPv4 and IPv6. 43 | listen 443 ssl http2; 44 | listen 443 quic; 45 | listen [::]:443 ssl http2; 46 | listen [::]:443 quic; 47 | 48 | ssl_certificate cert.crt; 49 | ssl_certificate_key cert.key; 50 | 51 | # Add HSTS header 52 | add_header Strict-Transport-Security "max-age=31536000; includeSubDomains; preload" always; 53 | 54 | # Add Alt-Svc header to negotiate HTTP/3. 55 | add_header alt-svc 'h3-23=":443"; ma=86400'; 56 | 57 | # Enable specific TLS versions (TLSv1 and TLSv1.1 are not longer saft, TLSv1.3 is required for QUIC). 58 | ssl_protocols TLSv1.2 TLSv1.3; 59 | ssl_ciphers TLS-CHACHA20-POLY1305-SHA256:TLS-AES-256-GCM-SHA384:TLS-AES-128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA256; 60 | ssl_prefer_server_ciphers on; 61 | ssl_early_data on; 62 | } 63 | } 64 | ``` 65 | 66 | ## Running `brotli` 67 | 68 | 1. Add the following lines into the configuration file of your sites to enable `brotli` feature: 69 | ```nginx 70 | brotli on; 71 | brotli_comp_level 6; 72 | brotli_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript application/javascript image/svg+xml; 73 | ``` 74 | 75 | ## Generally Upgrade 76 | 77 | 1. Modify project’s .env file. 78 | ```bash 79 | vim .env 80 | ``` 81 | 82 | 2. Rebuild containers: 83 | ```bash 84 | docker-compose up -d --no-deps --build 85 | ``` 86 | 87 | ## Upgrade to `Caddyless` version 88 | 89 | ### Before `git pull` 90 | 91 | 1. Rename conflicted file if exists: 92 | ```bash 93 | mv etc/nginx/nginx.conf etc/nginx/nginx.conf.bak 94 | ``` 95 | 96 | ### After `git pull` 97 | 98 | 1. Modify project’s .env file. 99 | ```bash 100 | vim .env 101 | ``` 102 | 103 | 2. Move Nginx/MySQL/SSL configuration to new directory: 104 | ```bash 105 | # move nginx configuration 106 | mv etc/nginx/config/* etc/nginx/conf.d/ 107 | 108 | # move MySQL configuration 109 | rm -fr etc/mysql && mkdir etc/mysql && mkdir etc/mysql/my.cnf.d 110 | mv etc/database/data etc/mysql && mv etc/database/config/* etc/mysql/my.cnf.d 111 | 112 | # move SSL configuration 113 | mv etc/ssl etc/nginx 114 | ``` 115 | 116 | 3. Rebuild containers and remove the `Caddy` container: 117 | ```bash 118 | docker-compose up -d --no-deps --build --remove-orphans 119 | ``` 120 | -------------------------------------------------------------------------------- /data/mysql/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /data/redis/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /docker-compose.example.yml: -------------------------------------------------------------------------------- 1 | version: '3.2' 2 | 3 | services: 4 | 5 | nginx: 6 | image: "${NGINX_VERSION}" 7 | ports: 8 | - 80:80 9 | - 443:443 10 | - 443:443/udp 11 | volumes: 12 | - ./log/nginx:/var/log/nginx 13 | - ./etc/nginx/nginx.conf:/etc/nginx/nginx.conf 14 | - ./etc/nginx/conf.d:/etc/nginx/conf.d 15 | - ./etc/nginx/ssl:/etc/nginx/ssl 16 | - ./wwwroot:/var/www 17 | environment: 18 | ENABLE_CRONTAB: "true" 19 | TZ: ${TZ} 20 | restart: on-failure 21 | 22 | 23 | php-fpm: 24 | image: "${PHP_VERSION}" 25 | volumes: 26 | - ./etc/php-fpm/php-fpm.ini:/usr/local/etc/php-fpm.ini 27 | - ./etc/php-fpm/crontabs:/etc/crontabs 28 | - ./wwwroot:/var/www 29 | environment: 30 | ENABLE_CRONTAB: "true" 31 | TZ: ${TZ} 32 | restart: on-failure 33 | 34 | 35 | mysql: 36 | image: "${MYSQL_VERSION}" 37 | command: --default-authentication-plugin=mysql_native_password 38 | volumes: 39 | - ./etc/mysql/my.cnf:/etc/my.cnf 40 | - ./etc/mysql/my.cnf.d:/etc/my.cnf.d 41 | - ./data/mysql/data:/var/lib/mysql 42 | environment: 43 | MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD} 44 | MYSQL_ROOT_HOST: "%" 45 | TZ: ${TZ} 46 | restart: on-failure 47 | 48 | 49 | phpmyadmin: 50 | image: "${PMA_VERSION}" 51 | ports: 52 | - 8080:80 53 | depends_on: 54 | - mysql 55 | environment: 56 | PMA_HOST: mysql 57 | TZ: ${TZ} 58 | restart: on-failure 59 | 60 | 61 | redis: 62 | image: "${REDIS_VERSION}" 63 | volumes: 64 | - ./data/redis/data:/data:rw 65 | environment: 66 | TZ: ${TZ} 67 | restart: on-failure 68 | -------------------------------------------------------------------------------- /etc/mysql/my.cnf: -------------------------------------------------------------------------------- 1 | # from docker mysql/mysql-server:8.0.18 2 | # 3 | # For advice on how to change settings please see 4 | # http://dev.mysql.com/doc/refman/8.0/en/server-configuration-defaults.html 5 | 6 | [mysqld] 7 | # 8 | # Remove leading # and set to the amount of RAM for the most important data 9 | # cache in MySQL. Start at 70% of total RAM for dedicated server, else 10%. 10 | # innodb_buffer_pool_size = 128M 11 | # 12 | # Remove leading # to turn on a very important data integrity option: logging 13 | # changes to the binary log between backups. 14 | # log_bin 15 | # 16 | # Remove leading # to set options mainly useful for reporting servers. 17 | # The server defaults are faster for transactions and fast SELECTs. 18 | # Adjust sizes as needed, experiment to find the optimal values. 19 | # join_buffer_size = 128M 20 | # sort_buffer_size = 2M 21 | # read_rnd_buffer_size = 2M 22 | 23 | # Remove leading # to revert to previous value for default_authentication_plugin, 24 | # this will increase compatibility with older clients. For background, see: 25 | # https://dev.mysql.com/doc/refman/8.0/en/server-system-variables.html#sysvar_default_authentication_plugin 26 | # default-authentication-plugin=mysql_native_password 27 | skip-host-cache 28 | skip-name-resolve 29 | datadir=/var/lib/mysql 30 | socket=/var/lib/mysql/mysql.sock 31 | secure-file-priv=/var/lib/mysql-files 32 | user=mysql 33 | 34 | pid-file=/var/run/mysqld/mysqld.pid 35 | -------------------------------------------------------------------------------- /etc/mysql/my.cnf.d/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/metowolf/docker-lemp/f13b72dd85b570fb4e99307632dd22e0d5689cd7/etc/mysql/my.cnf.d/.gitkeep -------------------------------------------------------------------------------- /etc/nginx/conf.d/default.conf: -------------------------------------------------------------------------------- 1 | server { 2 | listen 80; 3 | listen 443 ssl http2; 4 | listen 443 quic; 5 | 6 | server_name localhost; 7 | 8 | root /var/www/default; 9 | index index.php; 10 | 11 | ssl_certificate /etc/nginx/ssl/localhost.crt; 12 | ssl_certificate_key /etc/nginx/ssl/localhost.key; 13 | 14 | ssl_protocols TLSv1.2 TLSv1.3; 15 | ssl_ciphers TLS-CHACHA20-POLY1305-SHA256:TLS-AES-256-GCM-SHA384:TLS-AES-128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA256; 16 | ssl_prefer_server_ciphers on; 17 | ssl_early_data on; 18 | 19 | location / { 20 | try_files $uri $uri/ /index.php?$query_string; 21 | } 22 | 23 | location ~ \.php$ { 24 | fastcgi_split_path_info ^(.+\.php)(/.+)$; 25 | fastcgi_pass php-fpm:9000; 26 | fastcgi_index index.php; 27 | include fastcgi_params; 28 | fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; 29 | fastcgi_param PATH_INFO $fastcgi_path_info; 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /etc/nginx/nginx.conf: -------------------------------------------------------------------------------- 1 | # from docker metowolf/nginx:1.17.5 2 | 3 | user nginx; 4 | worker_processes auto; 5 | 6 | error_log /var/log/nginx/error.log warn; 7 | pid /var/run/nginx.pid; 8 | 9 | 10 | events { 11 | worker_connections 1024; 12 | } 13 | 14 | 15 | http { 16 | include /etc/nginx/mime.types; 17 | default_type application/octet-stream; 18 | 19 | log_format main '$remote_addr - $remote_user [$time_local] "$request" ' 20 | '$status $body_bytes_sent "$http_referer" ' 21 | '"$http_user_agent" "$http_x_forwarded_for"'; 22 | 23 | access_log /var/log/nginx/access.log main; 24 | 25 | sendfile on; 26 | #tcp_nopush on; 27 | 28 | keepalive_timeout 65; 29 | 30 | #gzip on; 31 | 32 | include /etc/nginx/conf.d/*.conf; 33 | } 34 | -------------------------------------------------------------------------------- /etc/nginx/ssl/localhost.crt: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIIDpDCCAowCCQCUijlqpakSMjANBgkqhkiG9w0BAQsFADCBkjELMAkGA1UEBhMC 3 | Q04xEjAQBgNVBAgMCUd1YW5nZG9uZzERMA8GA1UEBwwIU2hlbnpoZW4xOjA4BgNV 4 | BAoMMVNoZW56aGVuIFRlbmNlbnQgQ29tcHV0ZXIgU3lzdGVtcyBDb21wYW55IExp 5 | bWl0ZWQxDDAKBgNVBAsMA1ImRDESMBAGA1UEAwwJMTI3LjAuMC4xMCAXDTE5MTEw 6 | NDEwMTIyNVoYDzIxMTkxMDExMTAxMjI1WjCBkjELMAkGA1UEBhMCQ04xEjAQBgNV 7 | BAgMCUd1YW5nZG9uZzERMA8GA1UEBwwIU2hlbnpoZW4xOjA4BgNVBAoMMVNoZW56 8 | aGVuIFRlbmNlbnQgQ29tcHV0ZXIgU3lzdGVtcyBDb21wYW55IExpbWl0ZWQxDDAK 9 | BgNVBAsMA1ImRDESMBAGA1UEAwwJMTI3LjAuMC4xMIIBIjANBgkqhkiG9w0BAQEF 10 | AAOCAQ8AMIIBCgKCAQEA2wvw5N5oRgCEWAGpsiKea10weoa9Gzu4XqpHTDygW0uZ 11 | sq1L0WKtWRfKys91hVJ3YYUfUCvhp57xJdrorEGzE9T1gSdmcOP4Hg9GswGYGerH 12 | ODIcZSJZCZGGX2OqjcveGLLTGVUbS30i5U79DUo9i6pn1aX8uTbGe4CNmaeWAFNq 13 | Ay+jzinYDHbMN1/A/CTbUUfs48D2d/oRcmnNI3wvQSU/5hCTK/U833adKmwIm4nh 14 | OSEKkodaQSWR3+PRpQzmmhHJVpuroKjXRTHM3uc2nBhzDdIMk46hjv7v6DWuTR/D 15 | /I3nT4KCGjHxG2d6WAo1NFNKlDz65qBfoGhEmf7bWQIDAQABMA0GCSqGSIb3DQEB 16 | CwUAA4IBAQBl2/jjbnQtUEdN8MfE6fqGCzVvWdMfHk/4oA+bKQfk4Vh/J2iMtXeV 17 | HlPvJiF7qZI9eipW5pyBTQpp1DuPXhIi9tGhoq30CnEZquX4/0mlQs1j2dU4lscD 18 | MzozE2g+qS0kR4CVLYazJl9zOO25KZFIG32ly36YI9sz4VebMBTkQoEUkl8WWTdX 19 | 0onwzo6SYaQtcqkj2trp9ywqWRFZbiHjRvm4KjU5stOJT5ZU4PzbdQQQpnv8PjXx 20 | MpOX/+H/JY3PCw0sBEf/wuoLhg2gmAS70Km3ySW5oMhkoVL4bo/AipipJR7XitvS 21 | kfCsLaHXmQ+yHwCf83uoZiZLeAGNkx5x 22 | -----END CERTIFICATE----- 23 | -------------------------------------------------------------------------------- /etc/nginx/ssl/localhost.key: -------------------------------------------------------------------------------- 1 | -----BEGIN PRIVATE KEY----- 2 | MIIEvwIBADANBgkqhkiG9w0BAQEFAASCBKkwggSlAgEAAoIBAQDbC/Dk3mhGAIRY 3 | AamyIp5rXTB6hr0bO7heqkdMPKBbS5myrUvRYq1ZF8rKz3WFUndhhR9QK+GnnvEl 4 | 2uisQbMT1PWBJ2Zw4/geD0azAZgZ6sc4MhxlIlkJkYZfY6qNy94YstMZVRtLfSLl 5 | Tv0NSj2LqmfVpfy5NsZ7gI2Zp5YAU2oDL6POKdgMdsw3X8D8JNtRR+zjwPZ3+hFy 6 | ac0jfC9BJT/mEJMr9Tzfdp0qbAibieE5IQqSh1pBJZHf49GlDOaaEclWm6ugqNdF 7 | Mcze5zacGHMN0gyTjqGO/u/oNa5NH8P8jedPgoIaMfEbZ3pYCjU0U0qUPPrmoF+g 8 | aESZ/ttZAgMBAAECggEBAKnDj2dRl67pJ6itYT9V5UGAb9oGIvnARxvXDHrhYcZf 9 | yTbZaDFXMNIjxl94ebRiPXOvIJ2Z5MFsRaj5B+q44Hk2Sy9VwecsR1fErx581c0A 10 | UHYVIDyhajAoQOQc8koC/pZVwZWYiBbxXOIrXaO3LgvYfbDve/ZvpVSCRTwYzgBh 11 | Nj/nDPQKgWbwLcI0zXSzQk/lLTTsAoUpu51gdPCoowCYRnBHIi12zKICuVDXvxsN 12 | QCjyOuym6sC9NOa2MyDxVvAxgyf9W4nWAETtmV/4d3+G6BS1ahRqMXbc7Yri+3BC 13 | NjusaVqIBFznEY8Zfvb3njjNoWDd+B9XMxxEjO95iAECgYEA9KOaT8uqnOn8TXAd 14 | /x7wIgjRinEA69Sl8Yvy8enR10j7+Ff59d5RuqEgl9SKgocZFKCng4mwgcc4QTV9 15 | Wuxu0EnxomC9vWCPduN9gbGypBrdwZum1rD6a7l4N6pJYm7PokQN/1WnhXv/CcJF 16 | pVx55luEhAuan/bpE5QjKWzU6WECgYEA5TgVAFPT6yuVSQSc7OtvjrppvP/UCzJT 17 | rVoV1OOhxu1rVKgbmhg/lP0jw4NbqEIaSzau+VngNAHkA0Tvqvtd+hSRmXciazXP 18 | Nwmc6nVAEQh5mKujqAaGJhp72d7sYqyHLYumJU9euNp2P3/yOOWD3OWR9cHvHzvt 19 | PBAuzWqpXPkCgYAe2C3Rl8U4KYxFGzi8/OKb9+6rfNn34gTWMqX7+FYbxbj3M+hx 20 | Jom5dS1N119rW6s+3Y6hWA/oHP0rw5m9iAfkvR35MidaJD2SaNZfLs9uP3DsQzrC 21 | 4OeCA41zv0WnYn9NXzVAl0Ua4GpkiZkMY19/OtS3bVsehhwW+tuAEpe5oQKBgQCC 22 | f0Y9lHv+1CY+lti8bWFqsahHSKKw6SsIc1QgiqPsu/gyDy7/sLRqHyAATEWfalrL 23 | 3UsKfOeO1FC6p8GG52reWF14MIIw5Uaef+OM+8nIqLmJeJZIr8Yp5UQDis2rc6vV 24 | +z5Q2XoE5aMSjcYaLFjBJxXNA2cesiBi5JewrPvVCQKBgQCoGZEMwFkhvaLAJzMV 25 | RhdzwZaC7X1TlG1WY0UcC1W16GLQgBfOmGpa7PvIX7DsztEWtBrxZ1j4evBrd+Fw 26 | f2zEPDEkTLos3gUUizMnzfY2og2pxTmVbvy1RLP9aqRyaNaCz7omKTCwrLL1LpuP 27 | vXL7jCwgfO65nucYH3wNBw7e/w== 28 | -----END PRIVATE KEY----- 29 | -------------------------------------------------------------------------------- /etc/php-fpm/crontabs/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /etc/php-fpm/php-fpm.ini: -------------------------------------------------------------------------------- 1 | ;;;;;;;;;;;;;;;;;;;;; 2 | ; FPM Configuration ; 3 | ;;;;;;;;;;;;;;;;;;;;; 4 | 5 | ; All relative paths in this configuration file are relative to PHP's install 6 | ; prefix (/usr/local). This prefix can be dynamically changed by using the 7 | ; '-p' argument from the command line. 8 | 9 | ;;;;;;;;;;;;;;;;;; 10 | ; Global Options ; 11 | ;;;;;;;;;;;;;;;;;; 12 | 13 | [global] 14 | ; Pid file 15 | ; Note: the default prefix is /usr/local/var 16 | ; Default Value: none 17 | ;pid = run/php-fpm.pid 18 | 19 | ; Error log file 20 | ; If it's set to "syslog", log is sent to syslogd instead of being written 21 | ; into a local file. 22 | ; Note: the default prefix is /usr/local/var 23 | ; Default Value: log/php-fpm.log 24 | ;error_log = log/php-fpm.log 25 | 26 | ; syslog_facility is used to specify what type of program is logging the 27 | ; message. This lets syslogd specify that messages from different facilities 28 | ; will be handled differently. 29 | ; See syslog(3) for possible values (ex daemon equiv LOG_DAEMON) 30 | ; Default Value: daemon 31 | ;syslog.facility = daemon 32 | 33 | ; syslog_ident is prepended to every message. If you have multiple FPM 34 | ; instances running on the same server, you can change the default value 35 | ; which must suit common needs. 36 | ; Default Value: php-fpm 37 | ;syslog.ident = php-fpm 38 | 39 | ; Log level 40 | ; Possible Values: alert, error, warning, notice, debug 41 | ; Default Value: notice 42 | ;log_level = notice 43 | 44 | ; Log limit on number of characters in the single line (log entry). If the 45 | ; line is over the limit, it is wrapped on multiple lines. The limit is for 46 | ; all logged characters including message prefix and suffix if present. However 47 | ; the new line character does not count into it as it is present only when 48 | ; logging to a file descriptor. It means the new line character is not present 49 | ; when logging to syslog. 50 | ; Default Value: 1024 51 | ;log_limit = 4096 52 | 53 | ; Log buffering specifies if the log line is buffered which means that the 54 | ; line is written in a single write operation. If the value is false, then the 55 | ; data is written directly into the file descriptor. It is an experimental 56 | ; option that can potentionaly improve logging performance and memory usage 57 | ; for some heavy logging scenarios. This option is ignored if logging to syslog 58 | ; as it has to be always buffered. 59 | ; Default value: yes 60 | ;log_buffering = no 61 | 62 | ; If this number of child processes exit with SIGSEGV or SIGBUS within the time 63 | ; interval set by emergency_restart_interval then FPM will restart. A value 64 | ; of '0' means 'Off'. 65 | ; Default Value: 0 66 | ;emergency_restart_threshold = 0 67 | 68 | ; Interval of time used by emergency_restart_interval to determine when 69 | ; a graceful restart will be initiated. This can be useful to work around 70 | ; accidental corruptions in an accelerator's shared memory. 71 | ; Available Units: s(econds), m(inutes), h(ours), or d(ays) 72 | ; Default Unit: seconds 73 | ; Default Value: 0 74 | ;emergency_restart_interval = 0 75 | 76 | ; Time limit for child processes to wait for a reaction on signals from master. 77 | ; Available units: s(econds), m(inutes), h(ours), or d(ays) 78 | ; Default Unit: seconds 79 | ; Default Value: 0 80 | ;process_control_timeout = 0 81 | 82 | ; The maximum number of processes FPM will fork. This has been designed to control 83 | ; the global number of processes when using dynamic PM within a lot of pools. 84 | ; Use it with caution. 85 | ; Note: A value of 0 indicates no limit 86 | ; Default Value: 0 87 | ; process.max = 128 88 | 89 | ; Specify the nice(2) priority to apply to the master process (only if set) 90 | ; The value can vary from -19 (highest priority) to 20 (lowest priority) 91 | ; Note: - It will only work if the FPM master process is launched as root 92 | ; - The pool process will inherit the master process priority 93 | ; unless specified otherwise 94 | ; Default Value: no set 95 | ; process.priority = -19 96 | 97 | ; Send FPM to background. Set to 'no' to keep FPM in foreground for debugging. 98 | ; Default Value: yes 99 | ;daemonize = yes 100 | 101 | ; Set open file descriptor rlimit for the master process. 102 | ; Default Value: system defined value 103 | ;rlimit_files = 1024 104 | 105 | ; Set max core size rlimit for the master process. 106 | ; Possible Values: 'unlimited' or an integer greater or equal to 0 107 | ; Default Value: system defined value 108 | ;rlimit_core = 0 109 | 110 | ; Specify the event mechanism FPM will use. The following is available: 111 | ; - select (any POSIX os) 112 | ; - poll (any POSIX os) 113 | ; - epoll (linux >= 2.5.44) 114 | ; - kqueue (FreeBSD >= 4.1, OpenBSD >= 2.9, NetBSD >= 2.0) 115 | ; - /dev/poll (Solaris >= 7) 116 | ; - port (Solaris >= 10) 117 | ; Default Value: not set (auto detection) 118 | ;events.mechanism = epoll 119 | 120 | ; When FPM is built with systemd integration, specify the interval, 121 | ; in seconds, between health report notification to systemd. 122 | ; Set to 0 to disable. 123 | ; Available Units: s(econds), m(inutes), h(ours) 124 | ; Default Unit: seconds 125 | ; Default value: 10 126 | ;systemd_interval = 10 127 | 128 | ;;;;;;;;;;;;;;;;;;;; 129 | ; Pool Definitions ; 130 | ;;;;;;;;;;;;;;;;;;;; 131 | 132 | ; Multiple pools of child processes may be started with different listening 133 | ; ports and different management options. The name of the pool will be 134 | ; used in logs and stats. There is no limitation on the number of pools which 135 | ; FPM can handle. Your system will tell you anyway :) 136 | 137 | ; Include one or more files. If glob(3) exists, it is used to include a bunch of 138 | ; files from a glob(3) pattern. This directive can be used everywhere in the 139 | ; file. 140 | ; Relative path can also be used. They will be prefixed by: 141 | ; - the global prefix if it's been set (-p argument) 142 | ; - /usr/local otherwise 143 | include=etc/php-fpm.d/*.conf 144 | -------------------------------------------------------------------------------- /wwwroot/default/index.php: -------------------------------------------------------------------------------- 1 |