├── .gitignore ├── srcs ├── requirements │ ├── bonus │ │ ├── redis │ │ │ ├── Dockerfile │ │ │ └── tools │ │ │ │ └── configure.sh │ │ └── ftp-server │ │ │ ├── Dockerfile │ │ │ ├── tools │ │ │ └── configure.sh │ │ │ └── conf │ │ │ └── vsftpd.conf │ ├── mariadb │ │ ├── Dockerfile │ │ └── tools │ │ │ └── configure.sh │ ├── nginx │ │ ├── Dockerfile │ │ └── conf │ │ │ └── nginx.conf │ └── wordpress │ │ ├── Dockerfile │ │ ├── tools │ │ └── configure.sh │ │ └── conf │ │ ├── index.html │ │ ├── php-fpm.conf │ │ └── www.conf ├── .env └── docker-compose.yml ├── Makefile ├── LICENSE └── README.md /.gitignore: -------------------------------------------------------------------------------- 1 | .idea/ 2 | .DS_Store -------------------------------------------------------------------------------- /srcs/requirements/bonus/redis/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM alpine:3.13 2 | 3 | RUN apk update && apk upgrade && apk add --no-cache \ 4 | redis 5 | 6 | COPY tools/configure.sh /tmp/configure.sh 7 | ENTRYPOINT ["sh", "/tmp/configure.sh"] -------------------------------------------------------------------------------- /srcs/requirements/mariadb/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM alpine:3.13 2 | 3 | RUN apk update && apk upgrade && apk add --no-cache \ 4 | mariadb \ 5 | mariadb-client 6 | 7 | COPY tools/configure.sh /tmp/configure.sh 8 | 9 | ENTRYPOINT ["sh", "/tmp/configure.sh"] -------------------------------------------------------------------------------- /srcs/requirements/bonus/ftp-server/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM alpine:3.13 2 | 3 | RUN apk update && apk upgrade && apk add --no-cache \ 4 | vsftpd 5 | 6 | COPY conf/vsftpd.conf /tmp/vsftpd.conf 7 | 8 | COPY tools/configure.sh /tmp/configure.sh 9 | ENTRYPOINT ["sh", "/tmp/configure.sh"] -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | NAME = inception 2 | 3 | all: prune reload 4 | 5 | linux: 6 | @ echo "127.0.0.1 raccoman.42.fr" >> /etc/hosts 7 | 8 | stop: 9 | @ docker-compose -f srcs/docker-compose.yml down 10 | 11 | clean: stop 12 | @ rm -rf ~/Desktop/inception 13 | 14 | prune: clean 15 | @ docker system prune -f 16 | 17 | reload: 18 | @ docker-compose -f srcs/docker-compose.yml up --build 19 | 20 | .PHONY: linux stop clean prune reload all 21 | -------------------------------------------------------------------------------- /srcs/.env: -------------------------------------------------------------------------------- 1 | MYSQL_HOST=mariadb 2 | MYSQL_ROOT_PWD=nonsochemettere 3 | 4 | WP_DATABASE_NAME=wordpress 5 | WP_DATABASE_USR=fraccoman 6 | WP_DATABASE_PWD=sonoscemo 7 | 8 | REDIS_HOST=redis 9 | REDIS_PWD=sider 10 | 11 | FTP_USR=raccinz 12 | FTP_PWD=raccinz 13 | 14 | DOMAIN_NAME=localhost 15 | 16 | WP_TITLE=Insepcion 17 | WP_ADMIN_USR=raccinz 18 | WP_ADMIN_PWD=raccinz 19 | WP_ADMIN_EMAIL=raccinz@gmail.com 20 | WP_USR=fraccoman 21 | WP_PWD=fraccoman 22 | WP_EMAIL=fraccoman@gmail.com -------------------------------------------------------------------------------- /srcs/requirements/bonus/redis/tools/configure.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | if [ ! -f "/etc/redis.conf.bak" ]; then 4 | 5 | cp /etc/redis.conf /etc/redis.conf.bak 6 | 7 | sed -i "s|bind 127.0.0.1|#bind 127.0.0.1|g" /etc/redis.conf 8 | # sed -i "s|# requirepass foobared|requirepass $REDIS_PWD|g" /etc/redis.conf 9 | sed -i "s|# maxmemory |maxmemory 2mb|g" /etc/redis.conf 10 | sed -i "s|# maxmemory-policy noeviction|maxmemory-policy allkeys-lru|g" /etc/redis.conf 11 | 12 | fi 13 | 14 | redis-server --protected-mode no -------------------------------------------------------------------------------- /srcs/requirements/nginx/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM alpine:3.13 2 | 3 | RUN apk update && apk upgrade && apk add --no-cache \ 4 | nginx \ 5 | openssl 6 | 7 | # nginx SSL 8 | RUN mkdir /etc/nginx/ssl 9 | RUN openssl req -newkey rsa:4096 -x509 -sha256 -days 365 -nodes \ 10 | -out /etc/nginx/ssl/raccoman.pem \ 11 | -keyout /etc/nginx/ssl/raccoman.key \ 12 | -subj "/C=IT/ST=Rome/L=Rome/O=42 School/OU=raccoman/CN=raccoman/" 13 | 14 | # nginx config 15 | RUN mkdir -p /run/nginx 16 | COPY conf/nginx.conf /etc/nginx/conf.d/default.conf 17 | 18 | # Start nginx 19 | ENTRYPOINT ["nginx", "-g", "daemon off;"] -------------------------------------------------------------------------------- /srcs/requirements/bonus/ftp-server/tools/configure.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | if [ ! -f "/etc/vsftpd/vsftpd.conf.bak" ]; then 4 | 5 | mkdir -p /var/www/html 6 | 7 | cp /etc/vsftpd/vsftpd.conf /etc/vsftpd/vsftpd.conf.bak 8 | mv /tmp/vsftpd.conf /etc/vsftpd/vsftpd.conf 9 | 10 | # Add the FTP_USER, change his password and declare him as the owner of wordpress folder and all subfolders 11 | adduser $FTP_USR --disabled-password 12 | echo "$FTP_USR:$FTP_PWD" | /usr/sbin/chpasswd &> /dev/null 13 | chown -R $FTP_USR:$FTP_USR /var/www/html 14 | 15 | echo $FTP_USR | tee -a /etc/vsftpd.userlist &> /dev/null 16 | 17 | fi 18 | 19 | echo "FTP started on :21" 20 | /usr/sbin/vsftpd /etc/vsftpd/vsftpd.conf -------------------------------------------------------------------------------- /srcs/requirements/nginx/conf/nginx.conf: -------------------------------------------------------------------------------- 1 | server { 2 | 3 | listen 80; 4 | listen [::]:80; 5 | server_name inception; 6 | return 301 https://$host$request_uri; 7 | 8 | } 9 | 10 | server { 11 | 12 | listen 443 ssl; 13 | listen [::]:443 ssl; 14 | 15 | server_name inception; 16 | 17 | ssl_certificate /etc/nginx/ssl/raccoman.pem; 18 | ssl_certificate_key /etc/nginx/ssl/raccoman.key; 19 | ssl_protocols TLSv1.2 TLSv1.3; 20 | 21 | root /var/www/html; 22 | index index.php index.html index.htm; 23 | 24 | location / { 25 | autoindex on; 26 | try_files $uri $uri/ =404; 27 | } 28 | 29 | location ~ \.php$ { 30 | fastcgi_split_path_info ^(.+\.php)(/.+)$; 31 | fastcgi_pass wordpress:9000; 32 | fastcgi_index index.php; 33 | include fastcgi_params; 34 | fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; 35 | fastcgi_param PATH_INFO $fastcgi_path_info; 36 | } 37 | 38 | } 39 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2021 Riccardo Accomando 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 |

