cd /root
wget https://raw.githubusercontent.com/hestiacp/hestiacp/release/install/hst-install.sh
bash hst-install.sh -w yes -t no -c no -x yes -z yes -b yes -i yes -m yes -a no -o yes -v no
rm /home/admin/web/yourdomain.com/public_html/index.html
rm /home/admin/web/yourdomain.com/public_html/robots.txt
cd /home/admin/web/yourdomain.com/public_html
unzip File_Hosting_Script_*
rm File_Hosting_Script_*
chmod 755 _config.inc.php
chmod 755 plugins/
chmod 755 files/
chmod 755 logs/
chmod 755 cache/
$ crontab -e
$ nano /home/admin/conf/web/yourdomain.com/nginx.ssl.conf_yetishare
Set: client_max_body_size 5G;
# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
location ~ \.php$ {
if (!-e $request_filename) { rewrite ^/(.*) /index.php?_page_url=$1 last; }
fastcgi_pass unix:/run/php/php8.1-fpm-yourdomain.com.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param MOD_X_ACCEL_REDIRECT_ENABLED on;
include /etc/nginx/fastcgi_params;
}
#location / {
if (!-e $request_filename) {
rewrite ^/(.*) /index.php?_page_url=$1 last;
}
#}
location /files/ {
internal;
}
# these locations would be hidden by .htaccess normally
location /logs/ {
deny all;
}
$ service nginx restart
cp /etc/php/8.0/fpm/php.ini /etc/php/8.0/fpm/php-ORIG.ini
sed -i 's/memory_limit = .*/memory_limit = 512M/' /etc/php/8.0/fpm/php.ini
sed -i 's/upload_max_filesize = .*/upload_max_filesize = 5G/' /etc/php/8.0/fpm/php.ini
sed -i 's/post_max_size = .*/post_max_size = 5G/' /etc/php/8.0/fpm/php.ini
sed -i 's/max_execution_time = .*/max_execution_time = 180/' /etc/php/8.0/fpm/php.ini
sed -i 's/max_input_time = .*/max_input_time = 180/' /etc/php/8.0/fpm/php.ini
sed -i 's/output_buffering = .*/output_buffering = 4096/' /etc/php/8.0/fpm/php.ini
sed -i 's/;output_handler =.*/output_handler =/' /etc/php/8.0/fpm/php.ini
sed -i 's/zlib.output_compression = .*/zlib.output_compression = Off/' /etc/php/8.0/fpm/php.ini
sed -i 's/zlib.output_compression_level = .*/zlib.output_compression_level = -1/' /etc/php/8.0/fpm/php.ini
sed -i 's/;zlib.output_handler =.*/zlib.output_handler =/' /etc/php/8.0/fpm/php.ini
cp /etc/nginx/nginx.conf /etc/nginx/nginx-ORIG.conf
sed -i '/http {/a fastcgi_keep_conn on;' /etc/nginx/nginx.conf
sed -i '/http {/a fastcgi_buffering off;' /etc/nginx/nginx.conf
sed -i '/http {/a proxy_buffering off;' /etc/nginx/nginx.conf
sed --in-place '/gzip /d' /etc/nginx/nginx.conf
sed -i '/http {/a gzip off;' /etc/nginx/nginx.conf
sed --in-place '/worker_connections /d' /etc/nginx/nginx.conf
sed -i '/events {/a worker_connections 10000;' /etc/nginx/nginx.conf
cp /etc/php/8.0/fpm/pool.d/yoursite.com.conf /etc/php/8.0/fpm/yoursite.com-ORIG.conf
sed --in-place '/pm = dynamic/d' /etc/php/8.0/fpm/pool.d/yoursite.com.conf
sed --in-place '/pm.max_children = /d' /etc/php/8.0/fpm/pool.d/yoursite.com.conf
sed -i -e '$arequest_terminate_timeout = 300' /etc/php/8.0/fpm/pool.d/yoursite.com.conf
sed -i -e '$apm = ondemand' /etc/php/8.0/fpm/pool.d/yoursite.com.conf
sed -i -e '$apm.max_children = 75' /etc/php/8.0/fpm/pool.d/yoursite.com.conf
sed -i -e '$apm.process_idle_timeout = 10s' /etc/php/8.0/fpm/pool.d/yoursite.com.conf
cp /usr/local/hestia/install/deb/templates/web/php-fpm/default.tpl /usr/local/hestia/install/deb/templates/web/php-fpm/default-ORIG.tpl
sed --in-place '/pm.max_children = /d' /usr/local/hestia/install/deb/templates/web/php-fpm/default.tpl
sed -i -e '$apm.max_children = 75' /usr/local/hestia/install/deb/templates/web/php-fpm/default.tpl
cp /usr/local/hestia/install/deb/php-fpm/multiphp.tpl /usr/local/hestia/install/deb/php-fpm/multiphp-ORIG.tpl
sed --in-place '/pm.max_children = /d' /usr/local/hestia/install/deb/php-fpm/multiphp.tpl
sed -i -e '$apm.max_children = 75' /usr/local/hestia/install/deb/php-fpm/multiphp.tpl
cp /etc/mysql/my.cnf /etc/mysql/my-ORIG.cnf
sed -i 's/max_connections.*/max_connections=600/' /etc/mysql/my.cnf
$ service mysqld restart or service mariadb restart
$ service nginx restart
$ service php8.0-fpm restart
$ rm /home/admin/web/fs1.yourdomain.com/public_html/index.html
$ rm /home/admin/web/fs1.yourdomain.com/public_html/robots.txt
$ rsync -avh --progress --exclude 'files/*' --exclude 'logs/*' --exclude 'cache/*' --exclude '___OLD_SITE/*' /home/admin/web/yourdomain.com/public_html/ [email protected]:/home/admin/web/fs1.yourdomain.com/public_html
define("_CONFIG_SITE_HOST_URL", "fs1.yourdomain.com");
define("_CONFIG_SITE_FULL_URL", "fs1.yourdomain.com");
define("_CONFIG_DB_HOST", "1.1.1.1"); /* database ip address */
$ nano /etc/mysql/mariadb.conf.d/50-server.cnf
#bind-address = 127.0.0.1
$ mysql -uroot
> CREATE USER 'yeti_username'@'1.2.3.4' IDENTIFIED BY 'yeti_password';
> GRANT ALL ON *.* TO 'yeti_username'@'1.2.3.4';
> FLUSH PRIVILEGES;
$ service mysqld restart or service mariadb restart