php directory
This commit is contained in:
parent
8e77c68ac0
commit
f495828a2d
|
@ -339,7 +339,7 @@ function remove_nextcloud {
|
|||
function_check remove_nodejs
|
||||
remove_nodejs pleroma-nextcloud
|
||||
|
||||
sed -i 's|env[PATH]|;env[PATH]|g' /etc/php7.0/fpm/pool.d/www.conf
|
||||
sed -i 's|env[PATH]|;env[PATH]|g' /etc/php/7.0/fpm/pool.d/www.conf
|
||||
|
||||
read_config_param "NEXTCLOUD_DOMAIN_NAME"
|
||||
read_config_param "MY_USERNAME"
|
||||
|
@ -393,11 +393,11 @@ function install_nextcloud_main {
|
|||
apt-get -yq install php-memcached php-intl memcached php-memcached
|
||||
|
||||
# Ensure PATH is available to php
|
||||
if [ ! -f /etc/php7.0/fpm/pool.d/www.conf ]; then
|
||||
if [ ! -f /etc/php/7.0/fpm/pool.d/www.conf ]; then
|
||||
echo $'No php www configuration file found'
|
||||
exit 628757
|
||||
fi
|
||||
sed -i 's|;env[PATH]|env[PATH]|g' /etc/php7.0/fpm/pool.d/www.conf
|
||||
sed -i 's|;env[PATH]|env[PATH]|g' /etc/php/7.0/fpm/pool.d/www.conf
|
||||
|
||||
if [ ! -d /var/www/$NEXTCLOUD_DOMAIN_NAME ]; then
|
||||
mkdir /var/www/$NEXTCLOUD_DOMAIN_NAME
|
||||
|
|
|
@ -99,8 +99,8 @@ if [[ "$1" == "on" || "$1" == "On" || "$1" == "ON" ]]; then
|
|||
if [ -f /etc/mumble-server.ini ]; then
|
||||
sed -i 's|logfile=.*|logfile=/var/log/mumble-server.log|g' /etc/mumble-server.ini
|
||||
fi
|
||||
if [ -f /etc/php7.0/fpm/php-fpm.conf ]; then
|
||||
sed -i 's|error_log =.*|error_log = /var/log/php-fpm.log|g' /etc/php7.0/fpm/php-fpm.conf
|
||||
if [ -f /etc/php/7.0/fpm/php-fpm.conf ]; then
|
||||
sed -i 's|error_log =.*|error_log = /var/log/php-fpm.log|g' /etc/php/7.0/fpm/php-fpm.conf
|
||||
fi
|
||||
if [ -d /etc/nginx ]; then
|
||||
if [ ! -d /var/log/nginx ]; then
|
||||
|
@ -180,8 +180,8 @@ else
|
|||
shred -zu /var/log/radicale/*
|
||||
rm -rf /var/log/radicale
|
||||
fi
|
||||
if [ -f /etc/php7.0/fpm/php-fpm.conf ]; then
|
||||
sed -i 's|error_log =.*|error_log = /dev/null|g' /etc/php7.0/fpm/php-fpm.conf
|
||||
if [ -f /etc/php/7.0/fpm/php-fpm.conf ]; then
|
||||
sed -i 's|error_log =.*|error_log = /dev/null|g' /etc/php/7.0/fpm/php-fpm.conf
|
||||
shred -zu /var/log/php-fpm.*
|
||||
fi
|
||||
if [ -d /etc/nginx ]; then
|
||||
|
|
|
@ -401,11 +401,11 @@ function letsencrypt_renewals {
|
|||
}
|
||||
|
||||
function configure_php {
|
||||
sed -i "s/memory_limit = 128M/memory_limit = ${MAX_PHP_MEMORY}M/g" /etc/php7.0/fpm/php.ini
|
||||
sed -i 's/;cgi.fix_pathinfo=1/cgi.fix_pathinfo=0/g' /etc/php7.0/fpm/php.ini
|
||||
sed -i "s/memory_limit = 128M/memory_limit = ${MAX_PHP_MEMORY}M/g" /etc/php/7.0/fpm/php.ini
|
||||
sed -i 's/;cgi.fix_pathinfo=1/cgi.fix_pathinfo=0/g' /etc/php/7.0/fpm/php.ini
|
||||
sed -i "s/memory_limit = -1/memory_limit = ${MAX_PHP_MEMORY}M/g" /etc/php7.0/cli/php.ini
|
||||
sed -i "s/upload_max_filesize = 2M/upload_max_filesize = 50M/g" /etc/php7.0/fpm/php.ini
|
||||
sed -i "s/post_max_size = 8M/post_max_size = 50M/g" /etc/php7.0/fpm/php.ini
|
||||
sed -i "s/upload_max_filesize = 2M/upload_max_filesize = 50M/g" /etc/php/7.0/fpm/php.ini
|
||||
sed -i "s/post_max_size = 8M/post_max_size = 50M/g" /etc/php/7.0/fpm/php.ini
|
||||
}
|
||||
|
||||
function install_web_server_access_control {
|
||||
|
@ -559,15 +559,15 @@ function install_web_server {
|
|||
sed -i 's|error_log.*|error_log = /dev/null;|g' /etc/nginx/nginx.conf
|
||||
|
||||
# limit the number of php processes
|
||||
sed -i 's/; process.max =.*/process.max = 32/g' /etc/php7.0/fpm/php-fpm.conf
|
||||
#sed -i 's/;process_control_timeout =.*/process_control_timeout = 300/g' /etc/php7.0/fpm/php-fpm.conf
|
||||
sed -i 's/; process.max =.*/process.max = 32/g' /etc/php/7.0/fpm/php-fpm.conf
|
||||
#sed -i 's/;process_control_timeout =.*/process_control_timeout = 300/g' /etc/php/7.0/fpm/php-fpm.conf
|
||||
|
||||
if ! grep -q "pm.max_children" /etc/php7.0/fpm/php-fpm.conf; then
|
||||
echo 'pm.max_children = 10' >> /etc/php7.0/fpm/php-fpm.conf
|
||||
echo 'pm.start_servers = 2' >> /etc/php7.0/fpm/php-fpm.conf
|
||||
echo 'pm.min_spare_servers = 2' >> /etc/php7.0/fpm/php-fpm.conf
|
||||
echo 'pm.max_spare_servers = 5' >> /etc/php7.0/fpm/php-fpm.conf
|
||||
echo 'pm.max_requests = 50' >> /etc/php7.0/fpm/php-fpm.conf
|
||||
if ! grep -q "pm.max_children" /etc/php/7.0/fpm/php-fpm.conf; then
|
||||
echo 'pm.max_children = 10' >> /etc/php/7.0/fpm/php-fpm.conf
|
||||
echo 'pm.start_servers = 2' >> /etc/php/7.0/fpm/php-fpm.conf
|
||||
echo 'pm.min_spare_servers = 2' >> /etc/php/7.0/fpm/php-fpm.conf
|
||||
echo 'pm.max_spare_servers = 5' >> /etc/php/7.0/fpm/php-fpm.conf
|
||||
echo 'pm.max_requests = 50' >> /etc/php/7.0/fpm/php-fpm.conf
|
||||
fi
|
||||
|
||||
if [ ! -d /etc/nginx ]; then
|
||||
|
|
Loading…
Reference in New Issue