create_vhost.sh: add proxy settings that fix default event mpm worker.
This commit is contained in:
parent
0c91a68052
commit
62575a0908
@ -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
|
||||
</FilesMatch>
|
||||
|
||||
# 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.
|
||||
#
|
||||
<Proxy "fcgi://php/">
|
||||
|
||||
# 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
|
||||
</Proxy>
|
||||
|
||||
<IfModule dir_module>
|
||||
DirectoryIndex index.php index.html index.htm
|
||||
</IfModule>
|
||||
@ -3133,6 +3175,48 @@ EOF
|
||||
SetHandler $_set_handler_fpm
|
||||
</FilesMatch>
|
||||
|
||||
# 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.
|
||||
#
|
||||
<Proxy "fcgi://php/">
|
||||
|
||||
# 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
|
||||
</Proxy>
|
||||
|
||||
<IfModule dir_module>
|
||||
DirectoryIndex index.php index.html index.htm
|
||||
</IfModule>
|
||||
|
Loading…
Reference in New Issue
Block a user