2 | 3 | 4 | 5 | 6 | 7 |

8 | 9 |

10 | 11 |

12 |

13 | INCEPTION 14 |

15 |

16 | This project aims to broaden your knowledge of system administration by using Docker 17 |

18 | 19 |

20 | Evaluation 21 |

22 |

23 | 24 |

25 | 26 |

27 | Contact 28 |

29 |

30 | This is my inception project from the 42 cursus, need help: raccoman@student.42roma.it 31 |

32 | 33 |

34 | 35 | 36 |

37 | -------------------------------------------------------------------------------- /srcs/requirements/mariadb/tools/configure.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | if [ ! -d "/run/mysqld" ]; then 4 | mkdir -p /run/mysqld 5 | chown -R mysql:mysql /run/mysqld 6 | fi 7 | 8 | if [ ! -d "/var/lib/mysql/mysql" ]; then 9 | 10 | chown -R mysql:mysql /var/lib/mysql 11 | 12 | # init database 13 | mysql_install_db --basedir=/usr --datadir=/var/lib/mysql --user=mysql --rpm > /dev/null 14 | 15 | tfile=`mktemp` 16 | if [ ! -f "$tfile" ]; then 17 | return 1 18 | fi 19 | 20 | # https://stackoverflow.com/questions/10299148/mysql-error-1045-28000-access-denied-for-user-billlocalhost-using-passw 21 | cat << EOF > $tfile 22 | USE mysql; 23 | FLUSH PRIVILEGES; 24 | 25 | DELETE FROM mysql.user WHERE User=''; 26 | DROP DATABASE test; 27 | DELETE FROM mysql.db WHERE Db='test'; 28 | DELETE FROM mysql.user WHERE User='root' AND Host NOT IN ('localhost', '127.0.0.1', '::1'); 29 | 30 | ALTER USER 'root'@'localhost' IDENTIFIED BY '$MYSQL_ROOT_PWD'; 31 | 32 | CREATE DATABASE $WP_DATABASE_NAME CHARACTER SET utf8 COLLATE utf8_general_ci; 33 | CREATE USER '$WP_DATABASE_USR'@'%' IDENTIFIED by '$WP_DATABASE_PWD'; 34 | GRANT ALL PRIVILEGES ON $WP_DATABASE_NAME.* TO '$WP_DATABASE_USR'@'%'; 35 | 36 | FLUSH PRIVILEGES; 37 | EOF 38 | # run init.sql 39 | /usr/bin/mysqld --user=mysql --bootstrap < $tfile 40 | rm -f $tfile 41 | fi 42 | 43 | # allow remote connections 44 | sed -i "s|skip-networking|# skip-networking|g" /etc/my.cnf.d/mariadb-server.cnf 45 | sed -i "s|.*bind-address\s*=.*|bind-address=0.0.0.0|g" /etc/my.cnf.d/mariadb-server.cnf 46 | 47 | exec /usr/bin/mysqld --user=mysql --console 48 | -------------------------------------------------------------------------------- /srcs/requirements/wordpress/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM alpine:3.13 2 | 3 | RUN apk update && apk upgrade && apk add --no-cache \ 4 | wget \ 5 | tar \ 6 | mariadb-client \ 7 | redis \ 8 | # Wordpress core depencencies 9 | php7 \ 10 | php7-fpm \ 11 | php7-bcmath \ 12 | php7-bz2 \ 13 | php7-calendar \ 14 | php7-ctype \ 15 | php7-curl \ 16 | php7-dom \ 17 | php7-exif \ 18 | php7-fileinfo \ 19 | php7-gd \ 20 | php7-gmagick \ 21 | php7-gmp \ 22 | php7-iconv \ 23 | php7-imap \ 24 | php7-intl \ 25 | php7-json \ 26 | php7-mbstring \ 27 | php7-mcrypt \ 28 | php7-memcache \ 29 | php7-mysqli \ 30 | php7-mysqlnd \ 31 | php7-openssl \ 32 | php7-pcntl \ 33 | php7-pdo \ 34 | php7-pdo_mysql \ 35 | php7-pdo_pgsql \ 36 | php7-pdo_sqlite \ 37 | php7-pgsql \ 38 | php7-phar \ 39 | php7-posix \ 40 | php7-session \ 41 | php7-shmop \ 42 | php7-simplexml \ 43 | php7-soap \ 44 | php7-sockets \ 45 | php7-sodium \ 46 | php7-sqlite3 \ 47 | php7-sysvsem \ 48 | php7-sysvshm \ 49 | php7-tokenizer \ 50 | php7-xml \ 51 | php7-xmlreader \ 52 | php7-xmlwriter \ 53 | php7-xsl \ 54 | php7-zip \ 55 | php7-zlib 56 | 57 | 58 | # php config 59 | RUN adduser -S nginx && addgroup -S nginx 60 | COPY conf/php-fpm.conf /etc/php7/php-fpm.conf 61 | COPY conf/www.conf /etc/php7/php-fpm.d/www.conf 62 | 63 | # static website 64 | COPY conf/index.html /tmp/index.html 65 | 66 | # install wordpress 67 | RUN wget https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar 68 | RUN chmod +x wp-cli.phar 69 | RUN cp wp-cli.phar /usr/bin/wp 70 | 71 | WORKDIR /var/www/html/wordpress 72 | 73 | COPY tools/configure.sh /tmp/configure.sh 74 | ENTRYPOINT [ "sh", "/tmp/configure.sh" ] -------------------------------------------------------------------------------- /srcs/requirements/wordpress/tools/configure.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # wait for mysql 4 | while ! mariadb -h$MYSQL_HOST -u$WP_DATABASE_USR -p$WP_DATABASE_PWD $WP_DATABASE_NAME &>/dev/null; do 5 | sleep 3 6 | done 7 | 8 | if [ ! -f "/var/www/html/index.html" ]; then 9 | 10 | # static website 11 | mv /tmp/index.html /var/www/html/index.html 12 | 13 | # adminer 14 | wget https://github.com/vrana/adminer/releases/download/v4.8.1/adminer-4.8.1-mysql-en.php -O /var/www/html/adminer.php &> /dev/null 15 | wget https://raw.githubusercontent.com/Niyko/Hydra-Dark-Theme-for-Adminer/master/adminer.css -O /var/www/html/adminer.css &> /dev/null 16 | 17 | wp core download --allow-root 18 | wp config create --dbname=$WP_DATABASE_NAME --dbuser=$WP_DATABASE_USR --dbpass=$WP_DATABASE_PWD --dbhost=$MYSQL_HOST --dbcharset="utf8" --dbcollate="utf8_general_ci" --allow-root 19 | wp core install --url=$DOMAIN_NAME/wordpress --title=$WP_TITLE --admin_user=$WP_ADMIN_USR --admin_password=$WP_ADMIN_PWD --admin_email=$WP_ADMIN_EMAIL --skip-email --allow-root 20 | wp user create $WP_USR $WP_EMAIL --role=author --user_pass=$WP_PWD --allow-root 21 | wp theme install inspiro --activate --allow-root 22 | 23 | # enable redis cache 24 | sed -i "40i define( 'WP_REDIS_HOST', '$REDIS_HOST' );" wp-config.php 25 | sed -i "41i define( 'WP_REDIS_PORT', 6379 );" wp-config.php 26 | #sed -i "42i define( 'WP_REDIS_PASSWORD', '$REDIS_PWD' );" wp-config.php 27 | sed -i "42i define( 'WP_REDIS_TIMEOUT', 1 );" wp-config.php 28 | sed -i "43i define( 'WP_REDIS_READ_TIMEOUT', 1 );" wp-config.php 29 | sed -i "44i define( 'WP_REDIS_DATABASE', 0 );\n" wp-config.php 30 | 31 | wp plugin install redis-cache --activate --allow-root 32 | wp plugin update --all --allow-root 33 | 34 | fi 35 | 36 | wp redis enable --allow-root 37 | 38 | echo "Wordpress started on :9000" 39 | /usr/sbin/php-fpm7 -F -R -------------------------------------------------------------------------------- /srcs/requirements/wordpress/conf/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Inception 5 | 6 | 7 | 8 | 9 | 10 |

