diff --git a/create_vhost.sh b/create_vhost.sh
index 5b605a1..970309d 100755
--- a/create_vhost.sh
+++ b/create_vhost.sh
@@ -1927,7 +1927,7 @@ if [ "$_type" = "PHP-FPM" ]; then
tcp_host=127.0.0.1
tcp_port=9000
_proxy_match="^/(.*\.php(/.*)?)\$ unix:$unix_socket|fcgi://$tcp_host:$tcp_port$_doc_root"
- _set_handler_fpm="\"proxy:unix:$unix_socket|fcgi://$tcp_host\""
+ _set_handler_fpm="\"proxy:unix:${unix_socket}|fcgi://php/\""
unix_socket_owner="$(stat -c '%U' $unix_socket)"
unix_socket_group="$(stat -c '%G' $unix_socket)"
else
@@ -3030,6 +3030,48 @@ elif [ "$_type" = "PHP-FPM" ]; then
SetHandler $_set_handler_fpm
+ # Define a matching worker.
+ # The part that is matched to the SetHandler is the part that
+ # follows the pipe. If you need to distinguish, "localhost; can
+ # be anything unique.
+ #
+
+
+ # Recycle connections to the fastcgi dispatcher (PHP FPM).
+ #
+ # Use persistent connections to reduce the constant overhead of setting
+ # up new connections
+ #
+ ProxySet enablereuse=on
+
+ # max - the most proxied request per server
+ #
+ # max = pm.max_children / max number of servers
+ # = pm.max_children / (MaxRequestWorkers / ThreadsPerChild)
+ #
+ ProxySet max=16
+
+ # Forces the module to flush every chunk of data received from the FCGI backend
+ # as soon as it receives it, without buffering.
+ #
+ ProxySet flushpackets=on
+
+ # connectiontimeout
+ #
+ # Connect timeout in seconds. The number of seconds Apache httpd waits for the
+ # creation of a connection to the backend to complete. By adding a postfix of ms,
+ # the timeout can be also set in milliseconds.
+ #
+ ProxySet connectiontimeout=5
+
+ # timeout
+ #
+ # Socket timeout in seconds. The number of seconds Apache httpd waits for data
+ # sent by / to the backend.
+ #
+ ProxySet timeout=30
+
+
DirectoryIndex index.php index.html index.htm
@@ -3133,6 +3175,48 @@ EOF
SetHandler $_set_handler_fpm
+ # Define a matching worker.
+ # The part that is matched to the SetHandler is the part that
+ # follows the pipe. If you need to distinguish, "localhost; can
+ # be anything unique.
+ #
+
+
+ # Recycle connections to the fastcgi dispatcher (PHP FPM).
+ #
+ # Use persistent connections to reduce the constant overhead of setting
+ # up new connections
+ #
+ ProxySet enablereuse=on
+
+ # max - the most proxied request per server
+ #
+ # max = pm.max_children / max number of servers
+ # = pm.max_children / (MaxRequestWorkers / ThreadsPerChild)
+ #
+ ProxySet max=16
+
+ # Forces the module to flush every chunk of data received from the FCGI backend
+ # as soon as it receives it, without buffering.
+ #
+ ProxySet flushpackets=on
+
+ # connectiontimeout
+ #
+ # Connect timeout in seconds. The number of seconds Apache httpd waits for the
+ # creation of a connection to the backend to complete. By adding a postfix of ms,
+ # the timeout can be also set in milliseconds.
+ #
+ ProxySet connectiontimeout=5
+
+ # timeout
+ #
+ # Socket timeout in seconds. The number of seconds Apache httpd waits for data
+ # sent by / to the backend.
+ #
+ ProxySet timeout=30
+
+
DirectoryIndex index.php index.html index.htm