├── .github └── ISSUE_TEMPLATE.md ├── 99_change_wallabag_config_salt.sh ├── Dockerfile ├── README.md ├── data └── poche.sqlite ├── nginx-wallabag ├── nginx.sh ├── php5-fpm.sh ├── scripts └── wallabag-docker ├── vendor.zip └── www.conf /.github/ISSUE_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | Before filing a new ticket, remember this repository is deprecated! 2 | 3 | New wallabag docker images are automatically generated from the official repository and published to https://hub.docker.com/r/wallabag/wallabag/builds/ 4 | -------------------------------------------------------------------------------- /99_change_wallabag_config_salt.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -e 3 | SALT='34gAogagAigJaurgbqfdvqQergvqer' 4 | if [ -f /etc/container_environment/WALLABAG_SALT ] ; then 5 | SALT=`cat /etc/container_environment/WALLABAG_SALT` 6 | fi 7 | sed -i "s/'SALT', '.*'/'SALT', '$SALT'/" /var/www/wallabag/inc/poche/config.inc.php 8 | -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | # Use phusion/baseimage as base image. To make your builds reproducible, make 2 | # sure you lock down to a specific version, not to `latest`! 3 | # See https://github.com/phusion/baseimage-docker/blob/master/Changelog.md for 4 | # a list of version numbers. 5 | FROM phusion/baseimage:0.9.18 6 | MAINTAINER Bob Maerten 7 | 8 | # Set correct environment variables. 9 | ENV HOME /root 10 | 11 | # Use baseimage-docker's init system. 12 | CMD ["/sbin/my_init"] 13 | 14 | # Install locales 15 | ENV DEBIAN_FRONTEND noninteractive 16 | RUN locale-gen cs_CZ.UTF-8 17 | RUN locale-gen de_DE.UTF-8 18 | RUN locale-gen es_ES.UTF-8 19 | RUN locale-gen fr_FR.UTF-8 20 | RUN locale-gen it_IT.UTF-8 21 | RUN locale-gen pl_PL.UTF-8 22 | RUN locale-gen pt_BR.UTF-8 23 | RUN locale-gen ru_RU.UTF-8 24 | RUN locale-gen sl_SI.UTF-8 25 | RUN locale-gen uk_UA.UTF-8 26 | 27 | # Install wallabag prereqs 28 | RUN add-apt-repository ppa:nginx/stable \ 29 | && apt-get update \ 30 | && apt-get install -y nginx php5-cli php5-common php5-sqlite \ 31 | php5-curl php5-fpm php5-json php5-tidy php5-gd wget unzip gettext 32 | 33 | # Configure php-fpm 34 | RUN echo "cgi.fix_pathinfo = 0" >> /etc/php5/fpm/php.ini 35 | RUN echo "daemon off;" >> /etc/nginx/nginx.conf 36 | 37 | COPY www.conf /etc/php5/fpm/pool.d/www.conf 38 | 39 | RUN mkdir /etc/service/php5-fpm 40 | COPY php5-fpm.sh /etc/service/php5-fpm/run 41 | 42 | RUN mkdir /etc/service/nginx 43 | COPY nginx.sh /etc/service/nginx/run 44 | 45 | # Wallabag version 46 | ENV WALLABAG_VERSION 1.9.1-b 47 | 48 | # Extract wallabag code 49 | ADD https://github.com/wallabag/wallabag/archive/$WALLABAG_VERSION.zip /tmp/wallabag-$WALLABAG_VERSION.zip 50 | ADD http://wllbg.org/vendor /tmp/vendor.zip 51 | 52 | RUN mkdir -p /var/www 53 | RUN cd /var/www \ 54 | && unzip -q /tmp/wallabag-$WALLABAG_VERSION.zip \ 55 | && mv wallabag-$WALLABAG_VERSION wallabag \ 56 | && cd wallabag \ 57 | && unzip -q /tmp/vendor.zip \ 58 | && cp inc/poche/config.inc.default.php inc/poche/config.inc.php \ 59 | && rm -f /tmp/wallabag-$WALLABAG_VERSION.zip /tmp/vendor.zip \ 60 | && rm -rf /var/www/wallabag/install 61 | 62 | COPY 99_change_wallabag_config_salt.sh /etc/my_init.d/99_change_wallabag_config_salt.sh 63 | 64 | COPY data/poche.sqlite /var/www/wallabag/db/ 65 | RUN chown -R www-data:www-data /var/www/wallabag \ 66 | && chmod 775 -R /var/www/wallabag \ 67 | && chmod 777 -R /var/www/wallabag/db 68 | 69 | # Configure nginx to serve wallabag app 70 | COPY nginx-wallabag /etc/nginx/sites-available/default 71 | 72 | EXPOSE 80 73 | 74 | # Clean up APT when done. 75 | RUN apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* 76 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # docker-wallabag 2 | 3 | Dockerfile used to build a wallabag 1.x Docker image. 4 | 5 | ## DEPRACATION WARNING 6 | 7 | The docker image is for the last 1.x version of wallabag. For newer version please report to [the official docker wallabag repo](https://github.com/wallabag/docker). 8 | 9 | ## Usage from index.docker.io 10 | 11 | ID=$(sudo docker run -p 8080:80 -d bobmaerten/docker-wallabag:latest /sbin/my_init) 12 | 13 | Then head your browser to http://localhost:8080 and enjoy a fresh wallabag install. When you're finished, just stop the docker container: 14 | 15 | sudo docker stop $ID 16 | 17 | Check the [phusion/baseimage](https://github.com/phusion/baseimage-docker) documentation for all kind of options and switches. 18 | 19 | ## Persistance of the database 20 | 21 | The [wallabag-docker](scripts/wallabag-docker) script enable persistance of the database outside of the container. 22 | Modify the DBPATH variable at will, but keep an absolute path in order to things to work properly. 23 | 24 | ./scripts/wallabag-docker 25 | Usage: wallabag-docker {start|stop|status} 26 | 27 | The default login credentials associated with the database are: `wallabag`/`wallabag` 28 | 29 | ## Using ENV variable to pass SALT value in config file 30 | 31 | You can specify a `--env WALLABAG_SALT=` in the docker run command in order to fix the salt value in the wallabag config file on container startup. 32 | Example: 33 | 34 | sudo docker run -p 8080:80 -d --env WALLABAG_SALT=34gAogagAigJaurgbqfdvqQergvqer bobmaerten/docker-wallabag:latest /sbin/my_init 35 | 36 | ### SSH into the container 37 | 38 | Please refer to the [Phusion documentation](https://github.com/phusion/baseimage-docker#login) to fetch the insecure-key used by default on the container started by the script. 39 | 40 | ## Testing wallabag dev version 41 | 42 | The same script enable to "mount" a specific source directory instead of the one from the container. 43 | Just uncomment le SOURCEPATH line, and set it to the absolut path of the wallabag source directory you want to use. 44 | 45 | ## building from Dockerfile 46 | 47 | sudo docker build -t docker-wallabag . 48 | 49 | # Credits 50 | 51 | wallabag is an opensource project created by @nicosomb 52 | 53 | This docker image is build upon the baseimage made by phusion. 54 | -------------------------------------------------------------------------------- /data/poche.sqlite: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bobmaerten/docker-wallabag/7c369f7a82254b1cb2dd1c45973f5a27c66b3fb5/data/poche.sqlite -------------------------------------------------------------------------------- /nginx-wallabag: -------------------------------------------------------------------------------- 1 | server { 2 | listen 80 default_server; 3 | listen [::]:80 default_server ipv6only=on; 4 | 5 | root /var/www/wallabag; 6 | index index.html index.php; 7 | 8 | # Make site accessible from http://localhost/ 9 | server_name localhost; 10 | 11 | location / { 12 | try_files $uri $uri/ /index.php; 13 | } 14 | 15 | location ~ \.php$ { 16 | fastcgi_split_path_info ^(.+\.php)(/.+)$; 17 | # NOTE: You should have "cgi.fix_pathinfo = 0;" in php.ini 18 | 19 | fastcgi_pass unix:/var/run/php5-fpm.sock; 20 | fastcgi_read_timeout 30m; 21 | fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; 22 | fastcgi_index index.php; 23 | include fastcgi_params; 24 | } 25 | 26 | } 27 | -------------------------------------------------------------------------------- /nginx.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | exec nginx 5 | -------------------------------------------------------------------------------- /php5-fpm.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | /usr/sbin/php5-fpm -F 5 | -------------------------------------------------------------------------------- /scripts/wallabag-docker: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | DBPATH="$(dirname `readlink -m $0`)/../data" # Or replace by absolute path to persistence DB directory 4 | 5 | # Uncomment and specify to use your own wallabag codebase 6 | # SOURCEPATH='/home/bob/Work/wallabag' # Absolute path to wallabag sources 7 | 8 | # Uncomment and specify to use your own wallabag SALT value in config file 9 | SALT='34gAogagAigJaurgbqfdvqQergvqer' # No space in this string please 10 | 11 | IMAGENAME='bobmaerten/docker-wallabag:latest' 12 | 13 | WALLABAGSOURCE='wallabag-source' 14 | WALLABAGDB='wallabag-db' 15 | WALLABAG='wallabag-server' 16 | 17 | function setup() { 18 | mkdir -p $DBPATH 19 | echo "#Exporting db from the container to host, in $DBPATH" 20 | ID=$(sudo docker run -d $IMAGENAME /sbin/my_init --skip-startup-files --quiet) 21 | sudo docker cp $ID:/var/www/wallabag/db/poche.sqlite $DBPATH 22 | sudo chown -R $USER:$USER $DBPATH 23 | sudo chmod -R 777 $DBPATH 24 | ID=$(sudo docker stop $ID) 25 | ID=$(sudo docker rm $ID) 26 | } 27 | 28 | function getStatus(){ 29 | CONTAINER_ID=$(sudo docker ps -a | grep -v Exit | grep $WALLABAG | awk '{print $1}') 30 | if [ -z $CONTAINER_ID ] ; then 31 | echo 'Not running.' 32 | return 1 33 | else 34 | URL=$(sudo docker port $CONTAINER_ID 80) 35 | IP=$(sudo docker inspect --format '{{ .NetworkSettings.IPAddress }}' $CONTAINER_ID) 36 | echo "Running in container: $CONTAINER_ID" 37 | echo "IP address: $IP" 38 | echo "Web server on http://$URL" 39 | return 0 40 | fi 41 | } 42 | 43 | case "$1" in 44 | start) 45 | if [ ! -f $DBPATH/poche.sqlite ] ; then 46 | setup 47 | fi 48 | 49 | VOLUMES='' 50 | sudo docker ps -a | grep -q $WALLABAGDB 51 | if [ $? -ne 0 ]; then 52 | sudo docker run --name $WALLABAGDB -v $DBPATH:/var/www/wallabag/db ubuntu true 53 | VOLUMES="--volumes-from $WALLABAGDB" 54 | fi 55 | 56 | if [ -n "$SOURCEPATH" ]; then 57 | sudo docker ps -a | grep -q $WALLABAGSOURCE 58 | if [ $? -ne 0 ]; then 59 | sudo docker run --name $WALLABAGSOURCE -v $SOURCEPATH:/var/www/wallabag ubuntu true 60 | VOLUMES="--volumes-from $WALLABAGSOURCE $VOLUMES" 61 | fi 62 | fi 63 | 64 | if [ -n "$SALT" ]; then 65 | WALLABAG_ENV="--env WALLABAG_SALT=$SALT" 66 | fi 67 | sudo docker ps -a | grep -v Exit | grep -q $WALLABAG 68 | if [ $? -ne 0 ]; then 69 | CONTAINER_ID=$(sudo docker run $WALLABAG_ENV -d --name $WALLABAG $VOLUMES -p=8080:80 $IMAGENAME /sbin/my_init --enable-insecure-key) 70 | fi 71 | getStatus 72 | ;; 73 | 74 | status) 75 | getStatus 76 | ;; 77 | 78 | stop) 79 | CONTAINER_ID=$(sudo docker ps -a | grep -v Exit | grep $WALLABAG | awk '{print $1}') 80 | if [[ -n $CONTAINER_ID ]] ; then 81 | SV=$(sudo docker stop $CONTAINER_ID) 82 | SV=$(sudo docker rm $CONTAINER_ID) 83 | if [ $? -eq 0 ] ; then 84 | echo 'Stopped.' 85 | DB=$(sudo docker ps -a | grep $WALLABAGDB | awk '{print $1}') 86 | DB=$(sudo docker rm $DB) 87 | if [ -n "$SOURCEPATH" ]; then 88 | SRC=$(sudo docker ps -a | grep $WALLABAGSOURCE | awk '{print $1}') 89 | SRC=$(sudo docker rm $SRC) 90 | fi 91 | fi 92 | else 93 | echo 'Not running.' 94 | exit 1 95 | fi 96 | ;; 97 | 98 | *) 99 | echo "Usage: `basename $0` {start|stop|status}" 100 | exit 1 101 | ;; 102 | esac 103 | 104 | exit 0 105 | -------------------------------------------------------------------------------- /vendor.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bobmaerten/docker-wallabag/7c369f7a82254b1cb2dd1c45973f5a27c66b3fb5/vendor.zip -------------------------------------------------------------------------------- /www.conf: -------------------------------------------------------------------------------- 1 | ; Start a new pool named 'www'. 2 | ; the variable $pool can we used in any directive and will be replaced by the 3 | ; pool name ('www' here) 4 | [www] 5 | 6 | ; Per pool prefix 7 | ; It only applies on the following directives: 8 | ; - 'slowlog' 9 | ; - 'listen' (unixsocket) 10 | ; - 'chroot' 11 | ; - 'chdir' 12 | ; - 'php_values' 13 | ; - 'php_admin_values' 14 | ; When not set, the global prefix (or /usr) applies instead. 15 | ; Note: This directive can also be relative to the global prefix. 16 | ; Default Value: none 17 | ;prefix = /path/to/pools/$pool 18 | 19 | ; Unix user/group of processes 20 | ; Note: The user is mandatory. If the group is not set, the default user's group 21 | ; will be used. 22 | user = www-data 23 | group = www-data 24 | 25 | ; The address on which to accept FastCGI requests. 26 | ; Valid syntaxes are: 27 | ; 'ip.add.re.ss:port' - to listen on a TCP socket to a specific address on 28 | ; a specific port; 29 | ; 'port' - to listen on a TCP socket to all addresses on a 30 | ; specific port; 31 | ; '/path/to/unix/socket' - to listen on a unix socket. 32 | ; Note: This value is mandatory. 33 | listen = /var/run/php5-fpm.sock 34 | 35 | ; Set listen(2) backlog. A value of '-1' means unlimited. 36 | ; Default Value: 128 (-1 on FreeBSD and OpenBSD) 37 | ;listen.backlog = -1 38 | 39 | ; Set permissions for unix socket, if one is used. In Linux, read/write 40 | ; permissions must be set in order to allow connections from a web server. Many 41 | ; BSD-derived systems allow connections regardless of permissions. 42 | ; Default Values: user and group are set as the running user 43 | ; mode is set to 0666 44 | listen.owner = www-data 45 | listen.group = www-data 46 | listen.mode = 0666 47 | 48 | ; List of ipv4 addresses of FastCGI clients which are allowed to connect. 49 | ; Equivalent to the FCGI_WEB_SERVER_ADDRS environment variable in the original 50 | ; PHP FCGI (5.2.2+). Makes sense only with a tcp listening socket. Each address 51 | ; must be separated by a comma. If this value is left blank, connections will be 52 | ; accepted from any ip address. 53 | ; Default Value: any 54 | ;listen.allowed_clients = 127.0.0.1 55 | 56 | ; Choose how the process manager will control the number of child processes. 57 | ; Possible Values: 58 | ; static - a fixed number (pm.max_children) of child processes; 59 | ; dynamic - the number of child processes are set dynamically based on the 60 | ; following directives. With this process management, there will be 61 | ; always at least 1 children. 62 | ; pm.max_children - the maximum number of children that can 63 | ; be alive at the same time. 64 | ; pm.start_servers - the number of children created on startup. 65 | ; pm.min_spare_servers - the minimum number of children in 'idle' 66 | ; state (waiting to process). If the number 67 | ; of 'idle' processes is less than this 68 | ; number then some children will be created. 69 | ; pm.max_spare_servers - the maximum number of children in 'idle' 70 | ; state (waiting to process). If the number 71 | ; of 'idle' processes is greater than this 72 | ; number then some children will be killed. 73 | ; ondemand - no children are created at startup. Children will be forked when 74 | ; new requests will connect. The following parameter are used: 75 | ; pm.max_children - the maximum number of children that 76 | ; can be alive at the same time. 77 | ; pm.process_idle_timeout - The number of seconds after which 78 | ; an idle process will be killed. 79 | ; Note: This value is mandatory. 80 | pm = dynamic 81 | 82 | ; The number of child processes to be created when pm is set to 'static' and the 83 | ; maximum number of child processes when pm is set to 'dynamic' or 'ondemand'. 84 | ; This value sets the limit on the number of simultaneous requests that will be 85 | ; served. Equivalent to the ApacheMaxClients directive with mpm_prefork. 86 | ; Equivalent to the PHP_FCGI_CHILDREN environment variable in the original PHP 87 | ; CGI. The below defaults are based on a server without much resources. Don't 88 | ; forget to tweak pm.* to fit your needs. 89 | ; Note: Used when pm is set to 'static', 'dynamic' or 'ondemand' 90 | ; Note: This value is mandatory. 91 | pm.max_children = 10 92 | 93 | ; The number of child processes created on startup. 94 | ; Note: Used only when pm is set to 'dynamic' 95 | ; Default Value: min_spare_servers + (max_spare_servers - min_spare_servers) / 2 96 | pm.start_servers = 4 97 | 98 | ; The desired minimum number of idle server processes. 99 | ; Note: Used only when pm is set to 'dynamic' 100 | ; Note: Mandatory when pm is set to 'dynamic' 101 | pm.min_spare_servers = 2 102 | 103 | ; The desired maximum number of idle server processes. 104 | ; Note: Used only when pm is set to 'dynamic' 105 | ; Note: Mandatory when pm is set to 'dynamic' 106 | pm.max_spare_servers = 6 107 | 108 | ; The number of seconds after which an idle process will be killed. 109 | ; Note: Used only when pm is set to 'ondemand' 110 | ; Default Value: 10s 111 | ;pm.process_idle_timeout = 10s; 112 | 113 | ; The number of requests each child process should execute before respawning. 114 | ; This can be useful to work around memory leaks in 3rd party libraries. For 115 | ; endless request processing specify '0'. Equivalent to PHP_FCGI_MAX_REQUESTS. 116 | ; Default Value: 0 117 | ;pm.max_requests = 500 118 | 119 | ; The URI to view the FPM status page. If this value is not set, no URI will be 120 | ; recognized as a status page. It shows the following informations: 121 | ; pool - the name of the pool; 122 | ; process manager - static, dynamic or ondemand; 123 | ; start time - the date and time FPM has started; 124 | ; start since - number of seconds since FPM has started; 125 | ; accepted conn - the number of request accepted by the pool; 126 | ; listen queue - the number of request in the queue of pending 127 | ; connections (see backlog in listen(2)); 128 | ; max listen queue - the maximum number of requests in the queue 129 | ; of pending connections since FPM has started; 130 | ; listen queue len - the size of the socket queue of pending connections; 131 | ; idle processes - the number of idle processes; 132 | ; active processes - the number of active processes; 133 | ; total processes - the number of idle + active processes; 134 | ; max active processes - the maximum number of active processes since FPM 135 | ; has started; 136 | ; max children reached - number of times, the process limit has been reached, 137 | ; when pm tries to start more children (works only for 138 | ; pm 'dynamic' and 'ondemand'); 139 | ; Value are updated in real time. 140 | ; Example output: 141 | ; pool: www 142 | ; process manager: static 143 | ; start time: 01/Jul/2011:17:53:49 +0200 144 | ; start since: 62636 145 | ; accepted conn: 190460 146 | ; listen queue: 0 147 | ; max listen queue: 1 148 | ; listen queue len: 42 149 | ; idle processes: 4 150 | ; active processes: 11 151 | ; total processes: 15 152 | ; max active processes: 12 153 | ; max children reached: 0 154 | ; 155 | ; By default the status page output is formatted as text/plain. Passing either 156 | ; 'html', 'xml' or 'json' in the query string will return the corresponding 157 | ; output syntax. Example: 158 | ; http://www.foo.bar/status 159 | ; http://www.foo.bar/status?json 160 | ; http://www.foo.bar/status?html 161 | ; http://www.foo.bar/status?xml 162 | ; 163 | ; By default the status page only outputs short status. Passing 'full' in the 164 | ; query string will also return status for each pool process. 165 | ; Example: 166 | ; http://www.foo.bar/status?full 167 | ; http://www.foo.bar/status?json&full 168 | ; http://www.foo.bar/status?html&full 169 | ; http://www.foo.bar/status?xml&full 170 | ; The Full status returns for each process: 171 | ; pid - the PID of the process; 172 | ; state - the state of the process (Idle, Running, ...); 173 | ; start time - the date and time the process has started; 174 | ; start since - the number of seconds since the process has started; 175 | ; requests - the number of requests the process has served; 176 | ; request duration - the duration in µs of the requests; 177 | ; request method - the request method (GET, POST, ...); 178 | ; request URI - the request URI with the query string; 179 | ; content length - the content length of the request (only with POST); 180 | ; user - the user (PHP_AUTH_USER) (or '-' if not set); 181 | ; script - the main script called (or '-' if not set); 182 | ; last request cpu - the %cpu the last request consumed 183 | ; it's always 0 if the process is not in Idle state 184 | ; because CPU calculation is done when the request 185 | ; processing has terminated; 186 | ; last request memory - the max amount of memory the last request consumed 187 | ; it's always 0 if the process is not in Idle state 188 | ; because memory calculation is done when the request 189 | ; processing has terminated; 190 | ; If the process is in Idle state, then informations are related to the 191 | ; last request the process has served. Otherwise informations are related to 192 | ; the current request being served. 193 | ; Example output: 194 | ; ************************ 195 | ; pid: 31330 196 | ; state: Running 197 | ; start time: 01/Jul/2011:17:53:49 +0200 198 | ; start since: 63087 199 | ; requests: 12808 200 | ; request duration: 1250261 201 | ; request method: GET 202 | ; request URI: /test_mem.php?N=10000 203 | ; content length: 0 204 | ; user: - 205 | ; script: /home/fat/web/docs/php/test_mem.php 206 | ; last request cpu: 0.00 207 | ; last request memory: 0 208 | ; 209 | ; Note: There is a real-time FPM status monitoring sample web page available 210 | ; It's available in: ${prefix}/share/fpm/status.html 211 | ; 212 | ; Note: The value must start with a leading slash (/). The value can be 213 | ; anything, but it may not be a good idea to use the .php extension or it 214 | ; may conflict with a real PHP file. 215 | ; Default Value: not set 216 | ;pm.status_path = /status 217 | 218 | ; The ping URI to call the monitoring page of FPM. If this value is not set, no 219 | ; URI will be recognized as a ping page. This could be used to test from outside 220 | ; that FPM is alive and responding, or to 221 | ; - create a graph of FPM availability (rrd or such); 222 | ; - remove a server from a group if it is not responding (load balancing); 223 | ; - trigger alerts for the operating team (24/7). 224 | ; Note: The value must start with a leading slash (/). The value can be 225 | ; anything, but it may not be a good idea to use the .php extension or it 226 | ; may conflict with a real PHP file. 227 | ; Default Value: not set 228 | ;ping.path = /ping 229 | 230 | ; This directive may be used to customize the response of a ping request. The 231 | ; response is formatted as text/plain with a 200 response code. 232 | ; Default Value: pong 233 | ;ping.response = pong 234 | 235 | ; The access log file 236 | ; Default: not set 237 | ;access.log = log/$pool.access.log 238 | 239 | ; The access log format. 240 | ; The following syntax is allowed 241 | ; %%: the '%' character 242 | ; %C: %CPU used by the request 243 | ; it can accept the following format: 244 | ; - %{user}C for user CPU only 245 | ; - %{system}C for system CPU only 246 | ; - %{total}C for user + system CPU (default) 247 | ; %d: time taken to serve the request 248 | ; it can accept the following format: 249 | ; - %{seconds}d (default) 250 | ; - %{miliseconds}d 251 | ; - %{mili}d 252 | ; - %{microseconds}d 253 | ; - %{micro}d 254 | ; %e: an environment variable (same as $_ENV or $_SERVER) 255 | ; it must be associated with embraces to specify the name of the env 256 | ; variable. Some exemples: 257 | ; - server specifics like: %{REQUEST_METHOD}e or %{SERVER_PROTOCOL}e 258 | ; - HTTP headers like: %{HTTP_HOST}e or %{HTTP_USER_AGENT}e 259 | ; %f: script filename 260 | ; %l: content-length of the request (for POST request only) 261 | ; %m: request method 262 | ; %M: peak of memory allocated by PHP 263 | ; it can accept the following format: 264 | ; - %{bytes}M (default) 265 | ; - %{kilobytes}M 266 | ; - %{kilo}M 267 | ; - %{megabytes}M 268 | ; - %{mega}M 269 | ; %n: pool name 270 | ; %o: ouput header 271 | ; it must be associated with embraces to specify the name of the header: 272 | ; - %{Content-Type}o 273 | ; - %{X-Powered-By}o 274 | ; - %{Transfert-Encoding}o 275 | ; - .... 276 | ; %p: PID of the child that serviced the request 277 | ; %P: PID of the parent of the child that serviced the request 278 | ; %q: the query string 279 | ; %Q: the '?' character if query string exists 280 | ; %r: the request URI (without the query string, see %q and %Q) 281 | ; %R: remote IP address 282 | ; %s: status (response code) 283 | ; %t: server time the request was received 284 | ; it can accept a strftime(3) format: 285 | ; %d/%b/%Y:%H:%M:%S %z (default) 286 | ; %T: time the log has been written (the request has finished) 287 | ; it can accept a strftime(3) format: 288 | ; %d/%b/%Y:%H:%M:%S %z (default) 289 | ; %u: remote user 290 | ; 291 | ; Default: "%R - %u %t \"%m %r\" %s" 292 | ;access.format = %R - %u %t "%m %r%Q%q" %s %f %{mili}d %{kilo}M %C%% 293 | 294 | ; The log file for slow requests 295 | ; Default Value: not set 296 | ; Note: slowlog is mandatory if request_slowlog_timeout is set 297 | ;slowlog = log/$pool.log.slow 298 | 299 | ; The timeout for serving a single request after which a PHP backtrace will be 300 | ; dumped to the 'slowlog' file. A value of '0s' means 'off'. 301 | ; Available units: s(econds)(default), m(inutes), h(ours), or d(ays) 302 | ; Default Value: 0 303 | ;request_slowlog_timeout = 0 304 | 305 | ; The timeout for serving a single request after which the worker process will 306 | ; be killed. This option should be used when the 'max_execution_time' ini option 307 | ; does not stop script execution for some reason. A value of '0' means 'off'. 308 | ; Available units: s(econds)(default), m(inutes), h(ours), or d(ays) 309 | ; Default Value: 0 310 | ;request_terminate_timeout = 0 311 | 312 | ; Set open file descriptor rlimit. 313 | ; Default Value: system defined value 314 | ;rlimit_files = 1024 315 | 316 | ; Set max core size rlimit. 317 | ; Possible Values: 'unlimited' or an integer greater or equal to 0 318 | ; Default Value: system defined value 319 | ;rlimit_core = 0 320 | 321 | ; Chroot to this directory at the start. This value must be defined as an 322 | ; absolute path. When this value is not set, chroot is not used. 323 | ; Note: you can prefix with '$prefix' to chroot to the pool prefix or one 324 | ; of its subdirectories. If the pool prefix is not set, the global prefix 325 | ; will be used instead. 326 | ; Note: chrooting is a great security feature and should be used whenever 327 | ; possible. However, all PHP paths will be relative to the chroot 328 | ; (error_log, sessions.save_path, ...). 329 | ; Default Value: not set 330 | ;chroot = 331 | 332 | ; Chdir to this directory at the start. 333 | ; Note: relative path can be used. 334 | ; Default Value: current directory or / when chroot 335 | chdir = / 336 | 337 | ; Redirect worker stdout and stderr into main error log. If not set, stdout and 338 | ; stderr will be redirected to /dev/null according to FastCGI specs. 339 | ; Note: on highloaded environement, this can cause some delay in the page 340 | ; process time (several ms). 341 | ; Default Value: no 342 | ;catch_workers_output = yes 343 | 344 | ; Limits the extensions of the main script FPM will allow to parse. This can 345 | ; prevent configuration mistakes on the web server side. You should only limit 346 | ; FPM to .php extensions to prevent malicious users to use other extensions to 347 | ; exectute php code. 348 | ; Note: set an empty value to allow all extensions. 349 | ; Default Value: .php 350 | ;security.limit_extensions = .php .php3 .php4 .php5 351 | 352 | ; Pass environment variables like LD_LIBRARY_PATH. All $VARIABLEs are taken from 353 | ; the current environment. 354 | ; Default Value: clean env 355 | ;env[HOSTNAME] = $HOSTNAME 356 | ;env[PATH] = /usr/local/bin:/usr/bin:/bin 357 | ;env[TMP] = /tmp 358 | ;env[TMPDIR] = /tmp 359 | ;env[TEMP] = /tmp 360 | 361 | ; Additional php.ini defines, specific to this pool of workers. These settings 362 | ; overwrite the values previously defined in the php.ini. The directives are the 363 | ; same as the PHP SAPI: 364 | ; php_value/php_flag - you can set classic ini defines which can 365 | ; be overwritten from PHP call 'ini_set'. 366 | ; php_admin_value/php_admin_flag - these directives won't be overwritten by 367 | ; PHP call 'ini_set' 368 | ; For php_*flag, valid values are on, off, 1, 0, true, false, yes or no. 369 | 370 | ; Defining 'extension' will load the corresponding shared extension from 371 | ; extension_dir. Defining 'disable_functions' or 'disable_classes' will not 372 | ; overwrite previously defined php.ini values, but will append the new value 373 | ; instead. 374 | 375 | ; Note: path INI options can be relative and will be expanded with the prefix 376 | ; (pool, global or /usr) 377 | 378 | ; Default Value: nothing is defined by default except the values in php.ini and 379 | ; specified at startup with the -d argument 380 | ;php_admin_value[sendmail_path] = /usr/sbin/sendmail -t -i -f www@my.domain.com 381 | ;php_flag[display_errors] = off 382 | ;php_admin_value[error_log] = /var/log/fpm-php.www.log 383 | ;php_admin_flag[log_errors] = on 384 | ;php_admin_value[memory_limit] = 32M 385 | --------------------------------------------------------------------------------