diff --git a/rootfs/sysprepz/apache2-templates/php72fpm.sh b/rootfs/sysprepz/apache2-templates/php72fpm.sh deleted file mode 100755 index 33be2df..0000000 --- a/rootfs/sysprepz/apache2-templates/php72fpm.sh +++ /dev/null @@ -1,79 +0,0 @@ -#!/bin/bash -# adding conf -user="$1" -domain="$2" -ip="$3" -home_dir="$4" -docroot="$5" -php_version="7.2" - -fpm_conf=" -[$domain] -listen = /var/run/vesta-php-fpm-$domain.sock -listen.allowed_clients = 127.0.0.1 - -user = $user -group = $user - -listen.owner = $user -listen.group = www-data - -pm = ondemand -pm.max_children = 4 -pm.max_requests = 4000 -pm.process_idle_timeout = 10s -pm.status_path = /status - -php_admin_value[upload_tmp_dir] = /home/$user/web/$domain/tmp -php_admin_value[session.save_path] = /home/$user/web/$domain/tmp -php_admin_value[open_basedir] = $docroot:/home/$user/web/$domain/tmp - -env[HOSTNAME] = $HOSTNAME -env[PATH] = /usr/local/bin:/usr/bin:/bin -env[TMP] = /home/$user/tmp -env[TMPDIR] = /home/$user/tmp -env[TEMP] = /home/$user/tmp -" -fpm_conf_file="/home/$user/web/$domain/cgi-bin/php-fpm.conf" - -# remove old conf -rm -f /home/$user/web/$domain/cgi-bin/php*-fpm.conf - -# restart any *running* php fpm found with ps -uaxw -# otherwise, simply use: -# find /etc/init.d/ -name 'php*-fpm*' -type f -exec basename {} \; | xargs -I{} service {} restart || true -phpfpms="7.2:7.3:7.4:8.0" - -iphpfpm=(${phpfpms//:/ }) -for i in "${!iphpfpm[@]}" -do - if ps auxw | grep php/${iphpfpm[i]}/fpm | grep -v grep > /dev/null - then - service php${iphpfpm[i]}-fpm restart || true - fi -done - -# make sure to delete old sock file before restart -rm -f /var/run/vesta-php-fpm-$domain.sock || true - -echo "$fpm_conf" > $fpm_conf_file -chown $user:$user $fpm_conf_file -chmod -f 751 $fpm_conf_file -mkdir -p /home/$user/web/$domain/tmp/cache -rm -rf /home/$user/web/$domain/tmp/* -chown $user:$user /home/$user/web/$domain/tmp -mkdir -p /home/$user/web/$domain/tmp/cache -chown -R www-data:www-data /home/$user/web/$domain/tmp/cache - -# delete old and link new conf -rm -f /etc/php/*/fpm/pool.d/$domain.conf -ln -sf $fpm_conf_file /etc/php/$php_version/fpm/pool.d/$domain.conf - - -# start if it's not running -service php$php_version-fpm start || true -service php$php_version-fpm restart || true - -service nginx restart || true - -exit 0 diff --git a/rootfs/sysprepz/apache2-templates/php72fpm.stpl b/rootfs/sysprepz/apache2-templates/php72fpm.stpl deleted file mode 100644 index 48488a7..0000000 --- a/rootfs/sysprepz/apache2-templates/php72fpm.stpl +++ /dev/null @@ -1,11 +0,0 @@ - -# -# -# ServerName %domain_idn% -# # php72fpm -# DocumentRoot %sdocroot% -# -# Deny from all -# Allow from none -# -# diff --git a/rootfs/sysprepz/apache2-templates/php72fpm.tpl b/rootfs/sysprepz/apache2-templates/php72fpm.tpl deleted file mode 100644 index 60e3b9d..0000000 --- a/rootfs/sysprepz/apache2-templates/php72fpm.tpl +++ /dev/null @@ -1,11 +0,0 @@ - -# -# -# ServerName %domain_idn% -# # php72fpm -# DocumentRoot %sdocroot% -# -# Deny from all -# Allow from none -# -# diff --git a/rootfs/sysprepz/apache2-templates/phpfcgid72.sh b/rootfs/sysprepz/apache2-templates/phpfcgid72.sh deleted file mode 100755 index 239b5db..0000000 --- a/rootfs/sysprepz/apache2-templates/phpfcgid72.sh +++ /dev/null @@ -1,22 +0,0 @@ -#!/bin/bash -# Adding php wrapper -user="$1" -domain="$2" -ip="$3" -home_dir="$4" -docroot="$5" - -wrapper_script="#!/bin/sh -PHPRC=/usr/local/lib -export PHPRC -export PHP_FCGI_MAX_REQUESTS=1000 -export PHP_FCGI_CHILDREN=4 -exec /usr/bin/php-cgi7.2 -" -wrapper_file="/home/$user/web/$domain/cgi-bin/fcgi7.2" - -echo "$wrapper_script" > $wrapper_file -chown $user:$user $wrapper_file -chmod -f 751 $wrapper_file - -exit 0 \ No newline at end of file diff --git a/rootfs/sysprepz/apache2-templates/phpfcgid72.stpl b/rootfs/sysprepz/apache2-templates/phpfcgid72.stpl deleted file mode 100644 index 45b81ff..0000000 --- a/rootfs/sysprepz/apache2-templates/phpfcgid72.stpl +++ /dev/null @@ -1,39 +0,0 @@ - - - - ServerName %domain_idn% - %alias_string% - ServerAdmin %email% - DocumentRoot %sdocroot% - ScriptAlias /cgi-bin/ %home%/%user%/web/%domain%/cgi-bin/ - Alias /vstats/ %home%/%user%/web/%domain%/stats/ - Alias /error/ %home%/%user%/web/%domain%/document_errors/ - SuexecUserGroup %user% %group% - CustomLog /var/log/%web_system%/domains/%domain%.bytes bytes - CustomLog /var/log/%web_system%/domains/%domain%.log combined - ErrorLog /var/log/%web_system%/domains/%domain%.error.log - - SSLRequireSSL - AllowOverride All - Options +Includes -Indexes +ExecCGI - php_admin_value open_basedir %docroot%:%home%/%user%/web/%domain%/tmp - php_admin_value upload_tmp_dir %home%/%user%/web/%domain%/tmp - php_admin_value session.save_path %home%/%user%/web/%domain%/tmp - - SetHandler fcgid-script - - FCGIWrapper %home%/%user%/web/%domain%/cgi-bin/fcgi7.2 .php - - - AllowOverride All - - - SSLEngine on - SSLVerifyClient none - SSLCertificateFile %ssl_crt% - SSLCertificateKeyFile %ssl_key% - %ssl_ca_str%SSLCertificateChainFile %ssl_ca% - - IncludeOptional %home%/%user%/conf/web/s%web_system%.%domain%.conf* - - \ No newline at end of file diff --git a/rootfs/sysprepz/apache2-templates/phpfcgid72.tpl b/rootfs/sysprepz/apache2-templates/phpfcgid72.tpl deleted file mode 100644 index eaf4a4c..0000000 --- a/rootfs/sysprepz/apache2-templates/phpfcgid72.tpl +++ /dev/null @@ -1,32 +0,0 @@ - - - - ServerName %domain_idn% - %alias_string% - ServerAdmin %email% - DocumentRoot %docroot% - ScriptAlias /cgi-bin/ %home%/%user%/web/%domain%/cgi-bin/ - Alias /vstats/ %home%/%user%/web/%domain%/stats/ - Alias /error/ %home%/%user%/web/%domain%/document_errors/ - SuexecUserGroup %user% %group% - CustomLog /var/log/%web_system%/domains/%domain%.bytes bytes - CustomLog /var/log/%web_system%/domains/%domain%.log combined - ErrorLog /var/log/%web_system%/domains/%domain%.error.log - - AllowOverride All - Options +Includes -Indexes +ExecCGI - php_admin_value open_basedir %docroot%:%home%/%user%/web/%domain%/tmp - php_admin_value upload_tmp_dir %home%/%user%/web/%domain%/tmp - php_admin_value session.save_path %home%/%user%/web/%domain%/tmp - - SetHandler fcgid-script - - FCGIWrapper %home%/%user%/web/%domain%/cgi-bin/fcgi7.2 .php - - - AllowOverride All - - - IncludeOptional %home%/%user%/conf/web/%web_system%.%domain%.conf* - - \ No newline at end of file