11 | 12 | 13 | 14 | 15 | 16 |

17 | 18 |

19 | 20 |

21 |

22 | INCEPTION 23 |

24 |

25 | This project aims to broaden your knowledge of system administration by using Docker 26 |

27 | 28 |

29 | Evaluation 30 |

31 |

32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 |

46 | 47 |

48 | Contact 49 |

50 |

51 | This is my inception project from the 42 cursus, need help: raccoman@student.42roma.it 52 |

53 | 54 |

55 | 56 | 57 |

58 | 59 | 84 | -------------------------------------------------------------------------------- /srcs/docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: '3' 2 | services: 3 | 4 | nginx: 5 | build: requirements/nginx/ 6 | container_name: nginx 7 | ports: 8 | - "80:80" 9 | - "443:443" 10 | volumes: 11 | - "~/Desktop/inception/website:/var/www/html" 12 | depends_on: 13 | - wordpress 14 | networks: 15 | - frontend 16 | restart: always 17 | 18 | wordpress: 19 | build: requirements/wordpress/ 20 | container_name: wordpress 21 | ports: 22 | - "9000:9000" 23 | volumes: 24 | - "~/Desktop/inception/website:/var/www/html" 25 | depends_on: 26 | - mariadb 27 | - redis 28 | networks: 29 | - frontend 30 | - backend 31 | restart: always 32 | environment: 33 | MYSQL_HOST: ${MYSQL_HOST} 34 | WP_DATABASE_NAME: ${WP_DATABASE_NAME} 35 | WP_DATABASE_USR: ${WP_DATABASE_USR} 36 | WP_DATABASE_PWD: ${WP_DATABASE_PWD} 37 | DOMAIN_NAME: ${DOMAIN_NAME} 38 | WP_TITLE: ${WP_TITLE} 39 | WP_ADMIN_USR: ${WP_ADMIN_USR} 40 | WP_ADMIN_PWD: ${WP_ADMIN_PWD} 41 | WP_ADMIN_EMAIL: ${WP_ADMIN_EMAIL} 42 | WP_USR: ${WP_USR} 43 | WP_PWD: ${WP_PWD} 44 | WP_EMAIL: ${WP_EMAIL} 45 | REDIS_HOST: ${REDIS_HOST} 46 | REDIS_PWD: ${REDIS_PWD} 47 | 48 | mariadb: 49 | build: requirements/mariadb/ 50 | container_name: mariadb 51 | ports: 52 | - "3306:3306" 53 | volumes: 54 | - "~/Desktop/inception/mariadb:/var/lib/mysql" 55 | networks: 56 | - backend 57 | restart: always 58 | environment: 59 | MYSQL_ROOT_PWD: ${MYSQL_ROOT_PWD} 60 | WP_DATABASE_NAME: ${WP_DATABASE_NAME} 61 | WP_DATABASE_USR: ${WP_DATABASE_USR} 62 | WP_DATABASE_PWD: ${WP_DATABASE_PWD} 63 | 64 | redis: 65 | build: requirements/bonus/redis 66 | container_name: redis 67 | ports: 68 | - "6379:6379" 69 | networks: 70 | - backend 71 | restart: always 72 | environment: 73 | REDIS_PWD: ${REDIS_PWD} 74 | 75 | ftp-server: 76 | build: requirements/bonus/ftp-server 77 | container_name: ftp-server 78 | ports: 79 | - "21:21" 80 | - "21100-21110:21100-21110" 81 | volumes: 82 | - "~/Desktop/inception/website:/var/www/html/" 83 | networks: 84 | - backend 85 | restart: always 86 | environment: 87 | FTP_USR: ${FTP_USR} 88 | FTP_PWD: ${FTP_PWD} 89 | 90 | portainer: 91 | image: portainer/portainer-ce:latest 92 | container_name: portainer 93 | ports: 94 | - "8000:8000" 95 | - "9443:9443" 96 | volumes: 97 | - "/etc/localtime:/etc/localtime:ro" 98 | - "/var/run/docker.sock:/var/run/docker.sock:ro" 99 | security_opt: 100 | - no-new-privileges:true 101 | restart: always 102 | 103 | networks: 104 | frontend: 105 | backend: 106 | -------------------------------------------------------------------------------- /srcs/requirements/bonus/ftp-server/conf/vsftpd.conf: -------------------------------------------------------------------------------- 1 | # Example config file /etc/vsftpd.conf 2 | # 3 | # The default compiled in settings are fairly paranoid. This sample file 4 | # loosens things up a bit, to make the ftp daemon more usable. 5 | # Please see vsftpd.conf.5 for all compiled in defaults. 6 | # 7 | # READ THIS: This example file is NOT an exhaustive list of vsftpd options. 8 | # Please read the vsftpd.conf.5 manual page to get a full idea of vsftpd's 9 | # capabilities. 10 | # 11 | # Allow anonymous FTP? (Beware - allowed by default if you comment this out). 12 | anonymous_enable=NO 13 | # 14 | # Uncomment this to allow local users to log in. 15 | local_enable=YES 16 | # 17 | # Uncomment this to enable any form of FTP write command. 18 | write_enable=YES 19 | # 20 | # Default umask for local users is 077. You may wish to change this to 022, 21 | # if your users expect that (022 is used by most other ftpd's) 22 | #local_umask=022 23 | # 24 | # Uncomment this to allow the anonymous FTP user to upload files. This only 25 | # has an effect if the above global write enable is activated. Also, you will 26 | # obviously need to create a directory writable by the FTP user. 27 | #anon_upload_enable=YES 28 | # 29 | # Uncomment this if you want the anonymous FTP user to be able to create 30 | # new directories. 31 | #anon_mkdir_write_enable=YES 32 | # 33 | # Activate directory messages - messages given to remote users when they 34 | # go into a certain directory. 35 | dirmessage_enable=YES 36 | # 37 | # Activate logging of uploads/downloads. 38 | xferlog_enable=YES 39 | # 40 | # Make sure PORT transfer connections originate from port 20 (ftp-data). 41 | connect_from_port_20=YES 42 | # 43 | # If you want, you can arrange for uploaded anonymous files to be owned by 44 | # a different user. Note! Using "root" for uploaded files is not 45 | # recommended! 46 | #chown_uploads=YES 47 | #chown_username=whoever 48 | # 49 | # You may override where the log file goes if you like. The default is shown 50 | # below. 51 | #xferlog_file=/var/log/vsftpd.log 52 | # 53 | # If you want, you can have your log file in standard ftpd xferlog format. 54 | # Note that the default log file location is /var/log/xferlog in this case. 55 | #xferlog_std_format=YES 56 | # 57 | # You may change the default value for timing out an idle session. 58 | #idle_session_timeout=600 59 | # 60 | # You may change the default value for timing out a data connection. 61 | #data_connection_timeout=120 62 | # 63 | # It is recommended that you define on your system a unique user which the 64 | # ftp server can use as a totally isolated and unprivileged user. 65 | #nopriv_user=ftpsecure 66 | # 67 | # Enable this and the server will recognise asynchronous ABOR requests. Not 68 | # recommended for security (the code is non-trivial). Not enabling it, 69 | # however, may confuse older FTP clients. 70 | #async_abor_enable=YES 71 | # 72 | # By default the server will pretend to allow ASCII mode but in fact ignore 73 | # the request. Turn on the below options to have the server actually do ASCII 74 | # mangling on files when in ASCII mode. 75 | # Beware that on some FTP servers, ASCII support allows a denial of service 76 | # attack (DoS) via the command "SIZE /big/file" in ASCII mode. vsftpd 77 | # predicted this attack and has always been safe, reporting the size of the 78 | # raw file. 79 | # ASCII mangling is a horrible feature of the protocol. 80 | #ascii_upload_enable=YES 81 | #ascii_download_enable=YES 82 | # 83 | # You may fully customise the login banner string: 84 | ftpd_banner=Welcome to FTP server of inception! 85 | # 86 | # You may specify a file of disallowed anonymous e-mail addresses. Apparently 87 | # useful for combatting certain DoS attacks. 88 | #deny_email_enable=YES 89 | # (default follows) 90 | #banned_email_file=/etc/vsftpd.banned_emails 91 | # 92 | # You may specify an explicit list of local users to chroot() to their home 93 | # directory. If chroot_local_user is YES, then this list becomes a list of 94 | # users to NOT chroot(). 95 | # (Warning! chroot'ing can be very dangerous. If using chroot, make sure that 96 | # the user does not have write access to the top level directory within the 97 | # chroot) 98 | chroot_local_user=YES 99 | allow_writeable_chroot=YES 100 | user_sub_token=$USER 101 | local_root=/var/www/html 102 | 103 | #chroot_list_enable=YES 104 | # (default follows) 105 | #chroot_list_file=/etc/vsftpd.chroot_list 106 | # 107 | # You may activate the "-R" option to the builtin ls. This is disabled by 108 | # default to avoid remote users being able to cause excessive I/O on large 109 | # sites. However, some broken FTP clients such as "ncftp" and "mirror" assume 110 | # the presence of the "-R" option, so there is a strong case for enabling it. 111 | #ls_recurse_enable=YES 112 | # 113 | # When "listen" directive is enabled, vsftpd runs in standalone mode and 114 | # listens on IPv4 sockets. This directive cannot be used in conjunction 115 | # with the listen_ipv6 directive. 116 | listen=YES 117 | listen_port=21 118 | listen_address=0.0.0.0 119 | seccomp_sandbox=NO 120 | 121 | # 122 | # This directive enables listening on IPv6 sockets. To listen on IPv4 and IPv6 123 | # sockets, you must run two copies of vsftpd with two configuration files. 124 | # Make sure, that one of the listen options is commented !! 125 | #listen_ipv6=YES 126 | 127 | pasv_enable=YES 128 | pasv_min_port=21100 129 | pasv_max_port=21110 130 | 131 | userlist_enable=YES 132 | userlist_file=/etc/vsftpd.userlist 133 | userlist_deny=NO -------------------------------------------------------------------------------- /srcs/requirements/wordpress/conf/php-fpm.conf: -------------------------------------------------------------------------------- 1 | ;;;;;;;;;;;;;;;;;;;;; 2 | ; FPM Configuration ; 3 | ;;;;;;;;;;;;;;;;;;;;; 4 | 5 | ; All relative paths in this configuration file are relative to PHP's install 6 | ; prefix (/usr). 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 /var 16 | ; Default Value: none 17 | pid = run/php-fpm7.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 /var 23 | ; Default Value: log/php7/error.log 24 | ;error_log = log/php7/error.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-fpm7 37 | ;syslog.ident = php-fpm7 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 = 10 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 = 10m 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 otherwise 143 | include=/etc/php7/php-fpm.d/*.conf -------------------------------------------------------------------------------- /srcs/requirements/wordpress/conf/www.conf: -------------------------------------------------------------------------------- 1 | ; Start a new pool named 'www'. 2 | ; the variable $pool can be 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 | ; - 'access.log' 9 | ; - 'slowlog' 10 | ; - 'listen' (unixsocket) 11 | ; - 'chroot' 12 | ; - 'chdir' 13 | ; - 'php_values' 14 | ; - 'php_admin_values' 15 | ; When not set, the global prefix (or /usr) applies instead. 16 | ; Note: This directive can also be relative to the global prefix. 17 | ; Default Value: none 18 | ;prefix = /path/to/pools/$pool 19 | 20 | ; Unix user/group of processes 21 | ; Note: The user is mandatory. If the group is not set, the default user's group 22 | ; will be used. 23 | user = nginx 24 | group = nginx 25 | 26 | ; The address on which to accept FastCGI requests. 27 | ; Valid syntaxes are: 28 | ; 'ip.add.re.ss:port' - to listen on a TCP socket to a specific IPv4 address on 29 | ; a specific port; 30 | ; '[ip:6:addr:ess]:port' - to listen on a TCP socket to a specific IPv6 address on 31 | ; a specific port; 32 | ; 'port' - to listen on a TCP socket to all addresses 33 | ; (IPv6 and IPv4-mapped) on a specific port; 34 | ; '/path/to/unix/socket' - to listen on a unix socket. 35 | ; Note: This value is mandatory. 36 | listen = 9000 37 | 38 | ; Set listen(2) backlog. 39 | ; Default Value: 511 (-1 on FreeBSD and OpenBSD) 40 | ;listen.backlog = 511 41 | 42 | ; Set permissions for unix socket, if one is used. In Linux, read/write 43 | ; permissions must be set in order to allow connections from a web server. Many 44 | ; BSD-derived systems allow connections regardless of permissions. The owner 45 | ; and group can be specified either by name or by their numeric IDs. 46 | ; Default Values: user and group are set as the running user 47 | ; mode is set to 0660 48 | ;listen.owner = nobody 49 | ;listen.group = nobody 50 | ;listen.mode = 0660 51 | ; When POSIX Access Control Lists are supported you can set them using 52 | ; these options, value is a comma separated list of user/group names. 53 | ; When set, listen.owner and listen.group are ignored 54 | ;listen.acl_users = 55 | ;listen.acl_groups = 56 | 57 | ; List of addresses (IPv4/IPv6) of FastCGI clients which are allowed to connect. 58 | ; Equivalent to the FCGI_WEB_SERVER_ADDRS environment variable in the original 59 | ; PHP FCGI (5.2.2+). Makes sense only with a tcp listening socket. Each address 60 | ; must be separated by a comma. If this value is left blank, connections will be 61 | ; accepted from any ip address. 62 | ; Default Value: any 63 | ;listen.allowed_clients = 127.0.0.1 64 | 65 | ; Specify the nice(2) priority to apply to the pool processes (only if set) 66 | ; The value can vary from -19 (highest priority) to 20 (lower priority) 67 | ; Note: - It will only work if the FPM master process is launched as root 68 | ; - The pool processes will inherit the master process priority 69 | ; unless it specified otherwise 70 | ; Default Value: no set 71 | ; process.priority = -19 72 | 73 | ; Set the process dumpable flag (PR_SET_DUMPABLE prctl) even if the process user 74 | ; or group is differrent than the master process user. It allows to create process 75 | ; core dump and ptrace the process for the pool user. 76 | ; Default Value: no 77 | ; process.dumpable = yes 78 | 79 | ; Choose how the process manager will control the number of child processes. 80 | ; Possible Values: 81 | ; static - a fixed number (pm.max_children) of child processes; 82 | ; dynamic - the number of child processes are set dynamically based on the 83 | ; following directives. With this process management, there will be 84 | ; always at least 1 children. 85 | ; pm.max_children - the maximum number of children that can 86 | ; be alive at the same time. 87 | ; pm.start_servers - the number of children created on startup. 88 | ; pm.min_spare_servers - the minimum number of children in 'idle' 89 | ; state (waiting to process). If the number 90 | ; of 'idle' processes is less than this 91 | ; number then some children will be created. 92 | ; pm.max_spare_servers - the maximum number of children in 'idle' 93 | ; state (waiting to process). If the number 94 | ; of 'idle' processes is greater than this 95 | ; number then some children will be killed. 96 | ; ondemand - no children are created at startup. Children will be forked when 97 | ; new requests will connect. The following parameter are used: 98 | ; pm.max_children - the maximum number of children that 99 | ; can be alive at the same time. 100 | ; pm.process_idle_timeout - The number of seconds after which 101 | ; an idle process will be killed. 102 | ; Note: This value is mandatory. 103 | pm = dynamic 104 | 105 | ; The number of child processes to be created when pm is set to 'static' and the 106 | ; maximum number of child processes when pm is set to 'dynamic' or 'ondemand'. 107 | ; This value sets the limit on the number of simultaneous requests that will be 108 | ; served. Equivalent to the ApacheMaxClients directive with mpm_prefork. 109 | ; Equivalent to the PHP_FCGI_CHILDREN environment variable in the original PHP 110 | ; CGI. The below defaults are based on a server without much resources. Don't 111 | ; forget to tweak pm.* to fit your needs. 112 | ; Note: Used when pm is set to 'static', 'dynamic' or 'ondemand' 113 | ; Note: This value is mandatory. 114 | pm.max_children = 5 115 | 116 | ; The number of child processes created on startup. 117 | ; Note: Used only when pm is set to 'dynamic' 118 | ; Default Value: (min_spare_servers + max_spare_servers) / 2 119 | pm.start_servers = 2 120 | 121 | ; The desired minimum number of idle server processes. 122 | ; Note: Used only when pm is set to 'dynamic' 123 | ; Note: Mandatory when pm is set to 'dynamic' 124 | pm.min_spare_servers = 1 125 | 126 | ; The desired maximum number of idle server processes. 127 | ; Note: Used only when pm is set to 'dynamic' 128 | ; Note: Mandatory when pm is set to 'dynamic' 129 | pm.max_spare_servers = 3 130 | 131 | ; The number of seconds after which an idle process will be killed. 132 | ; Note: Used only when pm is set to 'ondemand' 133 | ; Default Value: 10s 134 | ;pm.process_idle_timeout = 10s; 135 | 136 | ; The number of requests each child process should execute before respawning. 137 | ; This can be useful to work around memory leaks in 3rd party libraries. For 138 | ; endless request processing specify '0'. Equivalent to PHP_FCGI_MAX_REQUESTS. 139 | ; Default Value: 0 140 | ;pm.max_requests = 500 141 | 142 | ; The URI to view the FPM status page. If this value is not set, no URI will be 143 | ; recognized as a status page. It shows the following informations: 144 | ; pool - the name of the pool; 145 | ; process manager - static, dynamic or ondemand; 146 | ; start time - the date and time FPM has started; 147 | ; start since - number of seconds since FPM has started; 148 | ; accepted conn - the number of request accepted by the pool; 149 | ; listen queue - the number of request in the queue of pending 150 | ; connections (see backlog in listen(2)); 151 | ; max listen queue - the maximum number of requests in the queue 152 | ; of pending connections since FPM has started; 153 | ; listen queue len - the size of the socket queue of pending connections; 154 | ; idle processes - the number of idle processes; 155 | ; active processes - the number of active processes; 156 | ; total processes - the number of idle + active processes; 157 | ; max active processes - the maximum number of active processes since FPM 158 | ; has started; 159 | ; max children reached - number of times, the process limit has been reached, 160 | ; when pm tries to start more children (works only for 161 | ; pm 'dynamic' and 'ondemand'); 162 | ; Value are updated in real time. 163 | ; Example output: 164 | ; pool: www 165 | ; process manager: static 166 | ; start time: 01/Jul/2011:17:53:49 +0200 167 | ; start since: 62636 168 | ; accepted conn: 190460 169 | ; listen queue: 0 170 | ; max listen queue: 1 171 | ; listen queue len: 42 172 | ; idle processes: 4 173 | ; active processes: 11 174 | ; total processes: 15 175 | ; max active processes: 12 176 | ; max children reached: 0 177 | ; 178 | ; By default the status page output is formatted as text/plain. Passing either 179 | ; 'html', 'xml' or 'json' in the query string will return the corresponding 180 | ; output syntax. Example: 181 | ; http://www.foo.bar/status 182 | ; http://www.foo.bar/status?json 183 | ; http://www.foo.bar/status?html 184 | ; http://www.foo.bar/status?xml 185 | ; 186 | ; By default the status page only outputs short status. Passing 'full' in the 187 | ; query string will also return status for each pool process. 188 | ; Example: 189 | ; http://www.foo.bar/status?full 190 | ; http://www.foo.bar/status?json&full 191 | ; http://www.foo.bar/status?html&full 192 | ; http://www.foo.bar/status?xml&full 193 | ; The Full status returns for each process: 194 | ; pid - the PID of the process; 195 | ; state - the state of the process (Idle, Running, ...); 196 | ; start time - the date and time the process has started; 197 | ; start since - the number of seconds since the process has started; 198 | ; requests - the number of requests the process has served; 199 | ; request duration - the duration in µs of the requests; 200 | ; request method - the request method (GET, POST, ...); 201 | ; request URI - the request URI with the query string; 202 | ; content length - the content length of the request (only with POST); 203 | ; user - the user (PHP_AUTH_USER) (or '-' if not set); 204 | ; script - the main script called (or '-' if not set); 205 | ; last request cpu - the %cpu the last request consumed 206 | ; it's always 0 if the process is not in Idle state 207 | ; because CPU calculation is done when the request 208 | ; processing has terminated; 209 | ; last request memory - the max amount of memory the last request consumed 210 | ; it's always 0 if the process is not in Idle state 211 | ; because memory calculation is done when the request 212 | ; processing has terminated; 213 | ; If the process is in Idle state, then informations are related to the 214 | ; last request the process has served. Otherwise informations are related to 215 | ; the current request being served. 216 | ; Example output: 217 | ; ************************ 218 | ; pid: 31330 219 | ; state: Running 220 | ; start time: 01/Jul/2011:17:53:49 +0200 221 | ; start since: 63087 222 | ; requests: 12808 223 | ; request duration: 1250261 224 | ; request method: GET 225 | ; request URI: /test_mem.php?N=10000 226 | ; content length: 0 227 | ; user: - 228 | ; script: /home/fat/web/docs/php/test_mem.php 229 | ; last request cpu: 0.00 230 | ; last request memory: 0 231 | ; 232 | ; Note: There is a real-time FPM status monitoring sample web page available 233 | ; It's available in: /usr/share/php7/fpm/status.html 234 | ; 235 | ; Note: The value must start with a leading slash (/). The value can be 236 | ; anything, but it may not be a good idea to use the .php extension or it 237 | ; may conflict with a real PHP file. 238 | ; Default Value: not set 239 | ;pm.status_path = /status 240 | 241 | ; The ping URI to call the monitoring page of FPM. If this value is not set, no 242 | ; URI will be recognized as a ping page. This could be used to test from outside 243 | ; that FPM is alive and responding, or to 244 | ; - create a graph of FPM availability (rrd or such); 245 | ; - remove a server from a group if it is not responding (load balancing); 246 | ; - trigger alerts for the operating team (24/7). 247 | ; Note: The value must start with a leading slash (/). The value can be 248 | ; anything, but it may not be a good idea to use the .php extension or it 249 | ; may conflict with a real PHP file. 250 | ; Default Value: not set 251 | ;ping.path = /ping 252 | 253 | ; This directive may be used to customize the response of a ping request. The 254 | ; response is formatted as text/plain with a 200 response code. 255 | ; Default Value: pong 256 | ;ping.response = pong 257 | 258 | ; The access log file 259 | ; Default: not set 260 | ;access.log = log/php7/$pool.access.log 261 | 262 | ; The access log format. 263 | ; The following syntax is allowed 264 | ; %%: the '%' character 265 | ; %C: %CPU used by the request 266 | ; it can accept the following format: 267 | ; - %{user}C for user CPU only 268 | ; - %{system}C for system CPU only 269 | ; - %{total}C for user + system CPU (default) 270 | ; %d: time taken to serve the request 271 | ; it can accept the following format: 272 | ; - %{seconds}d (default) 273 | ; - %{miliseconds}d 274 | ; - %{mili}d 275 | ; - %{microseconds}d 276 | ; - %{micro}d 277 | ; %e: an environment variable (same as $_ENV or $_SERVER) 278 | ; it must be associated with embraces to specify the name of the env 279 | ; variable. Some exemples: 280 | ; - server specifics like: %{REQUEST_METHOD}e or %{SERVER_PROTOCOL}e 281 | ; - HTTP headers like: %{HTTP_HOST}e or %{HTTP_USER_AGENT}e 282 | ; %f: script filename 283 | ; %l: content-length of the request (for POST request only) 284 | ; %m: request method 285 | ; %M: peak of memory allocated by PHP 286 | ; it can accept the following format: 287 | ; - %{bytes}M (default) 288 | ; - %{kilobytes}M 289 | ; - %{kilo}M 290 | ; - %{megabytes}M 291 | ; - %{mega}M 292 | ; %n: pool name 293 | ; %o: output header 294 | ; it must be associated with embraces to specify the name of the header: 295 | ; - %{Content-Type}o 296 | ; - %{X-Powered-By}o 297 | ; - %{Transfert-Encoding}o 298 | ; - .... 299 | ; %p: PID of the child that serviced the request 300 | ; %P: PID of the parent of the child that serviced the request 301 | ; %q: the query string 302 | ; %Q: the '?' character if query string exists 303 | ; %r: the request URI (without the query string, see %q and %Q) 304 | ; %R: remote IP address 305 | ; %s: status (response code) 306 | ; %t: server time the request was received 307 | ; it can accept a strftime(3) format: 308 | ; %d/%b/%Y:%H:%M:%S %z (default) 309 | ; The strftime(3) format must be encapsuled in a %{}t tag 310 | ; e.g. for a ISO8601 formatted timestring, use: %{%Y-%m-%dT%H:%M:%S%z}t 311 | ; %T: time the log has been written (the request has finished) 312 | ; it can accept a strftime(3) format: 313 | ; %d/%b/%Y:%H:%M:%S %z (default) 314 | ; The strftime(3) format must be encapsuled in a %{}t tag 315 | ; e.g. for a ISO8601 formatted timestring, use: %{%Y-%m-%dT%H:%M:%S%z}t 316 | ; %u: remote user 317 | ; 318 | ; Default: "%R - %u %t \"%m %r\" %s" 319 | ;access.format = "%R - %u %t \"%m %r%Q%q\" %s %f %{mili}d %{kilo}M %C%%" 320 | 321 | ; The log file for slow requests 322 | ; Default Value: not set 323 | ; Note: slowlog is mandatory if request_slowlog_timeout is set 324 | ;slowlog = log/php7/$pool.slow.log 325 | 326 | ; The timeout for serving a single request after which a PHP backtrace will be 327 | ; dumped to the 'slowlog' file. A value of '0s' means 'off'. 328 | ; Available units: s(econds)(default), m(inutes), h(ours), or d(ays) 329 | ; Default Value: 0 330 | ;request_slowlog_timeout = 0 331 | 332 | ; Depth of slow log stack trace. 333 | ; Default Value: 20 334 | ;request_slowlog_trace_depth = 20 335 | 336 | ; The timeout for serving a single request after which the worker process will 337 | ; be killed. This option should be used when the 'max_execution_time' ini option 338 | ; does not stop script execution for some reason. A value of '0' means 'off'. 339 | ; Available units: s(econds)(default), m(inutes), h(ours), or d(ays) 340 | ; Default Value: 0 341 | ;request_terminate_timeout = 0 342 | 343 | ; The timeout set by 'request_terminate_timeout' ini option is not engaged after 344 | ; application calls 'fastcgi_finish_request' or when application has finished and 345 | ; shutdown functions are being called (registered via register_shutdown_function). 346 | ; This option will enable timeout limit to be applied unconditionally 347 | ; even in such cases. 348 | ; Default Value: no 349 | ;request_terminate_timeout_track_finished = no 350 | 351 | ; Set open file descriptor rlimit. 352 | ; Default Value: system defined value 353 | ;rlimit_files = 1024 354 | 355 | ; Set max core size rlimit. 356 | ; Possible Values: 'unlimited' or an integer greater or equal to 0 357 | ; Default Value: system defined value 358 | ;rlimit_core = 0 359 | 360 | ; Chroot to this directory at the start. This value must be defined as an 361 | ; absolute path. When this value is not set, chroot is not used. 362 | ; Note: you can prefix with '$prefix' to chroot to the pool prefix or one 363 | ; of its subdirectories. If the pool prefix is not set, the global prefix 364 | ; will be used instead. 365 | ; Note: chrooting is a great security feature and should be used whenever 366 | ; possible. However, all PHP paths will be relative to the chroot 367 | ; (error_log, sessions.save_path, ...). 368 | ; Default Value: not set 369 | ;chroot = 370 | 371 | ; Chdir to this directory at the start. 372 | ; Note: relative path can be used. 373 | ; Default Value: current directory or / when chroot 374 | ;chdir = /var/www 375 | 376 | ; Redirect worker stdout and stderr into main error log. If not set, stdout and 377 | ; stderr will be redirected to /dev/null according to FastCGI specs. 378 | ; Note: on highloaded environement, this can cause some delay in the page 379 | ; process time (several ms). 380 | ; Default Value: no 381 | ;catch_workers_output = yes 382 | 383 | ; Decorate worker output with prefix and suffix containing information about 384 | ; the child that writes to the log and if stdout or stderr is used as well as 385 | ; log level and time. This options is used only if catch_workers_output is yes. 386 | ; Settings to "no" will output data as written to the stdout or stderr. 387 | ; Default value: yes 388 | ;decorate_workers_output = no 389 | 390 | ; Clear environment in FPM workers 391 | ; Prevents arbitrary environment variables from reaching FPM worker processes 392 | ; by clearing the environment in workers before env vars specified in this 393 | ; pool configuration are added. 394 | ; Setting to "no" will make all environment variables available to PHP code 395 | ; via getenv(), $_ENV and $_SERVER. 396 | ; Default Value: yes 397 | ;clear_env = no 398 | 399 | ; Limits the extensions of the main script FPM will allow to parse. This can 400 | ; prevent configuration mistakes on the web server side. You should only limit 401 | ; FPM to .php extensions to prevent malicious users to use other extensions to 402 | ; execute php code. 403 | ; Note: set an empty value to allow all extensions. 404 | ; Default Value: .php 405 | ;security.limit_extensions = .php .php3 .php4 .php5 .php7 406 | 407 | ; Pass environment variables like LD_LIBRARY_PATH. All $VARIABLEs are taken from 408 | ; the current environment. 409 | ; Default Value: clean env 410 | ;env[HOSTNAME] = $HOSTNAME 411 | ;env[PATH] = /usr/local/bin:/usr/bin:/bin 412 | ;env[TMP] = /tmp 413 | ;env[TMPDIR] = /tmp 414 | ;env[TEMP] = /tmp 415 | 416 | ; Additional php.ini defines, specific to this pool of workers. These settings 417 | ; overwrite the values previously defined in the php.ini. The directives are the 418 | ; same as the PHP SAPI: 419 | ; php_value/php_flag - you can set classic ini defines which can 420 | ; be overwritten from PHP call 'ini_set'. 421 | ; php_admin_value/php_admin_flag - these directives won't be overwritten by 422 | ; PHP call 'ini_set' 423 | ; For php_*flag, valid values are on, off, 1, 0, true, false, yes or no. 424 | 425 | ; Defining 'extension' will load the corresponding shared extension from 426 | ; extension_dir. Defining 'disable_functions' or 'disable_classes' will not 427 | ; overwrite previously defined php.ini values, but will append the new value 428 | ; instead. 429 | 430 | ; Note: path INI options can be relative and will be expanded with the prefix 431 | ; (pool, global or /usr) 432 | 433 | ; Default Value: nothing is defined by default except the values in php.ini and 434 | ; specified at startup with the -d argument 435 | ;php_admin_value[sendmail_path] = /usr/sbin/sendmail -t -i -f www@my.domain.com 436 | ;php_flag[display_errors] = off 437 | ;php_admin_value[error_log] = /var/log/php7/$pool.error.log 438 | ;php_admin_flag[log_errors] = on 439 | ;php_admin_value[memory_limit] = 32M --------------------------------------------------------------------------------