Browse Source

add more configuration example

develop
VirtuBox 2 years ago
parent
commit
fe249c6feb
9 changed files with 183 additions and 6 deletions
  1. +1
    -2
      etc/nginx/conf.d/map-wp-cache.conf
  2. +43
    -3
      etc/nginx/conf.d/upstream.conf
  3. +23
    -0
      etc/php/7.0/pool.d/www-sock.conf
  4. +23
    -0
      etc/php/7.0/pool.d/www-two-sock..conf
  5. +23
    -0
      etc/php/7.1/fpm/pool.d/www-sock.conf
  6. +23
    -0
      etc/php/7.1/fpm/pool.d/www-two-sock..conf
  7. +23
    -0
      etc/php/7.2/fpm/pool.d/www-sock.conf
  8. +23
    -0
      etc/php/7.2/fpm/pool.d/www-two-sock..conf
  9. +1
    -1
      scripts/init.sh

+ 1
- 2
etc/nginx/conf.d/map-wp-cache.conf View File

@@ -14,7 +14,7 @@ map $http_cookie $cookie_cache {
~*woocommerce_cart_hash 1;
~*wptouch_switch_toogle 1;
~*comment_author_email_ 1;
}

map $request_uri $uri_cache {
@@ -49,4 +49,3 @@ map $http_request_cache$cookie_cache$uri_cache$request_cache$query_cache $skip_c
00000 0;
}



+ 43
- 3
etc/nginx/conf.d/upstream.conf View File

@@ -7,7 +7,10 @@ upstream debug {
# Debug Pool
server 127.0.0.1:9001;
}
# php7.0-fpm

####### php7.0-fpm

# php7.0-fpm TCP
upstream php7 {
server 127.0.0.1:9070;
}
@@ -15,14 +18,51 @@ server 127.0.0.1:9070;
upstream debug7 {
server 127.0.0.1:9170;
}
# php7.1-fpm

# php7.0-fpm socket
upstream php7-sock {
least_conn;

server unix:/var/run/php7-fpm.sock;
server unix:/var/run/php7-two-fpm.sock;

keepalive 5;
}

####### php7.1-fpm

# php7.1-fpm TCP
upstream php71 {
server 127.0.0.1:9080;
}
# php7.2-fpm

# php7.1-fpm socket
upstream php71-sock {
least_conn;

server unix:/var/run/php71-fpm.sock;
server unix:/var/run/php71-two-fpm.sock;

keepalive 5;
}

####### php7.2-fpm

# php7.2-fpm TCP
upstream php72 {
server 127.0.0.1:9090;
}

# php7.2-fpm socket
upstream php72-sock {
least_conn;

server unix:/var/run/php72-fpm.sock;
server unix:/var/run/php72-two-fpm.sock;

keepalive 5;
}

# redis
upstream redis {
server 127.0.0.1:6379;


+ 23
- 0
etc/php/7.0/pool.d/www-sock.conf View File

@@ -0,0 +1,23 @@
[www-sock]
user = www-data
group = www-data
prefix = /var/run

listen = php7-fpm.sock
listen.owner = www-data
listen.group = www-data
listen.mode = 0660
listen.backlog = 32768


catch_workers_output = yes

pm = ondemand
pm.max_children = 100
pm.start_servers = 20
pm.min_spare_servers = 10
pm.max_spare_servers = 30
ping.path = /ping
pm.status_path = /status
pm.max_requests = 500
request_terminate_timeout = 300

+ 23
- 0
etc/php/7.0/pool.d/www-two-sock..conf View File

@@ -0,0 +1,23 @@
[www-two-sock]
user = www-data
group = www-data
prefix = /var/run

listen = php7-two-fpm.sock
listen.owner = www-data
listen.group = www-data
listen.mode = 0660
listen.backlog = 32768


catch_workers_output = yes

pm = ondemand
pm.max_children = 100
pm.start_servers = 20
pm.min_spare_servers = 10
pm.max_spare_servers = 30
ping.path = /ping
pm.status_path = /status
pm.max_requests = 500
request_terminate_timeout = 300

+ 23
- 0
etc/php/7.1/fpm/pool.d/www-sock.conf View File

@@ -0,0 +1,23 @@
[www-sock]
user = www-data
group = www-data
prefix = /var/run

listen = php71-fpm.sock
listen.owner = www-data
listen.group = www-data
listen.mode = 0660
listen.backlog = 32768


catch_workers_output = yes

pm = ondemand
pm.max_children = 100
pm.start_servers = 20
pm.min_spare_servers = 10
pm.max_spare_servers = 30
ping.path = /ping
pm.status_path = /status
pm.max_requests = 500
request_terminate_timeout = 300

+ 23
- 0
etc/php/7.1/fpm/pool.d/www-two-sock..conf View File

@@ -0,0 +1,23 @@
[www-two-sock]
user = www-data
group = www-data
prefix = /var/run

listen = php71-two-fpm.sock
listen.owner = www-data
listen.group = www-data
listen.mode = 0660
listen.backlog = 32768


catch_workers_output = yes

pm = ondemand
pm.max_children = 100
pm.start_servers = 20
pm.min_spare_servers = 10
pm.max_spare_servers = 30
ping.path = /ping
pm.status_path = /status
pm.max_requests = 500
request_terminate_timeout = 300

+ 23
- 0
etc/php/7.2/fpm/pool.d/www-sock.conf View File

@@ -0,0 +1,23 @@
[www-sock]
user = www-data
group = www-data
prefix = /var/run

listen = php72-fpm.sock
listen.owner = www-data
listen.group = www-data
listen.mode = 0660
listen.backlog = 32768


catch_workers_output = yes

pm = ondemand
pm.max_children = 100
pm.start_servers = 20
pm.min_spare_servers = 10
pm.max_spare_servers = 30
ping.path = /ping
pm.status_path = /status
pm.max_requests = 500
request_terminate_timeout = 300

+ 23
- 0
etc/php/7.2/fpm/pool.d/www-two-sock..conf View File

@@ -0,0 +1,23 @@
[www-two-sock]
user = www-data
group = www-data
prefix = /var/run

listen = php72-two-fpm.sock
listen.owner = www-data
listen.group = www-data
listen.mode = 0660
listen.backlog = 32768


catch_workers_output = yes

pm = ondemand
pm.max_children = 100
pm.start_servers = 20
pm.min_spare_servers = 10
pm.max_spare_servers = 30
ping.path = /ping
pm.status_path = /status
pm.max_requests = 500
request_terminate_timeout = 300

+ 1
- 1
scripts/init.sh View File

@@ -52,7 +52,7 @@ if [ "$mariadb_server_install" = "n" ]; then
read -p "Select an option [y/n]: " mariadb_client_install
done
fi
if [ "$mariadb_server_install" = "y" || "$mariadb_client_install" = "y" ]; then
if [[ "$mariadb_server_install" = "y" || "$mariadb_client_install" = "y" ]]; then
echo ""
echo "What version of MariaDB Client/Server do you want to install, 10.1, 10.2 or 10.3 ?"
while [[ $mariadb_version_install != "10.1" && $mariadb_version_install != "10.2" && $mariadb_version_install != "10.3" ]]; do


Loading…
Cancel
Save