diff --git a/.gitignore b/.gitignore
index 6701a887..fe0574ad 100644
--- a/.gitignore
+++ b/.gitignore
@@ -4,3 +4,6 @@
*.gz
.vscode
.DS_Store
+data
+conf
+log
\ No newline at end of file
diff --git a/Changelog.md b/Changelog.md
index 3f5fb37b..617bc9c3 100644
--- a/Changelog.md
+++ b/Changelog.md
@@ -1,28 +1,111 @@
-Version 0.9.9-0-4 [27-Jun-2023]
+Version 0.9.9-0-13 [2025-08-15]
+==================================================
+* Improvement: Activating FileManager licence for all users (credits to Official VestaCP)
+* Introducing a malware cleaning set of tools: v-install-wordfence-cli, v-desinfect-wordpress, v-fix-wordpress-core, v-change-database-password-for-wordpress, v-change-wordpress-admin-passwords, v-delete-inactive-wordpress-plugins-and-themes, v-delete-wordpress-uploads-php-files) (credits to isscbta)
+* Improvement: Added support for PHP 8.3 and 8.4
+* SRS support for Exim4 (v-add-srs-support-to-exim) (credits to HestiaCP)
+* Security: Ensuring that PHP files are visible only to the account they belong to - setting chmod 600 for all .php and .env files (also added as admin cronjob - v-fix-website-permissions-for-all-websites-only-php)
+* Added cronjob for disk usage snapshot (size of each folder) to see what folder is growing every day (v-df-snapshot-make, v-df-snapshot-diff [some-day-snapshot] [some-other-day-snapshot])
+* Bugfix: SSL fix for Apache 2.4.65+ (fix for '421 Misdirected Request')
+* Bugfix: vst-install-debian.sh: ability to install MySQL 8 on Debian 12
+* Improvement: Update nginx block-firewall.conf when user blocks 80,443 ports for some IPv4 address in the Firewall section of the admin panel
+* Improvement: v-install-wordpress: Support for IDN format domains
+* Security: Adding ProFTPD jail rule to Fail2Ban
+* Introducing: v-make-main-apache-log - making one log file for PHP requests for all websites
+* Security: Introducing a new command: v-fix-php-ini-disable-functions
+* Improvement: Introducing myVesta rules for SpamAssassin (enhancing spam filtering)
+* Improvement: When deleting a domain, also delete the database if the domain has a database
+* Bugfix: Removing temporary Docker container network interfaces from RRD
+* Introducing v-run-wp-cli-myvesta that knows the correct terminal width
+* Introducing a new command: v-cd-www alias for v-change-dir-www
+* Introducing a new command: v-clear-fail2ban
+* Introducing a new command: v-get-dns-config (to print zone file in bind9 format)
+* Introducing a DISABLE_IP_CHECK as vesta.conf variable (if logged-in user is getting a new IPv4 address every minute)
+* Security: Introducing a parse_object_kv_list_non_eval() function in main.sh, to avoid the evil eval command
+* Security: Enhance package validation, in v-change-user-package 'eval' replaced with 'parse_object_kv_list_non_eval'
+* Improvement: Replacing all WordPress scripts to use 'v-run-wp-cli' instead of 'wp'
+* Improvement: v-install-wordpress: Almost always use https
+* Improvement: Skip the prompt to continue during myVesta installation if the administrator has set all required variables in the command line
+* Security: Jailing v-run-wp-cli (running WP-CLI as user, added open_basedir, disabling shell_exec() and other dangerous PHP functions)
+* Security: v-commander: removing the ability to set a root password
+* Bugfix: DKIM record deletion command in v-delete-mail-domain-dkim script
+* Adding FTP / SFTP port for Remote Backup (credits to ikheetjeff)
+* Introducing a new command: v-delete-mails - delete emails older than N days (credits to isscbta)
+* Introducing new commands: v-blacklist-email-domain, v-blacklist-email-account, v-whitelist-email-domain, v-whitelist-email-account (credits to isscbta)
+* Bugfix: v-move-folder-and-make-symlink: use 'mv' instead of 'rsync'
+* Improvement: Calculate the size of directories on /hdd too
+* Bugfix: v-move-domain-and-database-to-account: Update wordfence-waf.php
+* Bugfix: v-add-letsencrypt-domain: Detecting valid status on wildcard variant
+* Bugfix: db.sh and v-clone-website: mysqldump --max_allowed_packet=1024M
+* Bugfix: web/index.php: Prevent recreation of token by shitty browser add-ons
+* Bugfix: v-restore-user: permissions fix while restoring backup
+* Bugfix: Add some loops due to 403 errors during LE request in some random cases
+* Improvement: v-clone-website: adding --EXCLUDE_UPLOADS parameter
+* Bugfix: vst-install-debian.sh - removing phppgadmin
+* Bugfix: v-update-firewall: $FIREWALL_STATEFUL conf variable (for Infomaniak VPS servers)
+* Bugfix: Awstats template for all systems does not have a closed bracket in line 27 (credits to gkirde)
+* Bugfix: Update v-import-cpanel-backup - removing /*!999999\- enable the sandbox mode */
+* Bugfix: Small PHP syntax fixes in the admin panel
+* Introducing nginx template 'wprocket-webp-express-force-https' (credits to Luka Paunovic)
+* Improvement: Added functions to check if a domain or user is unsuspended in main.sh
+* Introducing a new command: v-update-document-errors-files
+* Improvement: new v-backup-user-now command does backup even if the system Load Average is above the limit, or the administrator configured backups to perform only at night
+* Improvement: v-install-wp-cli and v-install-wp-cli-myvesta - automatically updates if wp-cli is 30 days old
+* Bugfix: Check for SSL certificate existence before deleting web domain SSL in v-install-unsigned-ssl
+* Improvement: v-install-wordpress: avoid changing nginx proxy template in apache-less variant
+* Added to .gitignore excludes for 'data', 'conf', and 'log' folders
+* And many other minor bugfixes and improvements...
+
+Version 0.9.9-0-12 [2025-02-28]
+==================================================
+* SpamHaus DNSBL removed from exim4
+* A lot of small bugs fixed
+
+Version 0.9.9-0-11 [2024-05-30]
+==================================================
+* Introducing v-run-wp-cli command ( @isscbta )
+* Introducing v-add-wordpress-admin command ( @isscbta )
+* Few bugs fixed
+
+Version 0.9.9-0-10 [2024-04-11]
+==================================================
+* Introducing v-edit-php-ini command ( @isscbta )
+* Introducing v-edit-domain-php-ini command ( @isscbta )
+
+Version 0.9.9-0-9 [2024-04-05]
+==================================================
+* Get quick info about a banned IP (Host, Banlist, Location) (many thanks to @VasilisParaschos )
+* Few bugs fixed
+
+Version 0.9.9-0-5 to 0.9.9-0-8
+==================================================
+* Few bugs fixed
+
+Version 0.9.9-0-4 [2023-06-27]
==================================================
* Support for Debian 12 ( in mutual cooperation with @HestiaCP )
-Version 0.9.9-0-2 [12-Jun-2023]
+Version 0.9.9-0-2 [2023-06-12]
==================================================
* Hosting panel UI perfomance fix
-Version 0.9.9-0 [05-Jun-2023]
+Version 0.9.9-0 [2023-06-05]
==================================================
* Redesign of hosting panel
* Fix for WP_CACHE_KEY_SALTs in v-clone-website command
* Fix for "Helo name contains a ip address" in Exim4
* Fix for Exim4 for punycode domains (in collaboration with @HestiaCP )
-Version 0.9.8-26-62 [05-Apr-2023]
+Version 0.9.8-26-62 [2023-04-05]
==================================================
* Fix for LetsEncrypt Asynchronous Order Finalization (in collaboration with @HestiaCP )
-Version 0.9.8-26-61 [04-Apr-2023]
+Version 0.9.8-26-61 [2023-04-04]
==================================================
* Many bugfixes
* Hotfix for LetsEncrypt to prevent Apache falling
-Version 0.9.8-26-60 [12-Feb-2023]
+Version 0.9.8-26-60 [2023-02-12]
==================================================
* New script: v-commander (useful for maintaining the server)
* New script: v-activate-rocket-nginx (serve WP-Rocket cache directly from nginx)
@@ -30,7 +113,7 @@ Version 0.9.8-26-60 [12-Feb-2023]
* v-clone-website: By default cloning to database: user_domain_com (instead of cloning to database: user_old_db_migrated)
* Many minor bugfixes
-Version 0.9.8-26-59 [01-Feb-2023]
+Version 0.9.8-26-59 [2023-02-01]
==================================================
* Support for PHP 8.2
* New script: v-move-folder-and-make-symlink
@@ -38,82 +121,82 @@ Version 0.9.8-26-59 [01-Feb-2023]
* v-install-wordpress: Installing WordPress to user_domain_com database instead of installing to user_wp database
* Many minor bugfixes
-Version 0.9.8-26-58 [12-Jul-2022]
+Version 0.9.8-26-58 [2022-07-12]
==================================================
* [Security] hash_equals() in /reset/mail/ (credits to @divinity76 )
* Avoid out-of-memory while downloading large log files from panel (credits to @divinity76 )
* Fix for an boring PHP Notice in vesta-php
-Version 0.9.8-26-57 [06-Jul-2022]
+Version 0.9.8-26-57 [2022-07-06]
==================================================
* Fix for GMail SMTP timeouts on Debian11
* [Security] Fix for Local Sed Injection Vulnerability ( credits to @cleemy-desu-wayo )
-Version 0.9.8-26-56 [28-May-2022]
+Version 0.9.8-26-56 [2022-05-28]
==================================================
* Adding Barracuda RBL to SpamAssassin
* Fixing insane HTML form bug in List backup items page
* Script for easy adding second IP address for SMTP authenticated users only (v-make-separated-ip-for-email)
-Version 0.9.8-26-55 [26-Apr-2022]
+Version 0.9.8-26-55 [2022-04-26]
==================================================
* Support for MySQL 8
* [Security] Preventing brute-force resetting password (thanks to HestiaCP @hestiacp for fix)
* Many minor bugfixes
-Version 0.9.8-26-54 [17-Dec-2021]
+Version 0.9.8-26-54 [2021-12-17]
==================================================
* Checking if FreshClam is started after installation
-Version 0.9.8-26-53 [12-Dec-2021]
+Version 0.9.8-26-53 [2021-12-12]
==================================================
* Support for PHP 8.1
* Function to ensure that pool.d folders are not empty
-Version 0.9.8-26-52 [23-Nov-2021]
+Version 0.9.8-26-52 [2021-11-23]
==================================================
* Fix for not to match wildcard "*domains" and "databases*" while restoring
* Added memcached to v-list-sys-services
-Version 0.9.8-26-51 [14-Nov-2021]
+Version 0.9.8-26-51 [2021-11-14]
==================================================
* Many fixes for "List services" page (v-list-sys-services function)
-Version 0.9.8-26-50 [07-Nov-2021]
+Version 0.9.8-26-50 [2021-11-07]
==================================================
* Many small bugfixes and CSRF fixes
-Version 0.9.8-26-49 [17-Jul-2021]
+Version 0.9.8-26-49 [2021-07-17]
==================================================
* Support for Debian 11
-Version 0.9.8-26-48 [11-Jul-2021]
+Version 0.9.8-26-48 [2021-07-11]
==================================================
* Fixed two bugs in LetsEncrypt generating process
-Version 0.9.8-26-47 [30-May-2021]
+Version 0.9.8-26-47 [2021-05-30]
==================================================
* Enabling TLS for ProFTPD FTPS
* More logical "Restore backup" template
-Version 0.9.8-26-46 [17-Apr-2021]
+Version 0.9.8-26-46 [2021-04-17]
==================================================
* [Feature] Updating CloudFlare IP addresses
-Version 0.9.8-26-45 [13-Apr-2021]
+Version 0.9.8-26-45 [2021-04-13]
==================================================
* [Feature] Logging whole LetsEncrypt process to /usr/local/vesta/log/letsencrypt.log and /usr/local/vesta/log/letsencrypt_cron.log
* [Feature] Warn admin once (by sending email) if LetsEncrypt renewing failed for server hostname
* [Bugfix] Correct truncating of CA LetsEncrypt certificate (thanks to HestiaCP @hestiacp for fix)
-Version 0.9.8-26-44 [04-Apr-2021]
+Version 0.9.8-26-44 [2021-04-04]
==================================================
* [Security] Preventing denial-of-service in openssl library in vesta-nginx service (CVE-2021-3449)
* [Security] Preventing admin to install non-vesta packages from vesta admin panel user interface (Credits to: Numan Türle @numanturle)
* [Bugfix] Preventing multiple execution of v-backup-users
* [UserInterface] CSS fix for Apache status table (Credits to: Milos Spasic)
-Version 0.9.8-26-43 [15-Mar-2021]
+Version 0.9.8-26-43 [2021-03-15]
==================================================
* [Security] fix for: CSRF remote code execution in UploadHandler.php - CVE-2021-28379 (Credits to: Fady Osman @fady_othman)
* [Security] fix for: Local privilege escalation from user account to admin account via v-add-web-domain (Credits to: Two independent security researchers, Marti Guasch Jiménez and Francisco Andreu Sanz, working with the SSD Secure Disclosure program) (and also thanks to HestiaCP @hestiacp for fix)
@@ -123,62 +206,62 @@ Version 0.9.8-26-43 [15-Mar-2021]
* [Security] fix for: Admin to root escalation in v-activate-vesta-license (Credits to: Numan Türle @numanturle)
* [Security] Ensure HTML will not be displayed in list log page (Credits to: Kristan Kenney @kristankenney, thanks to HestiaCP @hestiacp for fix)
-Version 0.9.8-26-42 [26-Feb-2021]
+Version 0.9.8-26-42 [2021-02-26]
==================================================
* [Feature] Support for PHP 8.0, see: https://forum.myvestacp.com/viewtopic.php?f=18&t=52
* [Bugfix] Making sure Apache is in mpm_event mode
-Version 0.9.8-26-41 [11-Feb-2021]
+Version 0.9.8-26-41 [2021-02-11]
==================================================
* Few bugfixes
-Version 0.9.8-26-40 [08-Feb-2021]
+Version 0.9.8-26-40 [2021-02-08]
==================================================
* Few bugfixes
-Version 0.9.8-26-39 [12-Dec-2020]
+Version 0.9.8-26-39 [2020-12-12]
==================================================
* [Security] Fixing useless issue with tokens in "download backup" and "loginas" functions (thanks to HestiaCP for fixes)
* [Security] Fixing XSS in /list/rrd/?period= value
-Version 0.9.8-26-38 [05-Dec-2020]
+Version 0.9.8-26-38 [2020-12-05]
==================================================
* [Security] Fixing Apache status public access (thanks to HestiaCP for letting us know)
-Version 0.9.8-26-37 [26-Oct-2020]
+Version 0.9.8-26-37 [2020-10-26]
==================================================
* [Bugfix] Fixing LetsEncrypt deprecated GET method for ACME v2 (thanks to @moucho)
* [Bugfix] Fixing Roundcube to send via authenticated SMTP user instead via php
-Version 0.9.8-26-36 [10-Sep-2020]
+Version 0.9.8-26-36 [2020-09-10]
==================================================
* [Bugfix] Checking necessary available disk space before doing backup
* [Security] Disabling login with 'root'
-Version 0.9.8-26-35 [23-Aug-2020]
+Version 0.9.8-26-35 [2020-08-23]
==================================================
* [Feature] Limiting max recipients per email to 15, in order to prevent mass spamming
* [Bugfix] While restoring backup, only exclude logs folder from root, not in public_html
-Version 0.9.8-26-34 [19-Aug-2020]
+Version 0.9.8-26-34 [2020-08-19]
==================================================
* [Bugfix] Split long DNS TXT entries into 255 chunks
-Version 0.9.8-26-33 [16-Aug-2020]
+Version 0.9.8-26-33 [2020-08-16]
==================================================
* [Feature] Ability to set some domain to send emails from another IP (command: v-make-separated-ip-for-email-domain)
-Version 0.9.8-26-32 [02-Aug-2020]
+Version 0.9.8-26-32 [2020-08-02]
==================================================
* [Feature] v-replace-in-file command introduced
* [Security] Making sure new myVesta commands can be called only by root
-Version 0.9.8-26-31 [30-Jul-2020]
+Version 0.9.8-26-31 [2020-07-30]
==================================================
* [Feature] v-import-cpanel-backup command moved to vesta-bin folder (becoming standard myVesta command)
* Starting to log auto-update output
-Version 0.9.8-26-30 [26-Jul-2020]
+Version 0.9.8-26-30 [2020-07-26]
==================================================
* New ASCII logo in installer
* Deleted favicon when user don't know secret-url of hosting panel
@@ -186,14 +269,14 @@ Version 0.9.8-26-30 [26-Jul-2020]
* [bugfix] Minor fix of URL for templates in v-update-dns-templates
* [bugfix] Minor fixes in installer
-Version 0.9.8-26-29 [21-Jul-2020]
+Version 0.9.8-26-29 [2020-07-21]
==================================================
* [Feature] v-clone-website command moved to vesta-bin folder (becoming standard myVesta command)
* [Feature] v-migrate-site-to-https command moved to vesta-bin folder (becoming standard myVesta command)
* [Bugfix] Fix for ClamAV socket
* Changing Vesta to myVesta in title of hosting panel pages
-Version 0.9.8-26-28 [15-Jul-2020]
+Version 0.9.8-26-28 [2020-07-15]
==================================================
* [Feature] v-install-wordpress command introduced
* [Feature] v-move-domain-and-database-to-account command introduced
@@ -201,37 +284,37 @@ Version 0.9.8-26-28 [15-Jul-2020]
* [Bugfix] Fix for LetsEncrypt issuing in apache-less variant (nginx + php-fpm variant)
* [Bugfix] Fix for configuring phpMyAdmin DB in apache-less variant (nginx + php-fpm variant)
-Version 0.9.8-26-27 [05-Jul-2020]
+Version 0.9.8-26-27 [2020-07-05]
==================================================
* [Feature] Admins now see changelog when they open myVesta panel after myVesta get updated (changelog will dissapear on next refresh)
* [Bugfix] Better control of opened SMTP concurrent connections (preventing denial-of-service of SMTP) on fresh installed servers - https://github.com/myvesta/vesta/commit/c57b15b5daca2a0ea88ee6a89a2ff5a4ef47d2a3
* Second tuning of php-fpm pool.d config files (perfomances and limits)
-Version 0.9.8-26-26 [27-Jun-2020]
+Version 0.9.8-26-26 [2020-06-27]
==================================================
* [Feature] Self-signed SSL will be automaticaly added when you add new domain (CloudFlare is fine with that, you don't need LetsEncrypt anymore if you use CloudFlare as reverse-proxy(CDN+Firewall), just set "Full" in SSL section on CloudFlare)
* [Feature] Script for adding self-signed SSL to desired domain [v-install-unsigned-ssl]
* From now, on fresh installed server, default backup cron goes at Saturday at 01 AM (instead of everyday at 05 AM)
* New favicon for hosting panel
-Version 0.9.8-26-25 [23-Jun-2020]
+Version 0.9.8-26-25 [2020-06-23]
==================================================
* [Security] Fixing unnecessary slash in nginx configs for phpmyadmin and roundcube (Credits to Bernardo Berg @bberg1984 for finding this issue!)
* [Security] Adding escapeshellarg on few more places in php code (Credits to Talha Günay and @Lupul for finding these places)
-Version 0.9.8-26-24 [22-Jun-2020]
+Version 0.9.8-26-24 [2020-06-22]
==================================================
* [Bugfix] nginx + php-fpm installer variant now finally works
-Version 0.9.8-26-23 [14-Jun-2020]
+Version 0.9.8-26-23 [2020-06-14]
==================================================
* Adding label that LetsEncrypt can be added when you Edit domain
-Version 0.9.8-26-22 [13-Jun-2020]
+Version 0.9.8-26-22 [2020-06-13]
==================================================
* [Bugfix] Checking (in order to delete) php7.4 pool config file while deleting domain
-Version 0.9.8-26-21 [13-Jun-2020]
+Version 0.9.8-26-21 [2020-06-13]
==================================================
* [Feature] Blocking executable files inside archives in received emails (ClamAV)
* [Bugfix] Removing ability to schedule LetsEncrypt issuing while adding new domain (because it can fall in infinite loop whole day)
@@ -240,82 +323,82 @@ Version 0.9.8-26-21 [13-Jun-2020]
* [Bugfix] Script that removes depricated 'ssl on;' in nginx templates
* [Security] Ensure UPDATE_SSL_SCRIPT is not set in some config files
-Version 0.9.8-26-20 [01-Jun-2020]
+Version 0.9.8-26-20 [2020-06-01]
==================================================
* [Bugfix] Script that will ensure that Apache2 will always stay in mpm_event mode
* [Bugfix] Ensure config files will not be overwritten while updating vesta-nginx package
* [Bugfix] Fixing URL in v-update-web-templates script
* [Feature] Additional rates for nginx anti-denial-of-service templates
-Version 0.9.8-26-19 [15-May-2020]
+Version 0.9.8-26-19 [2020-05-15]
==================================================
* [Bugfix] Do not match subdomains while restoring domain [v-restore-user]
-Version 0.9.8-26-18 [15-May-2020]
+Version 0.9.8-26-18 [2020-05-15]
==================================================
* [Bugfix] Fixing NS parameters in v-add-dns-on-web-alias
-Version 0.9.8-26-17 [15-May-2020]
+Version 0.9.8-26-17 [2020-05-15]
==================================================
* [Bugfix] Reverting default clamav socket path
* [Bugfix] Put mail_max_userip_connections = 50 in dovecot
-Version 0.9.8-26-16 [15-May-2020]
+Version 0.9.8-26-16 [2020-05-15]
==================================================
* [Bugfix] Allow quick restarting of nginx if acme-challenge should be added many times
* [Bugfix] Enabling email notification to fresh installed servers about backup success status
* [Bugfix] Timeout 10 sec for apache2 status
-Version 0.9.8-26-15 [09-May-2020]
+Version 0.9.8-26-15 [2020-05-09]
==================================================
* [Feature] nginx templates that can prevent denial-of-service on your server
* First tuning php-fpm pool.d config files (perfomances and limits)
* New logo
-Version 0.9.8-26-14 [08-May-2020]
+Version 0.9.8-26-14 [2020-05-08]
==================================================
* v-clone-website script switched to parameters
* Display new version in console while updating myVesta
-Version 0.9.8-26-13 [07-May-2020]
+Version 0.9.8-26-13 [2020-05-07]
==================================================
* [Feature] Put build date and version in right-bottom corner of control panel
-Version 0.9.8-26-12 [07-May-2020]
+Version 0.9.8-26-12 [2020-05-07]
==================================================
* [Feature] Put build date and version while compiling myVesta
* [Feature] Office365 DNS template
* [Feature] Yandex DNS template
* ProFTPD MaxIstances = 100 for fresh installed servers
-Version 0.9.8-26-11 [01-May-2020]
+Version 0.9.8-26-11 [2020-05-01]
==================================================
* [Feature] Skipping LE renewing after 7 failed attempts
* [Bugfix] Keep conf files during auto-update
* [Bugfix] Do not restart apache while preparing letsencrypt acme challenge
* [Bugfix] Set ALLOW_BACKUP_ANYTIME='yes' for fresh installed servers
-Version 0.9.8-26-10 [11-Apr-2020]
+Version 0.9.8-26-10 [2020-04-11]
==================================================
* [Feature] Creating v-normalize-restored-user script (normalize NS1, NS2 and IP of account that is backuped on other server and restored on this server)
* Tweak for hostname FPM conf
* [Security] Forbid changing root password (Credits to Alexandre ZANNI, Orange Cyberdefense, https://cyberdefense.orange.com)
* [Security] Importing system enviroment in v-change-user-password (Credits to Alexandre ZANNI, Orange Cyberdefense, https://cyberdefense.orange.com)
-Version 0.9.8-26-9 [23-Mar-2020]
+Version 0.9.8-26-9 [2020-03-23]
==================================================
* [Security] Preventing manipulation with $SERVER['HTTP_HOST'] (Credits to @mdisec - Managing Partner of PRODAFT / INVICTUS A.Ş. Master ninja at pentest.blog)
-Version 0.9.8-26-8 [23-Mar-2020]
+Version 0.9.8-26-8 [2020-03-23]
==================================================
* [Security] Temporary fix for parsing backup conf (Credits to @dreiggy - https://pentest.blog/vesta-control-panel-second-order-remote-code-execution-0day-step-by-step-analysis/)
-Version 0.9.8-26-7 [18-Mar-2020]
+Version 0.9.8-26-7 [2020-03-18]
==================================================
* [Bugfix] Fix that avoid LetsEncrypt domain validation timeout
* [Bugfix] Set timeout in v-list-sys-web-status script
-Version 0.9.8-26-6 [21-Feb-2020]
+Version 0.9.8-26-6 [2020-02-21]
==================================================
* [Bugfix] mail-wrapper.php from now works
* [Feature] Introducing NOTIFY_ADMIN_FULL_BACKUP, email notification about backup success status
@@ -323,7 +406,7 @@ Version 0.9.8-26-6 [21-Feb-2020]
* [Feature] Introducing force-https-webmail-phpmyadmin nginx template
* [Feature] Trigger for /root/update_firewall_custom.sh
-Version 0.9.8-26-5 [10-Feb-2020]
+Version 0.9.8-26-5 [2020-02-10]
==================================================
* [Security] sudoers fix for Debian10
* [Feature] [Script that will migrate your site from http to https, replacing http to https URLs in database](https://github.com/myvesta/vesta/blob/master/src/deb/for-download/tools/v-migrate-site-to-https)
@@ -332,7 +415,7 @@ Version 0.9.8-26-5 [10-Feb-2020]
* [Bugfix] Roundcube force https
* [Bugfix] Exim compatibility with Loopia for Debian10
-Version 0.9.8-26-4 [07-Jan-2020]
+Version 0.9.8-26-4 [2020-01-07]
==================================================
* [Feature] Allow whitelisting specific IP for /api/
* [Feature] Allow whitelisting specific IP to avoid secret_url
@@ -340,11 +423,11 @@ Version 0.9.8-26-4 [07-Jan-2020]
* [Bugfix] apparmor install fix again
* [Bugfix] Turning off MariaDB SQL strict mode
-Version 0.9.8-26-3 [26-Nov-2019]
+Version 0.9.8-26-3 [2019-11-26]
==================================================
* [Bugfix] Better check if session cron already added
-Version 0.9.8-26-2 [15-Nov-2019]
+Version 0.9.8-26-2 [2019-11-15]
==================================================
* [Feature] Support for sub-sub-sub-sub versions :))
* [Bugfix] Support for longer username of email accounts
@@ -352,7 +435,7 @@ Version 0.9.8-26-2 [15-Nov-2019]
* [Bugfix] Trying to fix ClamAV broken socket
* Moving to myvestacp.com
-Version 0.9.8-26 [28-Sep-2019]
+Version 0.9.8-26 [2019-09-28]
==================================================
* [Bugfix] Let's Encrypt HTTP/2 support (by @serghey-rodin)
* [Bugfix] Fixing broken autoreply output
diff --git a/README.md b/README.md
index 71d9f5a9..a2e7a3de 100644
--- a/README.md
+++ b/README.md
@@ -23,7 +23,7 @@
Features of myVesta
-
Support for Debian 10 and 11 (Debian 11 is recommended, but previous Debian releases are also supported)
+
Support for Debian 11 and 12 (Debian 12 is recommended, but previous Debian releases are also supported)
Support for MySQL 8
nginx templates that can prevent denial-of-service on your server
+ It seems that the page you were trying to reach does not exist anymore, or maybe it has just moved.
+ You can start again from the home or go back to previous page.
+
+
+
diff --git a/install/debian/13/templates/web/webalizer/webalizer.tpl b/install/debian/13/templates/web/webalizer/webalizer.tpl
new file mode 100644
index 00000000..068adcfb
--- /dev/null
+++ b/install/debian/13/templates/web/webalizer/webalizer.tpl
@@ -0,0 +1,110 @@
+HostName %domain_idn%
+LogFile /var/log/%web_system%/domains/%domain%.log
+OutputDir %home%/%user%/web/%domain%/stats
+HistoryName %home%/%user%/web/%domain%/stats/%domain%.hist
+Incremental yes
+IncrementalName %home%/%user%/web/%domain%/stats/%domain%.current
+PageType htm*
+PageType cgi
+PageType php
+PageType shtml
+DNSCache /var/lib/webalizer/dns_cache.db
+DNSChildren 10
+Quiet yes
+FoldSeqErr yes
+IndexAlias index.php
+HideURL *.gif
+HideURL *.GIF
+HideURL *.jpg
+HideURL *.JPG
+HideURL *.png
+HideURL *.PNG
+HideURL *.ra
+SearchEngine abcsearch. terms=
+SearchEngine alexa. q=
+SearchEngine alltheweb. q=
+SearchEngine alltheweb. query=
+SearchEngine alot. q=
+SearchEngine altavista. q=
+SearchEngine aolsearch. query=
+SearchEngine aport.ru r=
+SearchEngine ask. q=
+SearchEngine atlas.cz q=
+SearchEngine bbc. q=
+SearchEngine bing. q=
+SearchEngine blingo. q=
+SearchEngine blogs.yandex.ru text=
+SearchEngine btopenworld query=
+SearchEngine buscador.ya.com q=
+SearchEngine busca. q=
+SearchEngine business. query=
+SearchEngine centrum.cz q=
+SearchEngine chiff. q=
+SearchEngine clusty. query=
+SearchEngine comcast. q=
+SearchEngine crawler. q=
+SearchEngine cuil. q=
+SearchEngine dmoz. search=
+SearchEngine dogpile.com q=
+SearchEngine dpxml qkw=
+SearchEngine eureka. searchword=
+SearchEngine euroseek. string=
+SearchEngine exalead. q=
+SearchEngine excite search=
+SearchEngine ezilon. q=
+SearchEngine fastbrowsersearch. q=
+SearchEngine feedster.com q=
+SearchEngine fireball.de q=
+SearchEngine fireball. keyword=
+SearchEngine freeserve. q=
+SearchEngine gigablast. q=
+SearchEngine gogo.ru q=
+SearchEngine go.mail.ru q=
+SearchEngine google. q=
+SearchEngine hakia. q=
+SearchEngine hotbot. query=
+SearchEngine infoseek. qt=
+SearchEngine iwon searchfor=
+SearchEngine ixquick.com query=
+SearchEngine joeant. keywords=
+SearchEngine jyxo.cz s=
+SearchEngine looksmart. key=
+SearchEngine lycos. query=
+SearchEngine mamma. q=
+SearchEngine metacrawler q=
+SearchEngine msn. MT=
+SearchEngine msxml qkw=
+SearchEngine mysearch. searchfor=
+SearchEngine mywebsearch. searchfor=
+SearchEngine netscape. q=
+SearchEngine nigma.ru q=
+SearchEngine northernlight. qr=
+SearchEngine ntlworld. q=
+SearchEngine orange. q=
+SearchEngine overture. Keywords=
+SearchEngine punto.ru text=
+SearchEngine rambler. keyword=
+SearchEngine search.aol. q=
+SearchEngine search.babylon. q=
+SearchEngine search.centrum. phrase=
+SearchEngine search.conduit. q=
+SearchEngine search.earthlink q=
+SearchEngine search.icq. q=
+SearchEngine search.live.com q=
+SearchEngine search.rambler.ru words=
+SearchEngine search.winamp. q=
+SearchEngine searchy. q=
+SearchEngine seznam.cz w=
+SearchEngine snap. query=
+SearchEngine teoma. q=
+SearchEngine teradex.com q=
+SearchEngine ukplus key=
+SearchEngine verizon. q=
+SearchEngine virginmedia. q=
+SearchEngine voila. rdata=
+SearchEngine webcrawler searchText=
+SearchEngine web.search.naver. query=
+SearchEngine wisenut q=
+SearchEngine yahoo. p=
+SearchEngine yandex. text=
+SearchEngine yodao. q=
diff --git a/install/debian/13/vsftpd/vsftpd.conf b/install/debian/13/vsftpd/vsftpd.conf
new file mode 100644
index 00000000..1ca1a992
--- /dev/null
+++ b/install/debian/13/vsftpd/vsftpd.conf
@@ -0,0 +1,26 @@
+anonymous_enable=NO
+local_enable=YES
+write_enable=YES
+local_umask=022
+anon_umask=022
+anon_upload_enable=NO
+dirmessage_enable=YES
+xferlog_enable=YES
+connect_from_port_20=YES
+xferlog_std_format=YES
+dual_log_enable=YES
+chroot_local_user=YES
+listen=YES
+pam_service_name=vsftpd
+userlist_enable=NO
+tcp_wrappers=YES
+force_dot_files=YES
+ascii_upload_enable=YES
+ascii_download_enable=YES
+#allow_writable_chroot=YES
+allow_writeable_chroot=YES
+seccomp_sandbox=NO
+pasv_enable=YES
+pasv_max_port=12100
+pasv_min_port=12000
+use_localtime=YES
diff --git a/install/debian/8/exim/dnsbl.conf b/install/debian/8/exim/dnsbl.conf
index 5166b255..279bafcd 100644
--- a/install/debian/8/exim/dnsbl.conf
+++ b/install/debian/8/exim/dnsbl.conf
@@ -1,2 +1 @@
bl.spamcop.net
-zen.spamhaus.org
diff --git a/install/debian/8/templates/web/awstats/awstats.tpl b/install/debian/8/templates/web/awstats/awstats.tpl
index 9a92e0fd..6bb51c50 100755
--- a/install/debian/8/templates/web/awstats/awstats.tpl
+++ b/install/debian/8/templates/web/awstats/awstats.tpl
@@ -24,7 +24,7 @@ PurgeLogFile=0
ArchiveLogRecords=0
KeepBackupOfHistoricFiles=1
DefaultFile="index.php index.html"
-SkipHosts="127.0.0.1
+SkipHosts="127.0.0.1"
SkipUserAgents=""
SkipFiles=""
SkipReferrersBlackList=""
diff --git a/install/debian/9/exim/dnsbl.conf b/install/debian/9/exim/dnsbl.conf
index 5166b255..279bafcd 100644
--- a/install/debian/9/exim/dnsbl.conf
+++ b/install/debian/9/exim/dnsbl.conf
@@ -1,2 +1 @@
bl.spamcop.net
-zen.spamhaus.org
diff --git a/install/debian/9/templates/web/awstats/awstats.tpl b/install/debian/9/templates/web/awstats/awstats.tpl
index 9a92e0fd..6bb51c50 100755
--- a/install/debian/9/templates/web/awstats/awstats.tpl
+++ b/install/debian/9/templates/web/awstats/awstats.tpl
@@ -24,7 +24,7 @@ PurgeLogFile=0
ArchiveLogRecords=0
KeepBackupOfHistoricFiles=1
DefaultFile="index.php index.html"
-SkipHosts="127.0.0.1
+SkipHosts="127.0.0.1"
SkipUserAgents=""
SkipFiles=""
SkipReferrersBlackList=""
diff --git a/install/vst-install-debian.sh b/install/vst-install-debian.sh
index e7c9a0a9..98887225 100755
--- a/install/vst-install-debian.sh
+++ b/install/vst-install-debian.sh
@@ -20,14 +20,26 @@ codename="$(cat /etc/os-release |grep VERSION= |cut -f 2 -d \(|cut -f 1 -d \))"
vestacp="$VESTA/install/$VERSION/$release"
ARCH="amd64"
-if [ "$release" -eq 12 ]; then
+if [ "$release" -eq 13 ]; then
software="nginx apache2 apache2-utils
libapache2-mod-fcgid php-fpm php
php-common php-cgi php-mysql php-curl php-fpm php-pgsql awstats
vsftpd proftpd-basic bind9 exim4 exim4-daemon-heavy
clamav-daemon spamassassin dovecot-imapd dovecot-pop3d roundcube-core
roundcube-mysql roundcube-plugins mariadb-server mariadb-common
- mariadb-client postgresql postgresql-contrib phppgadmin phpmyadmin mc
+ mariadb-client postgresql postgresql-contrib phpmyadmin mc
+ flex whois git idn zip sudo bc ftp lsof ntpdate rrdtool quota
+ e2fslibs bsdutils e2fsprogs curl imagemagick fail2ban dnsutils
+ bsdmainutils cron vesta vesta-nginx vesta-php expect libmail-dkim-perl
+ unrar-free vim-common net-tools unzip iptables xxd spamd"
+elif [ "$release" -eq 12 ]; then
+ software="nginx apache2 apache2-utils
+ libapache2-mod-fcgid php-fpm php
+ php-common php-cgi php-mysql php-curl php-fpm php-pgsql awstats
+ vsftpd proftpd-basic bind9 exim4 exim4-daemon-heavy
+ clamav-daemon spamassassin dovecot-imapd dovecot-pop3d roundcube-core
+ roundcube-mysql roundcube-plugins mariadb-server mariadb-common
+ mariadb-client postgresql postgresql-contrib phpmyadmin mc
flex whois git idn zip sudo bc ftp lsof ntpdate rrdtool quota
e2fslibs bsdutils e2fsprogs curl imagemagick fail2ban dnsutils
bsdmainutils cron vesta vesta-nginx vesta-php expect libmail-dkim-perl
@@ -131,7 +143,11 @@ help() {
# Defining password-gen function
gen_pass() {
MATRIX='0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'
- LENGTH=32
+ if [ -z "$1" ]; then
+ LENGTH=32
+ else
+ LENGTH=$1
+ fi
while [ ${n:=1} -le $LENGTH ]; do
PASS="$PASS${MATRIX:$(($RANDOM%${#MATRIX})):1}"
let n+=1
@@ -286,7 +302,7 @@ set_default_value 'postgresql' 'no'
set_default_value 'mongodb' 'no'
set_default_value 'exim' 'yes'
set_default_value 'dovecot' 'yes'
-if [ $memory -lt 1500000 ]; then
+if [ $memory -lt 2500000 ]; then
set_default_value 'clamd' 'no'
set_default_value 'spamd' 'no'
else
@@ -487,10 +503,16 @@ echo -e "\n\n"
# Asking for confirmation to proceed
if [ "$interactive" = 'yes' ]; then
- read -p 'Would you like to continue [y/n]: ' answer
- if [ "$answer" != 'y' ] && [ "$answer" != 'Y' ]; then
- echo 'Goodbye'
- exit 1
+ prompt_to_continue=1;
+ if [ ! -z "$email" ] && [ ! -z "$secret_url" ] && [ ! -z "$port" ] && [ ! -z "$servername" ]; then
+ prompt_to_continue=0;
+ fi
+ if [ $prompt_to_continue -eq 1 ]; then
+ read -p 'Would you like to continue [y/n]: ' answer
+ if [ "$answer" != 'y' ] && [ "$answer" != 'Y' ]; then
+ echo 'Goodbye'
+ exit 1
+ fi
fi
# Asking for contact email
@@ -749,31 +771,37 @@ if [ "$mysql" = 'no' ]; then
fi
if [ "$mysql8" = 'yes' ]; then
echo "=== Preparing MySQL 8 apt repo"
- software=$(echo "$software" | sed -e 's/exim4-daemon-heavy//')
- software=$(echo "$software" | sed -e 's/exim4//')
- #software="$software php-mysql roundcube-mysql"
- echo "### THIS FILE IS AUTOMATICALLY CONFIGURED ###" > /etc/apt/sources.list.d/mysql.list
- echo "# You may comment out entries below, but any other modifications may be lost." >> /etc/apt/sources.list.d/mysql.list
- echo "# Use command 'dpkg-reconfigure mysql-apt-config' as root for modifications." >> /etc/apt/sources.list.d/mysql.list
- echo "deb http://repo.mysql.com/apt/debian/ $codename mysql-apt-config" >> /etc/apt/sources.list.d/mysql.list
- echo "deb http://repo.mysql.com/apt/debian/ $codename mysql-8.0" >> /etc/apt/sources.list.d/mysql.list
- echo "deb http://repo.mysql.com/apt/debian/ $codename mysql-tools" >> /etc/apt/sources.list.d/mysql.list
- echo "#deb http://repo.mysql.com/apt/debian/ $codename mysql-tools-preview" >> /etc/apt/sources.list.d/mysql.list
- echo "deb-src http://repo.mysql.com/apt/debian/ $codename mysql-8.0" >> /etc/apt/sources.list.d/mysql.list
-
- # apt-key adv --keyserver pgp.mit.edu --recv-keys 3A79BD29
- key="467B942D3A79BD29"
- readonly key
- GNUPGHOME="$(mktemp -d)"
- export GNUPGHOME
- for keyserver in $(shuf -e ha.pool.sks-keyservers.net hkp://p80.pool.sks-keyservers.net:80 keyserver.ubuntu.com hkp://keyserver.ubuntu.com:80)
- do
- gpg --keyserver "${keyserver}" --recv-keys "${key}" 2>&1 && break
- done
- gpg --export "${key}" > /etc/apt/trusted.gpg.d/mysql.gpg
- gpgconf --kill all
- rm -rf "${GNUPGHOME}"
- unset GNUPGHOME
+ if [ "$release" -lt 12 ]; then
+ software=$(echo "$software" | sed -e 's/exim4-daemon-heavy//')
+ software=$(echo "$software" | sed -e 's/exim4//')
+ #software="$software php-mysql roundcube-mysql"
+ echo "### THIS FILE IS AUTOMATICALLY CONFIGURED ###" > /etc/apt/sources.list.d/mysql.list
+ echo "# You may comment out entries below, but any other modifications may be lost." >> /etc/apt/sources.list.d/mysql.list
+ echo "# Use command 'dpkg-reconfigure mysql-apt-config' as root for modifications." >> /etc/apt/sources.list.d/mysql.list
+ echo "deb http://repo.mysql.com/apt/debian/ $codename mysql-apt-config" >> /etc/apt/sources.list.d/mysql.list
+ echo "deb http://repo.mysql.com/apt/debian/ $codename mysql-8.0" >> /etc/apt/sources.list.d/mysql.list
+ echo "deb http://repo.mysql.com/apt/debian/ $codename mysql-tools" >> /etc/apt/sources.list.d/mysql.list
+ echo "#deb http://repo.mysql.com/apt/debian/ $codename mysql-tools-preview" >> /etc/apt/sources.list.d/mysql.list
+ echo "deb-src http://repo.mysql.com/apt/debian/ $codename mysql-8.0" >> /etc/apt/sources.list.d/mysql.list
+
+ # apt-key adv --keyserver pgp.mit.edu --recv-keys 3A79BD29
+ key="467B942D3A79BD29"
+ readonly key
+ GNUPGHOME="$(mktemp -d)"
+ export GNUPGHOME
+ for keyserver in $(shuf -e ha.pool.sks-keyservers.net hkp://p80.pool.sks-keyservers.net:80 keyserver.ubuntu.com hkp://keyserver.ubuntu.com:80)
+ do
+ gpg --keyserver "${keyserver}" --recv-keys "${key}" 2>&1 && break
+ done
+ gpg --export "${key}" > /etc/apt/trusted.gpg.d/mysql.gpg
+ gpgconf --kill all
+ rm -rf "${GNUPGHOME}"
+ unset GNUPGHOME
+ else
+ # check latest on: https://dev.mysql.com/downloads/repo/apt/
+ wget https://dev.mysql.com/get/mysql-apt-config_0.8.34-1_all.deb
+ dpkg -i mysql-apt-config_0.8.34-1_all.deb
+ fi
mpass=$(gen_pass)
debconf-set-selections <<< "mysql-community-server mysql-community-server/root-pass password $mpass"
@@ -1067,6 +1095,22 @@ if [ "$release" -eq 12 ]; then
ln -s /usr/local/vesta/data/templates/web/nginx/php-fpm/default.stpl /usr/local/vesta/data/templates/web/nginx/php-fpm/PHP-FPM-82.stpl
ln -s /usr/local/vesta/data/templates/web/nginx/php-fpm/default.tpl /usr/local/vesta/data/templates/web/nginx/php-fpm/PHP-FPM-82.tpl
fi
+if [ "$release" -eq 13 ]; then
+ echo "== Symlink missing templates"
+ ln -s /usr/local/vesta/data/templates/web/nginx/hosting.sh /usr/local/vesta/data/templates/web/nginx/default.sh
+ ln -s /usr/local/vesta/data/templates/web/nginx/hosting.tpl /usr/local/vesta/data/templates/web/nginx/default.tpl
+ ln -s /usr/local/vesta/data/templates/web/nginx/hosting.stpl /usr/local/vesta/data/templates/web/nginx/default.stpl
+
+ ln -s /usr/local/vesta/data/templates/web/apache2/PHP-FPM-84.sh /usr/local/vesta/data/templates/web/apache2/hosting.sh
+ ln -s /usr/local/vesta/data/templates/web/apache2/PHP-FPM-84.tpl /usr/local/vesta/data/templates/web/apache2/hosting.tpl
+ ln -s /usr/local/vesta/data/templates/web/apache2/PHP-FPM-84.stpl /usr/local/vesta/data/templates/web/apache2/hosting.stpl
+ ln -s /usr/local/vesta/data/templates/web/apache2/PHP-FPM-84.sh /usr/local/vesta/data/templates/web/apache2/default.sh
+ ln -s /usr/local/vesta/data/templates/web/apache2/PHP-FPM-84.tpl /usr/local/vesta/data/templates/web/apache2/default.tpl
+ ln -s /usr/local/vesta/data/templates/web/apache2/PHP-FPM-84.stpl /usr/local/vesta/data/templates/web/apache2/default.stpl
+
+ ln -s /usr/local/vesta/data/templates/web/nginx/php-fpm/default.stpl /usr/local/vesta/data/templates/web/nginx/php-fpm/PHP-FPM-84.stpl
+ ln -s /usr/local/vesta/data/templates/web/nginx/php-fpm/default.tpl /usr/local/vesta/data/templates/web/nginx/php-fpm/PHP-FPM-84.tpl
+fi
echo "== Set nameservers address"
sed -i "s/YOURHOSTNAME1/ns1.$servername/" /usr/local/vesta/data/packages/default.pkg
@@ -1118,7 +1162,9 @@ if [ "$nginx" = 'yes' ]; then
cp -f $vestacp/nginx/nginx.conf /etc/nginx/
cp -f $vestacp/nginx/status.conf /etc/nginx/conf.d/
cp -f $vestacp/nginx/phpmyadmin.inc /etc/nginx/conf.d/
- cp -f $vestacp/nginx/phppgadmin.inc /etc/nginx/conf.d/
+ if [ "$release" -lt 12 ]; then
+ cp -f $vestacp/nginx/phppgadmin.inc /etc/nginx/conf.d/
+ fi
cp -f $vestacp/nginx/webmail.inc /etc/nginx/conf.d/
cp -f $vestacp/logrotate/nginx /etc/logrotate.d/
@@ -1127,6 +1173,13 @@ if [ "$nginx" = 'yes' ]; then
echo > /etc/nginx/conf.d/vesta.conf
mkdir -p /var/log/nginx/domains
+
+ if [ "$apache" = 'yes' ]; then
+ # SSL fix for Apache 2.4.65+
+ echo -e "proxy_ssl_server_name on;\nproxy_ssl_name \$host;\nproxy_ssl_session_reuse off;" > /etc/nginx/conf.d/fixssl.conf
+ touch /usr/local/vesta/data/upgrades/fixssl.conf
+ fi
+
#update-rc.d nginx defaults
#service nginx start
currentservice='nginx'
@@ -1182,7 +1235,13 @@ fi
if [ "$phpfpm" = 'yes' ]; then
echo "=== Configure PHP-FPM"
- if [ "$release" -eq 12 ]; then
+ if [ "$release" -eq 13 ]; then
+ cp -f $vestacp/php-fpm/www.conf /etc/php/8.4/fpm/pool.d/www.conf
+ #update-rc.d php8.4-fpm defaults
+ currentservice='php8.4-fpm'
+ ensure_startup $currentservice
+ ensure_start $currentservice
+ elif [ "$release" -eq 12 ]; then
cp -f $vestacp/php-fpm/www.conf /etc/php/8.2/fpm/pool.d/www.conf
#update-rc.d php8.2-fpm defaults
currentservice='php8.2-fpm'
@@ -1364,6 +1423,9 @@ if [ "$mysql" = 'yes' ] || [ "$mysql8" = 'yes' ]; then
bash /root/phpmyadmin/pma.sh
blowfish=$(gen_pass)
echo "\$cfg['blowfish_secret'] = '$blowfish';" >> /etc/phpmyadmin/config.inc.php
+
+ # disable root login
+ echo "\$cfg['Servers'][\$i]['AllowRoot'] = FALSE;" >> /etc/phpmyadmin/config.inc.php
fi
if [ "$release" -gt 10 ]; then
echo "=== Configure phpMyAdmin (Debian11 custom part)"
@@ -1381,6 +1443,9 @@ if [ "$mysql" = 'yes' ] || [ "$mysql8" = 'yes' ]; then
bash /root/phpmyadmin/pma.sh
blowfish=$(gen_pass)
echo "\$cfg['blowfish_secret'] = '$blowfish';" >> /etc/phpmyadmin/config.inc.php
+
+ # disable root login
+ echo "\$cfg['Servers'][\$i]['AllowRoot'] = FALSE;" >> /etc/phpmyadmin/config.inc.php
fi
fi
@@ -1398,10 +1463,12 @@ if [ "$postgresql" = 'yes' ]; then
sudo -u postgres psql -c "ALTER USER postgres WITH PASSWORD '$ppass'"
# Configuring phpPgAdmin
- if [ "$apache" = 'yes' ]; then
- cp -f $vestacp/pga/phppgadmin.conf /etc/apache2/conf.d/
+ if [ "$release" -lt 12 ]; then
+ if [ "$apache" = 'yes' ]; then
+ cp -f $vestacp/pga/phppgadmin.conf /etc/apache2/conf.d/
+ fi
+ cp -f $vestacp/pga/config.inc.php /etc/phppgadmin/
fi
- cp -f $vestacp/pga/config.inc.php /etc/phppgadmin/
fi
@@ -1422,7 +1489,7 @@ if [ "$named" = 'yes' ]; then
sed -i "s#/etc/bind/\*\* r,#/etc/bind/\*\* rw,\n /home/\*\* rwm,#g" /etc/apparmor.d/usr.sbin.named
# service apparmor status >/dev/null 2>&1
# if [ $? -ne 0 ]; then
- service apparmor restart
+ systemctl restart apparmor
# fi
fi
# update-rc.d bind9 defaults
@@ -1455,6 +1522,12 @@ if [ "$exim" = 'yes' ]; then
sed -i "s/#CLAMD/CLAMD/g" /etc/exim4/exim4.conf.template
fi
+ # Generating SRS KEY - the code is taken from HestiaCP
+ srs=$(gen_pass 16)
+ echo $srs > /etc/exim4/srs.conf
+ chmod 640 /etc/exim4/srs.conf
+ chown root:Debian-exim /etc/exim4/srs.conf
+
chmod 640 /etc/exim4/exim4.conf.template
rm -rf /etc/exim4/domains
mkdir -p /etc/exim4/domains
@@ -1469,7 +1542,8 @@ if [ "$exim" = 'yes' ]; then
#update-rc.d exim4 defaults
currentservice='exim4'
ensure_startup $currentservice
- ensure_start $currentservice
+ systemctl restart $currentservice
+ # ensure_start $currentservice
fi
@@ -1554,6 +1628,15 @@ if [ "$spamd" = 'yes' ]; then
echo "=== Patching spamassassin dns_server"
sed -i "s/report_safe 1/report_safe 1\n\ndns_server 127.0.0.1/g" /etc/spamassassin/local.cf
+ echo "== Adding myVesta rules to SpamAssassin"
+ cat < /etc/spamassassin/myvesta.cf
+score RCVD_IN_RP_SAFE 0
+score RCVD_IN_RP_CERTIFIED 0
+score SPF_FAIL 3.0
+score SPF_SOFTFAIL 4.0
+score SPF_NONE 4.0
+EOF
+
wget -nv -O /etc/spamassassin/barracuda.cf http://c.myvestacp.com/tools/spamassassin/barracuda.cf
ensure_startup $currentservice
systemctl restart $currentservice
@@ -1663,6 +1746,20 @@ if [ "$fail2ban" = 'yes' ]; then
chmod 640 /var/log/auth.log
chown root:adm /var/log/auth.log
fi
+ if [ "$proftpd" = 'yes' ]; then
+ cat <> /etc/fail2ban/jail.local
+
+[proftpd]
+enabled = true
+filter = proftpd
+action = vesta[name=FTP]
+port = ftp,ftp-data,ftps,ftps-data
+logpath = %(proftpd_log)s
+backend = %(proftpd_backend)s
+maxretry = 5
+EOF
+ fi
+
#update-rc.d fail2ban defaults
currentservice='fail2ban'
ensure_startup $currentservice
@@ -1822,6 +1919,20 @@ if [ "$release" -eq 12 ]; then
/usr/local/vesta/bin/v-change-web-domain-proxy-tpl 'admin' "$servername" 'hosting-webmail-phpmyadmin' 'jpg,jpeg,gif,png,ico,svg,css,zip,tgz,gz,rar,bz2,doc,xls,exe,pdf,ppt,txt,odt,ods,odp,odf,tar,wav,bmp,rtf,js,mp3,avi,mpeg,flv,woff,woff2' 'yes'
fi
fi
+if [ "$release" -eq 13 ]; then
+ if [ -f "/etc/php/8.4/fpm/pool.d/$servername.conf" ]; then
+ echo "== FPM pool.d $servername tweaks"
+ sed -i "/^group =/c\group = www-data" /etc/php/8.4/fpm/pool.d/$servername.conf
+ sed -i "/max_execution_time/c\php_admin_value[max_execution_time] = 900" /etc/php/8.4/fpm/pool.d/$servername.conf
+ sed -i "/request_terminate_timeout/c\request_terminate_timeout = 900s" /etc/php/8.4/fpm/pool.d/$servername.conf
+ sed -i "s|80M|800M|g" /etc/php/8.4/fpm/pool.d/$servername.conf
+ sed -i "s|256M|512M|g" /etc/php/8.4/fpm/pool.d/$servername.conf
+ service php8.4-fpm restart
+ ln -s /var/lib/roundcube /var/lib/roundcube/webmail
+ /usr/local/vesta/bin/v-change-web-domain-proxy-tpl 'admin' "$servername" 'hosting-webmail-phpmyadmin' 'jpg,jpeg,gif,png,ico,svg,css,zip,tgz,gz,rar,bz2,doc,xls,exe,pdf,ppt,txt,odt,ods,odp,odf,tar,wav,bmp,rtf,js,mp3,avi,mpeg,flv,woff,woff2' 'yes'
+ fi
+fi
+
echo "== Adding cron jobs"
command="sudo $VESTA/bin/v-update-sys-queue disk"
@@ -1838,7 +1949,13 @@ command="sudo $VESTA/bin/v-update-user-stats"
$VESTA/bin/v-add-cron-job 'admin' '20' '00' '*' '*' '*' "$command"
command="sudo $VESTA/bin/v-update-sys-rrd"
$VESTA/bin/v-add-cron-job 'admin' '*/5' '*' '*' '*' '*' "$command"
-service cron restart
+command="sudo $VESTA/bin/v-fix-website-permissions-for-all-websites-only-php"
+$VESTA/bin/v-add-cron-job 'admin' '05' '03' '*' '*' '*' "$command"
+command="sudo $VESTA/bin/v-df-snapshot-make"
+$VESTA/bin/v-add-cron-job 'admin' '05' '04' '*' '*' '*' "$command"
+command="sudo $VESTA/bin/v-df-snapshot-logs-cleaner"
+$VESTA/bin/v-add-cron-job 'admin' '10' '04' '*' '*' '*' "$command"
+systemctl restart cron.service
echo "== Building inititall rrd images"
$VESTA/bin/v-update-sys-rrd
@@ -1884,6 +2001,9 @@ fi
if [ "$release" -eq 12 ]; then
apt-get -y install php8.2-apcu php8.2-mbstring php8.2-bcmath php8.2-curl php8.2-gd php8.2-intl php8.2-mysql php8.2-mysqlnd php8.2-pdo php8.2-soap php8.2-xml php8.2-zip php8.2-memcache php8.2-memcached php8.2-zip php8.2-imagick php8.2-imap
fi
+if [ "$release" -eq 13 ]; then
+ apt-get -y install php8.4-apcu php8.4-mbstring php8.4-bcmath php8.4-curl php8.4-gd php8.4-intl php8.4-mysql php8.4-mysqlnd php8.4-pdo php8.4-soap php8.4-xml php8.4-zip php8.4-memcache php8.4-memcached php8.4-zip php8.4-imagick php8.4-imap
+fi
touch /var/log/php-mail.log
chmod a=rw /var/log/php-mail.log
@@ -1939,6 +2059,13 @@ if [ "$release" -eq 12 ]; then
service php8.2-fpm restart
fi
+if [ "$release" -eq 13 ]; then
+ echo "=== Patching php8.4"
+ patch /etc/php/8.4/fpm/php.ini < /usr/local/vesta/src/deb/for-download/tools/patches/php8.2.patch
+ update-alternatives --set php /usr/bin/php8.4
+ service php8.4-fpm restart
+fi
+
# echo "=== Patching rcube_vcard.php"
# wget -nv https://c.myvestacp.com/tools/patches/rcube_vcard.patch -O /root/rcube_vcard.patch
# patch /usr/share/roundcube/program/lib/Roundcube/rcube_vcard.php < /root/rcube_vcard.patch
@@ -2016,6 +2143,9 @@ touch /usr/local/vesta/data/upgrades/enable_cookie_httponly
touch /usr/local/vesta/data/upgrades/fix_exim_494_autoreply
touch /usr/local/vesta/data/upgrades/freshclam_start
touch /usr/local/vesta/data/upgrades/barracuda_rbl
+touch /usr/local/vesta/data/upgrades/spamhaus_dnsbl_removed
+touch /usr/local/vesta/data/upgrades/v-df-snapshot-make
+touch /usr/local/vesta/data/upgrades/fix-website-permissions-for-all-websites-only-php
# Secret URL
secretquery=''
@@ -2030,18 +2160,24 @@ if [ "$port" != "8083" ]; then
$VESTA/bin/v-change-vesta-port $port
fi
-echo "=== Set URL for phpmyadmin"
echo "DB_PMA_URL='https://$servername/phpmyadmin/'" >> $VESTA/conf/vesta.conf
if [ "$release" -gt 9 ]; then
echo "=== Set max_length_of_MySQL_username=80"
+ echo "MAX_DBUSER_LEN=80" >> $VESTA/conf/vesta.conf
fi
-echo "MAX_DBUSER_LEN=80" >> $VESTA/conf/vesta.conf
echo "ALLOW_BACKUP_ANYTIME='yes'" >> $VESTA/conf/vesta.conf
echo "NOTIFY_ADMIN_FULL_BACKUP='$email'" >> $VESTA/conf/vesta.conf
-echo "================================================================"
+echo "=== Adding FileManager license to vesta.conf"
+echo "FILEMANAGER_KEY='FREEFM'" >> $VESTA/conf/vesta.conf
# Removing old PHP sessions files
-crontab -l | { cat; echo "10 2 * * 6 sudo find /home/*/tmp/ -type f -mtime +5 -exec rm {} \;"; } | crontab -
+touch /var/spool/cron/crontabs/root
+echo "10 2 * * 6 sudo find /home/*/tmp/ -type f -mtime +5 -exec rm {} \;" >> /var/spool/cron/crontabs/root
+
+if [ -f "/root/.bash_profile" ]; then
+ echo "=== Adding v-cd-www alias to root bash profile"
+ echo "alias v-cd-www='source /usr/local/vesta/bin/v-change-dir-www'" >> /root/.bash_profile
+fi
#----------------------------------------------------------#
# myVesta Access Info #
diff --git a/src/deb/for-download/tools/apache-fpm-tpl/PHP-FPM-83-public.sh b/src/deb/for-download/tools/apache-fpm-tpl/PHP-FPM-83-public.sh
new file mode 100644
index 00000000..f5e7c6fd
--- /dev/null
+++ b/src/deb/for-download/tools/apache-fpm-tpl/PHP-FPM-83-public.sh
@@ -0,0 +1,126 @@
+#!/bin/bash
+# Adding php pool conf
+user="$1"
+domain="$2"
+ip="$3"
+home_dir="$4"
+docroot="$5"
+
+pool_conf="[$2]
+
+listen = /run/php/php8.3-fpm-$2.sock
+listen.owner = $1
+listen.group = $1
+listen.mode = 0666
+
+user = $1
+group = $1
+
+pm = ondemand
+pm.max_children = 8
+request_terminate_timeout = 360s
+pm.max_requests = 4000
+pm.process_idle_timeout = 10s
+pm.status_path = /status
+
+php_admin_value[upload_tmp_dir] = /home/$1/tmp
+php_admin_value[session.save_path] = /home/$1/tmp
+php_admin_value[open_basedir] = $5:/home/$1/tmp:/bin:/usr/bin:/usr/local/bin:/var/www/html:/tmp:/usr/share:/etc/phpmyadmin:/var/lib/phpmyadmin:/etc/roundcube:/var/log/roundcube:/var/lib/roundcube
+php_admin_value[upload_max_filesize] = 800M
+php_admin_value[max_execution_time] = 300
+php_admin_value[post_max_size] = 800M
+php_admin_value[memory_limit] = 512M
+php_admin_value[sendmail_path] = \"/usr/sbin/sendmail -t -i -f info@$2\"
+php_admin_flag[mysql.allow_persistent] = off
+php_admin_flag[safe_mode] = off
+
+env[PATH] = /usr/local/bin:/usr/bin:/bin
+env[TMP] = /home/$1/tmp
+env[TMPDIR] = /home/$1/tmp
+env[TEMP] = /home/$1/tmp
+"
+
+pool_file_56="/etc/php/5.6/fpm/pool.d/$2.conf"
+pool_file_70="/etc/php/7.0/fpm/pool.d/$2.conf"
+pool_file_71="/etc/php/7.1/fpm/pool.d/$2.conf"
+pool_file_72="/etc/php/7.2/fpm/pool.d/$2.conf"
+pool_file_73="/etc/php/7.3/fpm/pool.d/$2.conf"
+pool_file_74="/etc/php/7.4/fpm/pool.d/$2.conf"
+pool_file_80="/etc/php/8.0/fpm/pool.d/$2.conf"
+pool_file_81="/etc/php/8.1/fpm/pool.d/$2.conf"
+pool_file_82="/etc/php/8.2/fpm/pool.d/$2.conf"
+pool_file_83="/etc/php/8.3/fpm/pool.d/$2.conf"
+
+if [ -f "$pool_file_56" ]; then
+ rm $pool_file_56
+ systemctl reset-failed php5.6-fpm
+ systemctl restart php5.6-fpm
+fi
+
+if [ -f "$pool_file_70" ]; then
+ rm $pool_file_70
+ systemctl reset-failed php7.0-fpm
+ systemctl restart php7.0-fpm
+fi
+
+if [ -f "$pool_file_71" ]; then
+ rm $pool_file_71
+ systemctl reset-failed php7.1-fpm
+ systemctl restart php7.1-fpm
+fi
+
+if [ -f "$pool_file_72" ]; then
+ rm $pool_file_72
+ systemctl reset-failed php7.2-fpm
+ systemctl restart php7.2-fpm
+fi
+
+if [ -f "$pool_file_73" ]; then
+ rm $pool_file_73
+ systemctl reset-failed php7.3-fpm
+ systemctl restart php7.3-fpm
+fi
+
+if [ -f "$pool_file_74" ]; then
+ rm $pool_file_74
+ systemctl reset-failed php7.4-fpm
+ systemctl restart php7.4-fpm
+fi
+
+if [ -f "$pool_file_80" ]; then
+ rm $pool_file_80
+ systemctl reset-failed php8.0-fpm
+ systemctl restart php8.0-fpm
+fi
+
+if [ -f "$pool_file_81" ]; then
+ rm $pool_file_81
+ systemctl reset-failed php8.1-fpm
+ systemctl restart php8.1-fpm
+fi
+
+if [ -f "$pool_file_82" ]; then
+ rm $pool_file_82
+ systemctl reset-failed php8.2-fpm
+ systemctl restart php8.2-fpm
+fi
+
+write_file=0
+if [ ! -f "$pool_file_83" ]; then
+ write_file=1
+else
+ user_count=$(grep -c "/home/$1/" $pool_file_83)
+ if [ $user_count -eq 0 ]; then
+ write_file=1
+ fi
+fi
+if [ $write_file -eq 1 ]; then
+ echo "$pool_conf" > $pool_file_83
+ systemctl reset-failed php8.3-fpm
+ systemctl restart php8.3-fpm
+fi
+if [ -f "/etc/php/8.3/fpm/pool.d/www.conf" ]; then
+ rm /etc/php/8.3/fpm/pool.d/www.conf
+fi
+
+exit 0
diff --git a/src/deb/for-download/tools/apache-fpm-tpl/PHP-FPM-83-public.stpl b/src/deb/for-download/tools/apache-fpm-tpl/PHP-FPM-83-public.stpl
new file mode 100644
index 00000000..cceed0ee
--- /dev/null
+++ b/src/deb/for-download/tools/apache-fpm-tpl/PHP-FPM-83-public.stpl
@@ -0,0 +1,36 @@
+
+
+ ServerName %domain_idn%
+ %alias_string%
+ ServerAdmin %email%
+ DocumentRoot %sdocroot%/public
+ 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
+
+
+ AllowOverride All
+ SSLRequireSSL
+ Options +Includes -Indexes -FollowSymLinks +SymLinksIfOwnerMatch
+
+ SSLEngine on
+ SSLVerifyClient none
+ SSLCertificateFile %ssl_crt%
+ SSLCertificateKeyFile %ssl_key%
+ %ssl_ca_str%SSLCertificateChainFile %ssl_ca%
+
+
+ SetHandler "proxy:unix:/run/php/php8.3-fpm-%domain%.sock|fcgi://localhost/"
+
+ SetEnvIf Authorization .+ HTTP_AUTHORIZATION=$0
+
+ IncludeOptional %home%/%user%/conf/web/s%web_system%.%domain%.conf*
+
+
+
diff --git a/src/deb/for-download/tools/apache-fpm-tpl/PHP-FPM-83-public.tpl b/src/deb/for-download/tools/apache-fpm-tpl/PHP-FPM-83-public.tpl
new file mode 100644
index 00000000..ac952817
--- /dev/null
+++ b/src/deb/for-download/tools/apache-fpm-tpl/PHP-FPM-83-public.tpl
@@ -0,0 +1,30 @@
+
+
+ ServerName %domain_idn%
+ %alias_string%
+ ServerAdmin %email%
+ DocumentRoot %docroot%/public
+ 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
+
+
+ AllowOverride All
+ Options +Includes -Indexes -FollowSymLinks +SymLinksIfOwnerMatch
+
+
+
+ SetHandler "proxy:unix:/run/php/php8.3-fpm-%domain%.sock|fcgi://localhost/"
+
+ SetEnvIf Authorization .+ HTTP_AUTHORIZATION=$0
+
+ IncludeOptional %home%/%user%/conf/web/%web_system%.%domain%.conf*
+
+
+
diff --git a/src/deb/for-download/tools/apache-fpm-tpl/PHP-FPM-83.sh b/src/deb/for-download/tools/apache-fpm-tpl/PHP-FPM-83.sh
new file mode 100644
index 00000000..f5e7c6fd
--- /dev/null
+++ b/src/deb/for-download/tools/apache-fpm-tpl/PHP-FPM-83.sh
@@ -0,0 +1,126 @@
+#!/bin/bash
+# Adding php pool conf
+user="$1"
+domain="$2"
+ip="$3"
+home_dir="$4"
+docroot="$5"
+
+pool_conf="[$2]
+
+listen = /run/php/php8.3-fpm-$2.sock
+listen.owner = $1
+listen.group = $1
+listen.mode = 0666
+
+user = $1
+group = $1
+
+pm = ondemand
+pm.max_children = 8
+request_terminate_timeout = 360s
+pm.max_requests = 4000
+pm.process_idle_timeout = 10s
+pm.status_path = /status
+
+php_admin_value[upload_tmp_dir] = /home/$1/tmp
+php_admin_value[session.save_path] = /home/$1/tmp
+php_admin_value[open_basedir] = $5:/home/$1/tmp:/bin:/usr/bin:/usr/local/bin:/var/www/html:/tmp:/usr/share:/etc/phpmyadmin:/var/lib/phpmyadmin:/etc/roundcube:/var/log/roundcube:/var/lib/roundcube
+php_admin_value[upload_max_filesize] = 800M
+php_admin_value[max_execution_time] = 300
+php_admin_value[post_max_size] = 800M
+php_admin_value[memory_limit] = 512M
+php_admin_value[sendmail_path] = \"/usr/sbin/sendmail -t -i -f info@$2\"
+php_admin_flag[mysql.allow_persistent] = off
+php_admin_flag[safe_mode] = off
+
+env[PATH] = /usr/local/bin:/usr/bin:/bin
+env[TMP] = /home/$1/tmp
+env[TMPDIR] = /home/$1/tmp
+env[TEMP] = /home/$1/tmp
+"
+
+pool_file_56="/etc/php/5.6/fpm/pool.d/$2.conf"
+pool_file_70="/etc/php/7.0/fpm/pool.d/$2.conf"
+pool_file_71="/etc/php/7.1/fpm/pool.d/$2.conf"
+pool_file_72="/etc/php/7.2/fpm/pool.d/$2.conf"
+pool_file_73="/etc/php/7.3/fpm/pool.d/$2.conf"
+pool_file_74="/etc/php/7.4/fpm/pool.d/$2.conf"
+pool_file_80="/etc/php/8.0/fpm/pool.d/$2.conf"
+pool_file_81="/etc/php/8.1/fpm/pool.d/$2.conf"
+pool_file_82="/etc/php/8.2/fpm/pool.d/$2.conf"
+pool_file_83="/etc/php/8.3/fpm/pool.d/$2.conf"
+
+if [ -f "$pool_file_56" ]; then
+ rm $pool_file_56
+ systemctl reset-failed php5.6-fpm
+ systemctl restart php5.6-fpm
+fi
+
+if [ -f "$pool_file_70" ]; then
+ rm $pool_file_70
+ systemctl reset-failed php7.0-fpm
+ systemctl restart php7.0-fpm
+fi
+
+if [ -f "$pool_file_71" ]; then
+ rm $pool_file_71
+ systemctl reset-failed php7.1-fpm
+ systemctl restart php7.1-fpm
+fi
+
+if [ -f "$pool_file_72" ]; then
+ rm $pool_file_72
+ systemctl reset-failed php7.2-fpm
+ systemctl restart php7.2-fpm
+fi
+
+if [ -f "$pool_file_73" ]; then
+ rm $pool_file_73
+ systemctl reset-failed php7.3-fpm
+ systemctl restart php7.3-fpm
+fi
+
+if [ -f "$pool_file_74" ]; then
+ rm $pool_file_74
+ systemctl reset-failed php7.4-fpm
+ systemctl restart php7.4-fpm
+fi
+
+if [ -f "$pool_file_80" ]; then
+ rm $pool_file_80
+ systemctl reset-failed php8.0-fpm
+ systemctl restart php8.0-fpm
+fi
+
+if [ -f "$pool_file_81" ]; then
+ rm $pool_file_81
+ systemctl reset-failed php8.1-fpm
+ systemctl restart php8.1-fpm
+fi
+
+if [ -f "$pool_file_82" ]; then
+ rm $pool_file_82
+ systemctl reset-failed php8.2-fpm
+ systemctl restart php8.2-fpm
+fi
+
+write_file=0
+if [ ! -f "$pool_file_83" ]; then
+ write_file=1
+else
+ user_count=$(grep -c "/home/$1/" $pool_file_83)
+ if [ $user_count -eq 0 ]; then
+ write_file=1
+ fi
+fi
+if [ $write_file -eq 1 ]; then
+ echo "$pool_conf" > $pool_file_83
+ systemctl reset-failed php8.3-fpm
+ systemctl restart php8.3-fpm
+fi
+if [ -f "/etc/php/8.3/fpm/pool.d/www.conf" ]; then
+ rm /etc/php/8.3/fpm/pool.d/www.conf
+fi
+
+exit 0
diff --git a/src/deb/for-download/tools/apache-fpm-tpl/PHP-FPM-83.stpl b/src/deb/for-download/tools/apache-fpm-tpl/PHP-FPM-83.stpl
new file mode 100644
index 00000000..f043bfa8
--- /dev/null
+++ b/src/deb/for-download/tools/apache-fpm-tpl/PHP-FPM-83.stpl
@@ -0,0 +1,36 @@
+
+
+ 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
+
+ AllowOverride All
+
+
+ AllowOverride All
+ SSLRequireSSL
+ Options +Includes -Indexes -FollowSymLinks +SymLinksIfOwnerMatch
+
+ SSLEngine on
+ SSLVerifyClient none
+ SSLCertificateFile %ssl_crt%
+ SSLCertificateKeyFile %ssl_key%
+ %ssl_ca_str%SSLCertificateChainFile %ssl_ca%
+
+
+ SetHandler "proxy:unix:/run/php/php8.3-fpm-%domain%.sock|fcgi://localhost/"
+
+ SetEnvIf Authorization .+ HTTP_AUTHORIZATION=$0
+
+ IncludeOptional %home%/%user%/conf/web/s%web_system%.%domain%.conf*
+
+
+
diff --git a/src/deb/for-download/tools/apache-fpm-tpl/PHP-FPM-83.tpl b/src/deb/for-download/tools/apache-fpm-tpl/PHP-FPM-83.tpl
new file mode 100644
index 00000000..9b5bf916
--- /dev/null
+++ b/src/deb/for-download/tools/apache-fpm-tpl/PHP-FPM-83.tpl
@@ -0,0 +1,30 @@
+
+
+ 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
+
+
+ AllowOverride All
+ Options +Includes -Indexes -FollowSymLinks +SymLinksIfOwnerMatch
+
+
+
+ SetHandler "proxy:unix:/run/php/php8.3-fpm-%domain%.sock|fcgi://localhost/"
+
+ SetEnvIf Authorization .+ HTTP_AUTHORIZATION=$0
+
+ IncludeOptional %home%/%user%/conf/web/%web_system%.%domain%.conf*
+
+
+
diff --git a/src/deb/for-download/tools/apache-fpm-tpl/PHP-FPM-84-public.sh b/src/deb/for-download/tools/apache-fpm-tpl/PHP-FPM-84-public.sh
new file mode 100644
index 00000000..cbea2de9
--- /dev/null
+++ b/src/deb/for-download/tools/apache-fpm-tpl/PHP-FPM-84-public.sh
@@ -0,0 +1,133 @@
+#!/bin/bash
+# Adding php pool conf
+user="$1"
+domain="$2"
+ip="$3"
+home_dir="$4"
+docroot="$5"
+
+pool_conf="[$2]
+
+listen = /run/php/php8.4-fpm-$2.sock
+listen.owner = $1
+listen.group = $1
+listen.mode = 0666
+
+user = $1
+group = $1
+
+pm = ondemand
+pm.max_children = 8
+request_terminate_timeout = 360s
+pm.max_requests = 4000
+pm.process_idle_timeout = 10s
+pm.status_path = /status
+
+php_admin_value[upload_tmp_dir] = /home/$1/tmp
+php_admin_value[session.save_path] = /home/$1/tmp
+php_admin_value[open_basedir] = $5:/home/$1/tmp:/bin:/usr/bin:/usr/local/bin:/var/www/html:/tmp:/usr/share:/etc/phpmyadmin:/var/lib/phpmyadmin:/etc/roundcube:/var/log/roundcube:/var/lib/roundcube
+php_admin_value[upload_max_filesize] = 800M
+php_admin_value[max_execution_time] = 300
+php_admin_value[post_max_size] = 800M
+php_admin_value[memory_limit] = 512M
+php_admin_value[sendmail_path] = \"/usr/sbin/sendmail -t -i -f info@$2\"
+php_admin_flag[mysql.allow_persistent] = off
+php_admin_flag[safe_mode] = off
+
+env[PATH] = /usr/local/bin:/usr/bin:/bin
+env[TMP] = /home/$1/tmp
+env[TMPDIR] = /home/$1/tmp
+env[TEMP] = /home/$1/tmp
+"
+
+pool_file_56="/etc/php/5.6/fpm/pool.d/$2.conf"
+pool_file_70="/etc/php/7.0/fpm/pool.d/$2.conf"
+pool_file_71="/etc/php/7.1/fpm/pool.d/$2.conf"
+pool_file_72="/etc/php/7.2/fpm/pool.d/$2.conf"
+pool_file_73="/etc/php/7.3/fpm/pool.d/$2.conf"
+pool_file_74="/etc/php/7.4/fpm/pool.d/$2.conf"
+pool_file_80="/etc/php/8.0/fpm/pool.d/$2.conf"
+pool_file_81="/etc/php/8.1/fpm/pool.d/$2.conf"
+pool_file_82="/etc/php/8.2/fpm/pool.d/$2.conf"
+pool_file_83="/etc/php/8.3/fpm/pool.d/$2.conf"
+pool_file_84="/etc/php/8.4/fpm/pool.d/$2.conf"
+
+if [ -f "$pool_file_56" ]; then
+ rm $pool_file_56
+ systemctl reset-failed php5.6-fpm
+ systemctl restart php5.6-fpm
+fi
+
+if [ -f "$pool_file_70" ]; then
+ rm $pool_file_70
+ systemctl reset-failed php7.0-fpm
+ systemctl restart php7.0-fpm
+fi
+
+if [ -f "$pool_file_71" ]; then
+ rm $pool_file_71
+ systemctl reset-failed php7.1-fpm
+ systemctl restart php7.1-fpm
+fi
+
+if [ -f "$pool_file_72" ]; then
+ rm $pool_file_72
+ systemctl reset-failed php7.2-fpm
+ systemctl restart php7.2-fpm
+fi
+
+if [ -f "$pool_file_73" ]; then
+ rm $pool_file_73
+ systemctl reset-failed php7.3-fpm
+ systemctl restart php7.3-fpm
+fi
+
+if [ -f "$pool_file_74" ]; then
+ rm $pool_file_74
+ systemctl reset-failed php7.4-fpm
+ systemctl restart php7.4-fpm
+fi
+
+if [ -f "$pool_file_80" ]; then
+ rm $pool_file_80
+ systemctl reset-failed php8.0-fpm
+ systemctl restart php8.0-fpm
+fi
+
+if [ -f "$pool_file_81" ]; then
+ rm $pool_file_81
+ systemctl reset-failed php8.1-fpm
+ systemctl restart php8.1-fpm
+fi
+
+if [ -f "$pool_file_82" ]; then
+ rm $pool_file_82
+ systemctl reset-failed php8.2-fpm
+ systemctl restart php8.2-fpm
+fi
+
+if [ -f "$pool_file_83" ]; then
+ rm $pool_file_83
+ systemctl reset-failed php8.3-fpm
+ systemctl restart php8.3-fpm
+fi
+
+write_file=0
+if [ ! -f "$pool_file_84" ]; then
+ write_file=1
+else
+ user_count=$(grep -c "/home/$1/" $pool_file_84)
+ if [ $user_count -eq 0 ]; then
+ write_file=1
+ fi
+fi
+if [ $write_file -eq 1 ]; then
+ echo "$pool_conf" > $pool_file_84
+ systemctl reset-failed php8.4-fpm
+ systemctl restart php8.4-fpm
+fi
+if [ -f "/etc/php/8.4/fpm/pool.d/www.conf" ]; then
+ rm /etc/php/8.4/fpm/pool.d/www.conf
+fi
+
+exit 0
diff --git a/src/deb/for-download/tools/apache-fpm-tpl/PHP-FPM-84-public.stpl b/src/deb/for-download/tools/apache-fpm-tpl/PHP-FPM-84-public.stpl
new file mode 100644
index 00000000..91e05b17
--- /dev/null
+++ b/src/deb/for-download/tools/apache-fpm-tpl/PHP-FPM-84-public.stpl
@@ -0,0 +1,36 @@
+
+
+ ServerName %domain_idn%
+ %alias_string%
+ ServerAdmin %email%
+ DocumentRoot %sdocroot%/public
+ 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
+
+
+ AllowOverride All
+ SSLRequireSSL
+ Options +Includes -Indexes -FollowSymLinks +SymLinksIfOwnerMatch
+
+ SSLEngine on
+ SSLVerifyClient none
+ SSLCertificateFile %ssl_crt%
+ SSLCertificateKeyFile %ssl_key%
+ %ssl_ca_str%SSLCertificateChainFile %ssl_ca%
+
+
+ SetHandler "proxy:unix:/run/php/php8.4-fpm-%domain%.sock|fcgi://localhost/"
+
+ SetEnvIf Authorization .+ HTTP_AUTHORIZATION=$0
+
+ IncludeOptional %home%/%user%/conf/web/s%web_system%.%domain%.conf*
+
+
+
diff --git a/src/deb/for-download/tools/apache-fpm-tpl/PHP-FPM-84-public.tpl b/src/deb/for-download/tools/apache-fpm-tpl/PHP-FPM-84-public.tpl
new file mode 100644
index 00000000..94acbf15
--- /dev/null
+++ b/src/deb/for-download/tools/apache-fpm-tpl/PHP-FPM-84-public.tpl
@@ -0,0 +1,30 @@
+
+
+ ServerName %domain_idn%
+ %alias_string%
+ ServerAdmin %email%
+ DocumentRoot %docroot%/public
+ 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
+
+
+ AllowOverride All
+ Options +Includes -Indexes -FollowSymLinks +SymLinksIfOwnerMatch
+
+
+
+ SetHandler "proxy:unix:/run/php/php8.4-fpm-%domain%.sock|fcgi://localhost/"
+
+ SetEnvIf Authorization .+ HTTP_AUTHORIZATION=$0
+
+ IncludeOptional %home%/%user%/conf/web/%web_system%.%domain%.conf*
+
+
+
diff --git a/src/deb/for-download/tools/apache-fpm-tpl/PHP-FPM-84.sh b/src/deb/for-download/tools/apache-fpm-tpl/PHP-FPM-84.sh
new file mode 100644
index 00000000..cbea2de9
--- /dev/null
+++ b/src/deb/for-download/tools/apache-fpm-tpl/PHP-FPM-84.sh
@@ -0,0 +1,133 @@
+#!/bin/bash
+# Adding php pool conf
+user="$1"
+domain="$2"
+ip="$3"
+home_dir="$4"
+docroot="$5"
+
+pool_conf="[$2]
+
+listen = /run/php/php8.4-fpm-$2.sock
+listen.owner = $1
+listen.group = $1
+listen.mode = 0666
+
+user = $1
+group = $1
+
+pm = ondemand
+pm.max_children = 8
+request_terminate_timeout = 360s
+pm.max_requests = 4000
+pm.process_idle_timeout = 10s
+pm.status_path = /status
+
+php_admin_value[upload_tmp_dir] = /home/$1/tmp
+php_admin_value[session.save_path] = /home/$1/tmp
+php_admin_value[open_basedir] = $5:/home/$1/tmp:/bin:/usr/bin:/usr/local/bin:/var/www/html:/tmp:/usr/share:/etc/phpmyadmin:/var/lib/phpmyadmin:/etc/roundcube:/var/log/roundcube:/var/lib/roundcube
+php_admin_value[upload_max_filesize] = 800M
+php_admin_value[max_execution_time] = 300
+php_admin_value[post_max_size] = 800M
+php_admin_value[memory_limit] = 512M
+php_admin_value[sendmail_path] = \"/usr/sbin/sendmail -t -i -f info@$2\"
+php_admin_flag[mysql.allow_persistent] = off
+php_admin_flag[safe_mode] = off
+
+env[PATH] = /usr/local/bin:/usr/bin:/bin
+env[TMP] = /home/$1/tmp
+env[TMPDIR] = /home/$1/tmp
+env[TEMP] = /home/$1/tmp
+"
+
+pool_file_56="/etc/php/5.6/fpm/pool.d/$2.conf"
+pool_file_70="/etc/php/7.0/fpm/pool.d/$2.conf"
+pool_file_71="/etc/php/7.1/fpm/pool.d/$2.conf"
+pool_file_72="/etc/php/7.2/fpm/pool.d/$2.conf"
+pool_file_73="/etc/php/7.3/fpm/pool.d/$2.conf"
+pool_file_74="/etc/php/7.4/fpm/pool.d/$2.conf"
+pool_file_80="/etc/php/8.0/fpm/pool.d/$2.conf"
+pool_file_81="/etc/php/8.1/fpm/pool.d/$2.conf"
+pool_file_82="/etc/php/8.2/fpm/pool.d/$2.conf"
+pool_file_83="/etc/php/8.3/fpm/pool.d/$2.conf"
+pool_file_84="/etc/php/8.4/fpm/pool.d/$2.conf"
+
+if [ -f "$pool_file_56" ]; then
+ rm $pool_file_56
+ systemctl reset-failed php5.6-fpm
+ systemctl restart php5.6-fpm
+fi
+
+if [ -f "$pool_file_70" ]; then
+ rm $pool_file_70
+ systemctl reset-failed php7.0-fpm
+ systemctl restart php7.0-fpm
+fi
+
+if [ -f "$pool_file_71" ]; then
+ rm $pool_file_71
+ systemctl reset-failed php7.1-fpm
+ systemctl restart php7.1-fpm
+fi
+
+if [ -f "$pool_file_72" ]; then
+ rm $pool_file_72
+ systemctl reset-failed php7.2-fpm
+ systemctl restart php7.2-fpm
+fi
+
+if [ -f "$pool_file_73" ]; then
+ rm $pool_file_73
+ systemctl reset-failed php7.3-fpm
+ systemctl restart php7.3-fpm
+fi
+
+if [ -f "$pool_file_74" ]; then
+ rm $pool_file_74
+ systemctl reset-failed php7.4-fpm
+ systemctl restart php7.4-fpm
+fi
+
+if [ -f "$pool_file_80" ]; then
+ rm $pool_file_80
+ systemctl reset-failed php8.0-fpm
+ systemctl restart php8.0-fpm
+fi
+
+if [ -f "$pool_file_81" ]; then
+ rm $pool_file_81
+ systemctl reset-failed php8.1-fpm
+ systemctl restart php8.1-fpm
+fi
+
+if [ -f "$pool_file_82" ]; then
+ rm $pool_file_82
+ systemctl reset-failed php8.2-fpm
+ systemctl restart php8.2-fpm
+fi
+
+if [ -f "$pool_file_83" ]; then
+ rm $pool_file_83
+ systemctl reset-failed php8.3-fpm
+ systemctl restart php8.3-fpm
+fi
+
+write_file=0
+if [ ! -f "$pool_file_84" ]; then
+ write_file=1
+else
+ user_count=$(grep -c "/home/$1/" $pool_file_84)
+ if [ $user_count -eq 0 ]; then
+ write_file=1
+ fi
+fi
+if [ $write_file -eq 1 ]; then
+ echo "$pool_conf" > $pool_file_84
+ systemctl reset-failed php8.4-fpm
+ systemctl restart php8.4-fpm
+fi
+if [ -f "/etc/php/8.4/fpm/pool.d/www.conf" ]; then
+ rm /etc/php/8.4/fpm/pool.d/www.conf
+fi
+
+exit 0
diff --git a/src/deb/for-download/tools/apache-fpm-tpl/PHP-FPM-84.stpl b/src/deb/for-download/tools/apache-fpm-tpl/PHP-FPM-84.stpl
new file mode 100644
index 00000000..848abf7c
--- /dev/null
+++ b/src/deb/for-download/tools/apache-fpm-tpl/PHP-FPM-84.stpl
@@ -0,0 +1,36 @@
+
+
+ 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
+
+ AllowOverride All
+
+
+ AllowOverride All
+ SSLRequireSSL
+ Options +Includes -Indexes -FollowSymLinks +SymLinksIfOwnerMatch
+
+ SSLEngine on
+ SSLVerifyClient none
+ SSLCertificateFile %ssl_crt%
+ SSLCertificateKeyFile %ssl_key%
+ %ssl_ca_str%SSLCertificateChainFile %ssl_ca%
+
+
+ SetHandler "proxy:unix:/run/php/php8.4-fpm-%domain%.sock|fcgi://localhost/"
+
+ SetEnvIf Authorization .+ HTTP_AUTHORIZATION=$0
+
+ IncludeOptional %home%/%user%/conf/web/s%web_system%.%domain%.conf*
+
+
+
diff --git a/src/deb/for-download/tools/apache-fpm-tpl/PHP-FPM-84.tpl b/src/deb/for-download/tools/apache-fpm-tpl/PHP-FPM-84.tpl
new file mode 100644
index 00000000..065c1f89
--- /dev/null
+++ b/src/deb/for-download/tools/apache-fpm-tpl/PHP-FPM-84.tpl
@@ -0,0 +1,30 @@
+
+
+ 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
+
+
+ AllowOverride All
+ Options +Includes -Indexes -FollowSymLinks +SymLinksIfOwnerMatch
+
+
+
+ SetHandler "proxy:unix:/run/php/php8.4-fpm-%domain%.sock|fcgi://localhost/"
+
+ SetEnvIf Authorization .+ HTTP_AUTHORIZATION=$0
+
+ IncludeOptional %home%/%user%/conf/web/%web_system%.%domain%.conf*
+
+
+
diff --git a/src/deb/for-download/tools/default-pool.d/8.3/www.conf b/src/deb/for-download/tools/default-pool.d/8.3/www.conf
new file mode 100644
index 00000000..f18939a3
--- /dev/null
+++ b/src/deb/for-download/tools/default-pool.d/8.3/www.conf
@@ -0,0 +1,490 @@
+; Start a new pool named 'www'.
+; the variable $pool can be used in any directive and will be replaced by the
+; pool name ('www' here)
+[www]
+
+; Per pool prefix
+; It only applies on the following directives:
+; - 'access.log'
+; - 'slowlog'
+; - 'listen' (unixsocket)
+; - 'chroot'
+; - 'chdir'
+; - 'php_values'
+; - 'php_admin_values'
+; When not set, the global prefix (or /usr) applies instead.
+; Note: This directive can also be relative to the global prefix.
+; Default Value: none
+;prefix = /path/to/pools/$pool
+
+; Unix user/group of the child processes. This can be used only if the master
+; process running user is root. It is set after the child process is created.
+; The user and group can be specified either by their name or by their numeric
+; IDs.
+; Note: If the user is root, the executable needs to be started with
+; --allow-to-run-as-root option to work.
+; Default Values: The user is set to master process running user by default.
+; If the group is not set, the user's group is used.
+user = www-data
+group = www-data
+
+; The address on which to accept FastCGI requests.
+; Valid syntaxes are:
+; 'ip.add.re.ss:port' - to listen on a TCP socket to a specific IPv4 address on
+; a specific port;
+; '[ip:6:addr:ess]:port' - to listen on a TCP socket to a specific IPv6 address on
+; a specific port;
+; 'port' - to listen on a TCP socket to all addresses
+; (IPv6 and IPv4-mapped) on a specific port;
+; '/path/to/unix/socket' - to listen on a unix socket.
+; Note: This value is mandatory.
+listen = /run/php/php8.3-fpm.sock
+
+; Set listen(2) backlog.
+; Default Value: 511 (-1 on Linux, FreeBSD and OpenBSD)
+;listen.backlog = 511
+
+; Set permissions for unix socket, if one is used. In Linux, read/write
+; permissions must be set in order to allow connections from a web server. Many
+; BSD-derived systems allow connections regardless of permissions. The owner
+; and group can be specified either by name or by their numeric IDs.
+; Default Values: Owner is set to the master process running user. If the group
+; is not set, the owner's group is used. Mode is set to 0660.
+listen.owner = www-data
+listen.group = www-data
+;listen.mode = 0660
+
+; When POSIX Access Control Lists are supported you can set them using
+; these options, value is a comma separated list of user/group names.
+; When set, listen.owner and listen.group are ignored
+;listen.acl_users =
+;listen.acl_groups =
+
+; List of addresses (IPv4/IPv6) of FastCGI clients which are allowed to connect.
+; Equivalent to the FCGI_WEB_SERVER_ADDRS environment variable in the original
+; PHP FCGI (5.2.2+). Makes sense only with a tcp listening socket. Each address
+; must be separated by a comma. If this value is left blank, connections will be
+; accepted from any ip address.
+; Default Value: any
+;listen.allowed_clients = 127.0.0.1
+
+; Set the associated the route table (FIB). FreeBSD only
+; Default Value: -1
+;listen.setfib = 1
+
+; Specify the nice(2) priority to apply to the pool processes (only if set)
+; The value can vary from -19 (highest priority) to 20 (lower priority)
+; Note: - It will only work if the FPM master process is launched as root
+; - The pool processes will inherit the master process priority
+; unless it specified otherwise
+; Default Value: no set
+; process.priority = -19
+
+; Set the process dumpable flag (PR_SET_DUMPABLE prctl for Linux or
+; PROC_TRACE_CTL procctl for FreeBSD) even if the process user
+; or group is different than the master process user. It allows to create process
+; core dump and ptrace the process for the pool user.
+; Default Value: no
+; process.dumpable = yes
+
+; Choose how the process manager will control the number of child processes.
+; Possible Values:
+; static - a fixed number (pm.max_children) of child processes;
+; dynamic - the number of child processes are set dynamically based on the
+; following directives. With this process management, there will be
+; always at least 1 children.
+; pm.max_children - the maximum number of children that can
+; be alive at the same time.
+; pm.start_servers - the number of children created on startup.
+; pm.min_spare_servers - the minimum number of children in 'idle'
+; state (waiting to process). If the number
+; of 'idle' processes is less than this
+; number then some children will be created.
+; pm.max_spare_servers - the maximum number of children in 'idle'
+; state (waiting to process). If the number
+; of 'idle' processes is greater than this
+; number then some children will be killed.
+; pm.max_spawn_rate - the maximum number of rate to spawn child
+; processes at once.
+; ondemand - no children are created at startup. Children will be forked when
+; new requests will connect. The following parameter are used:
+; pm.max_children - the maximum number of children that
+; can be alive at the same time.
+; pm.process_idle_timeout - The number of seconds after which
+; an idle process will be killed.
+; Note: This value is mandatory.
+pm = dynamic
+
+; The number of child processes to be created when pm is set to 'static' and the
+; maximum number of child processes when pm is set to 'dynamic' or 'ondemand'.
+; This value sets the limit on the number of simultaneous requests that will be
+; served. Equivalent to the ApacheMaxClients directive with mpm_prefork.
+; Equivalent to the PHP_FCGI_CHILDREN environment variable in the original PHP
+; CGI. The below defaults are based on a server without much resources. Don't
+; forget to tweak pm.* to fit your needs.
+; Note: Used when pm is set to 'static', 'dynamic' or 'ondemand'
+; Note: This value is mandatory.
+pm.max_children = 5
+
+; The number of child processes created on startup.
+; Note: Used only when pm is set to 'dynamic'
+; Default Value: (min_spare_servers + max_spare_servers) / 2
+pm.start_servers = 2
+
+; The desired minimum number of idle server processes.
+; Note: Used only when pm is set to 'dynamic'
+; Note: Mandatory when pm is set to 'dynamic'
+pm.min_spare_servers = 1
+
+; The desired maximum number of idle server processes.
+; Note: Used only when pm is set to 'dynamic'
+; Note: Mandatory when pm is set to 'dynamic'
+pm.max_spare_servers = 3
+
+; The number of rate to spawn child processes at once.
+; Note: Used only when pm is set to 'dynamic'
+; Note: Mandatory when pm is set to 'dynamic'
+; Default Value: 32
+;pm.max_spawn_rate = 32
+
+; The number of seconds after which an idle process will be killed.
+; Note: Used only when pm is set to 'ondemand'
+; Default Value: 10s
+;pm.process_idle_timeout = 10s;
+
+; The number of requests each child process should execute before respawning.
+; This can be useful to work around memory leaks in 3rd party libraries. For
+; endless request processing specify '0'. Equivalent to PHP_FCGI_MAX_REQUESTS.
+; Default Value: 0
+;pm.max_requests = 500
+
+; The URI to view the FPM status page. If this value is not set, no URI will be
+; recognized as a status page. It shows the following information:
+; pool - the name of the pool;
+; process manager - static, dynamic or ondemand;
+; start time - the date and time FPM has started;
+; start since - number of seconds since FPM has started;
+; accepted conn - the number of request accepted by the pool;
+; listen queue - the number of request in the queue of pending
+; connections (see backlog in listen(2));
+; max listen queue - the maximum number of requests in the queue
+; of pending connections since FPM has started;
+; listen queue len - the size of the socket queue of pending connections;
+; idle processes - the number of idle processes;
+; active processes - the number of active processes;
+; total processes - the number of idle + active processes;
+; max active processes - the maximum number of active processes since FPM
+; has started;
+; max children reached - number of times, the process limit has been reached,
+; when pm tries to start more children (works only for
+; pm 'dynamic' and 'ondemand');
+; Value are updated in real time.
+; Example output:
+; pool: www
+; process manager: static
+; start time: 01/Jul/2011:17:53:49 +0200
+; start since: 62636
+; accepted conn: 190460
+; listen queue: 0
+; max listen queue: 1
+; listen queue len: 42
+; idle processes: 4
+; active processes: 11
+; total processes: 15
+; max active processes: 12
+; max children reached: 0
+;
+; By default the status page output is formatted as text/plain. Passing either
+; 'html', 'xml' or 'json' in the query string will return the corresponding
+; output syntax. Example:
+; http://www.foo.bar/status
+; http://www.foo.bar/status?json
+; http://www.foo.bar/status?html
+; http://www.foo.bar/status?xml
+;
+; By default the status page only outputs short status. Passing 'full' in the
+; query string will also return status for each pool process.
+; Example:
+; http://www.foo.bar/status?full
+; http://www.foo.bar/status?json&full
+; http://www.foo.bar/status?html&full
+; http://www.foo.bar/status?xml&full
+; The Full status returns for each process:
+; pid - the PID of the process;
+; state - the state of the process (Idle, Running, ...);
+; start time - the date and time the process has started;
+; start since - the number of seconds since the process has started;
+; requests - the number of requests the process has served;
+; request duration - the duration in µs of the requests;
+; request method - the request method (GET, POST, ...);
+; request URI - the request URI with the query string;
+; content length - the content length of the request (only with POST);
+; user - the user (PHP_AUTH_USER) (or '-' if not set);
+; script - the main script called (or '-' if not set);
+; last request cpu - the %cpu the last request consumed
+; it's always 0 if the process is not in Idle state
+; because CPU calculation is done when the request
+; processing has terminated;
+; last request memory - the max amount of memory the last request consumed
+; it's always 0 if the process is not in Idle state
+; because memory calculation is done when the request
+; processing has terminated;
+; If the process is in Idle state, then informations are related to the
+; last request the process has served. Otherwise informations are related to
+; the current request being served.
+; Example output:
+; ************************
+; pid: 31330
+; state: Running
+; start time: 01/Jul/2011:17:53:49 +0200
+; start since: 63087
+; requests: 12808
+; request duration: 1250261
+; request method: GET
+; request URI: /test_mem.php?N=10000
+; content length: 0
+; user: -
+; script: /home/fat/web/docs/php/test_mem.php
+; last request cpu: 0.00
+; last request memory: 0
+;
+; Note: There is a real-time FPM status monitoring sample web page available
+; It's available in: /usr/share/php/8.3/fpm/status.html
+;
+; Note: The value must start with a leading slash (/). The value can be
+; anything, but it may not be a good idea to use the .php extension or it
+; may conflict with a real PHP file.
+; Default Value: not set
+;pm.status_path = /status
+
+; The address on which to accept FastCGI status request. This creates a new
+; invisible pool that can handle requests independently. This is useful
+; if the main pool is busy with long running requests because it is still possible
+; to get the status before finishing the long running requests.
+;
+; Valid syntaxes are:
+; 'ip.add.re.ss:port' - to listen on a TCP socket to a specific IPv4 address on
+; a specific port;
+; '[ip:6:addr:ess]:port' - to listen on a TCP socket to a specific IPv6 address on
+; a specific port;
+; 'port' - to listen on a TCP socket to all addresses
+; (IPv6 and IPv4-mapped) on a specific port;
+; '/path/to/unix/socket' - to listen on a unix socket.
+; Default Value: value of the listen option
+;pm.status_listen = 127.0.0.1:9001
+
+; The ping URI to call the monitoring page of FPM. If this value is not set, no
+; URI will be recognized as a ping page. This could be used to test from outside
+; that FPM is alive and responding, or to
+; - create a graph of FPM availability (rrd or such);
+; - remove a server from a group if it is not responding (load balancing);
+; - trigger alerts for the operating team (24/7).
+; Note: The value must start with a leading slash (/). The value can be
+; anything, but it may not be a good idea to use the .php extension or it
+; may conflict with a real PHP file.
+; Default Value: not set
+;ping.path = /ping
+
+; This directive may be used to customize the response of a ping request. The
+; response is formatted as text/plain with a 200 response code.
+; Default Value: pong
+;ping.response = pong
+
+; The access log file
+; Default: not set
+;access.log = log/$pool.access.log
+
+; The access log format.
+; The following syntax is allowed
+; %%: the '%' character
+; %C: %CPU used by the request
+; it can accept the following format:
+; - %{user}C for user CPU only
+; - %{system}C for system CPU only
+; - %{total}C for user + system CPU (default)
+; %d: time taken to serve the request
+; it can accept the following format:
+; - %{seconds}d (default)
+; - %{milliseconds}d
+; - %{milli}d
+; - %{microseconds}d
+; - %{micro}d
+; %e: an environment variable (same as $_ENV or $_SERVER)
+; it must be associated with embraces to specify the name of the env
+; variable. Some examples:
+; - server specifics like: %{REQUEST_METHOD}e or %{SERVER_PROTOCOL}e
+; - HTTP headers like: %{HTTP_HOST}e or %{HTTP_USER_AGENT}e
+; %f: script filename
+; %l: content-length of the request (for POST request only)
+; %m: request method
+; %M: peak of memory allocated by PHP
+; it can accept the following format:
+; - %{bytes}M (default)
+; - %{kilobytes}M
+; - %{kilo}M
+; - %{megabytes}M
+; - %{mega}M
+; %n: pool name
+; %o: output header
+; it must be associated with embraces to specify the name of the header:
+; - %{Content-Type}o
+; - %{X-Powered-By}o
+; - %{Transfert-Encoding}o
+; - ....
+; %p: PID of the child that serviced the request
+; %P: PID of the parent of the child that serviced the request
+; %q: the query string
+; %Q: the '?' character if query string exists
+; %r: the request URI (without the query string, see %q and %Q)
+; %R: remote IP address
+; %s: status (response code)
+; %t: server time the request was received
+; it can accept a strftime(3) format:
+; %d/%b/%Y:%H:%M:%S %z (default)
+; The strftime(3) format must be encapsulated in a %{}t tag
+; e.g. for a ISO8601 formatted timestring, use: %{%Y-%m-%dT%H:%M:%S%z}t
+; %T: time the log has been written (the request has finished)
+; it can accept a strftime(3) format:
+; %d/%b/%Y:%H:%M:%S %z (default)
+; The strftime(3) format must be encapsulated in a %{}t tag
+; e.g. for a ISO8601 formatted timestring, use: %{%Y-%m-%dT%H:%M:%S%z}t
+; %u: remote user
+;
+; Default: "%R - %u %t \"%m %r\" %s"
+;access.format = "%R - %u %t \"%m %r%Q%q\" %s %f %{milli}d %{kilo}M %C%%"
+
+; A list of request_uri values which should be filtered from the access log.
+;
+; As a security precuation, this setting will be ignored if:
+; - the request method is not GET or HEAD; or
+; - there is a request body; or
+; - there are query parameters; or
+; - the response code is outwith the successful range of 200 to 299
+;
+; Note: The paths are matched against the output of the access.format tag "%r".
+; On common configurations, this may look more like SCRIPT_NAME than the
+; expected pre-rewrite URI.
+;
+; Default Value: not set
+;access.suppress_path[] = /ping
+;access.suppress_path[] = /health_check.php
+
+; The log file for slow requests
+; Default Value: not set
+; Note: slowlog is mandatory if request_slowlog_timeout is set
+;slowlog = log/$pool.log.slow
+
+; The timeout for serving a single request after which a PHP backtrace will be
+; dumped to the 'slowlog' file. A value of '0s' means 'off'.
+; Available units: s(econds)(default), m(inutes), h(ours), or d(ays)
+; Default Value: 0
+;request_slowlog_timeout = 0
+
+; Depth of slow log stack trace.
+; Default Value: 20
+;request_slowlog_trace_depth = 20
+
+; The timeout for serving a single request after which the worker process will
+; be killed. This option should be used when the 'max_execution_time' ini option
+; does not stop script execution for some reason. A value of '0' means 'off'.
+; Available units: s(econds)(default), m(inutes), h(ours), or d(ays)
+; Default Value: 0
+;request_terminate_timeout = 0
+
+; The timeout set by 'request_terminate_timeout' ini option is not engaged after
+; application calls 'fastcgi_finish_request' or when application has finished and
+; shutdown functions are being called (registered via register_shutdown_function).
+; This option will enable timeout limit to be applied unconditionally
+; even in such cases.
+; Default Value: no
+;request_terminate_timeout_track_finished = no
+
+; Set open file descriptor rlimit.
+; Default Value: system defined value
+;rlimit_files = 1024
+
+; Set max core size rlimit.
+; Possible Values: 'unlimited' or an integer greater or equal to 0
+; Default Value: system defined value
+;rlimit_core = 0
+
+; Chroot to this directory at the start. This value must be defined as an
+; absolute path. When this value is not set, chroot is not used.
+; Note: you can prefix with '$prefix' to chroot to the pool prefix or one
+; of its subdirectories. If the pool prefix is not set, the global prefix
+; will be used instead.
+; Note: chrooting is a great security feature and should be used whenever
+; possible. However, all PHP paths will be relative to the chroot
+; (error_log, sessions.save_path, ...).
+; Default Value: not set
+;chroot =
+
+; Chdir to this directory at the start.
+; Note: relative path can be used.
+; Default Value: current directory or / when chroot
+;chdir = /var/www
+
+; Redirect worker stdout and stderr into main error log. If not set, stdout and
+; stderr will be redirected to /dev/null according to FastCGI specs.
+; Note: on highloaded environment, this can cause some delay in the page
+; process time (several ms).
+; Default Value: no
+;catch_workers_output = yes
+
+; Decorate worker output with prefix and suffix containing information about
+; the child that writes to the log and if stdout or stderr is used as well as
+; log level and time. This options is used only if catch_workers_output is yes.
+; Settings to "no" will output data as written to the stdout or stderr.
+; Default value: yes
+;decorate_workers_output = no
+
+; Clear environment in FPM workers
+; Prevents arbitrary environment variables from reaching FPM worker processes
+; by clearing the environment in workers before env vars specified in this
+; pool configuration are added.
+; Setting to "no" will make all environment variables available to PHP code
+; via getenv(), $_ENV and $_SERVER.
+; Default Value: yes
+;clear_env = no
+
+; Limits the extensions of the main script FPM will allow to parse. This can
+; prevent configuration mistakes on the web server side. You should only limit
+; FPM to .php extensions to prevent malicious users to use other extensions to
+; execute php code.
+; Note: set an empty value to allow all extensions.
+; Default Value: .php
+;security.limit_extensions = .php .php3 .php4 .php5 .php7
+
+; Pass environment variables like LD_LIBRARY_PATH. All $VARIABLEs are taken from
+; the current environment.
+; Default Value: clean env
+;env[HOSTNAME] = $HOSTNAME
+;env[PATH] = /usr/local/bin:/usr/bin:/bin
+;env[TMP] = /tmp
+;env[TMPDIR] = /tmp
+;env[TEMP] = /tmp
+
+; Additional php.ini defines, specific to this pool of workers. These settings
+; overwrite the values previously defined in the php.ini. The directives are the
+; same as the PHP SAPI:
+; php_value/php_flag - you can set classic ini defines which can
+; be overwritten from PHP call 'ini_set'.
+; php_admin_value/php_admin_flag - these directives won't be overwritten by
+; PHP call 'ini_set'
+; For php_*flag, valid values are on, off, 1, 0, true, false, yes or no.
+
+; Defining 'extension' will load the corresponding shared extension from
+; extension_dir. Defining 'disable_functions' or 'disable_classes' will not
+; overwrite previously defined php.ini values, but will append the new value
+; instead.
+
+; Note: path INI options can be relative and will be expanded with the prefix
+; (pool, global or /usr)
+
+; Default Value: nothing is defined by default except the values in php.ini and
+; specified at startup with the -d argument
+;php_admin_value[sendmail_path] = /usr/sbin/sendmail -t -i -f www@my.domain.com
+;php_flag[display_errors] = off
+;php_admin_value[error_log] = /var/log/fpm-php.www.log
+;php_admin_flag[log_errors] = on
+;php_admin_value[memory_limit] = 32M
diff --git a/src/deb/for-download/tools/imapsync/create-mail-sync.sh b/src/deb/for-download/tools/imapsync/create-mail-sync.sh
index e325754e..94762505 100644
--- a/src/deb/for-download/tools/imapsync/create-mail-sync.sh
+++ b/src/deb/for-download/tools/imapsync/create-mail-sync.sh
@@ -35,18 +35,35 @@ fi
TESTOPT=""
if [[ $TEST -eq 1 ]]; then
- TESTOPT="--justlogin"
+ TESTOPT="--justlogin"
fi
if [ ! -d "accounts" ]; then
mkdir accounts
fi
if [ -f "accounts/$EMAIL" ]; then
- echo "********* $EMAIL ALREADY EXISTS !!! ************"
+ echo "********* EMAIL $EMAIL ALREADY EXISTS !!! ************"
exit 1;
exit
fi
+euser=$(echo $EMAIL | cut -d '@' -f 1)
+domain=$(echo $EMAIL | cut -d '@' -f 2)
+user=$(/usr/local/vesta/bin/v-search-domain-owner $domain)
+if [ "$user" != "" ]; then
+ echo "=== Email '$EMAIL' has username email part '$euser', domain is '$domain', and belongs to myVesta account: $user"
+ if [ ! -d "/home/$user/mail/$domain" ]; then
+ echo "======= Creating '$domail' in MAIL section"
+ /usr/local/vesta/bin/v-add-mail-domain "$user" "$domain"
+ fi
+ if [ ! -d "/home/$user/mail/$domain/$euser" ]; then
+ echo "======= Creating '$euser' mail account for domain '$domain'"
+ /usr/local/vesta/bin/v-add-mail-account "$user" "$domain" "$euser" "$PASS2"
+ echo ""
+ fi
+fi
+
+
echo "Writing to: accounts/$EMAIL"
echo "#!/bin/bash
@@ -67,21 +84,20 @@ exit;
chmod a=rwx accounts/$EMAIL
if [[ $TEST -eq 0 ]]; then
- exit 0;
+ exit 0;
fi
accounts/$EMAIL
RET=$?
if [ $RET -eq 0 ]; then
- # echo "./create-mail-sync.sh $EMAIL $PASS $PASS2 $TEST"
- sed -i "s/--justlogin//g" accounts/$EMAIL
- echo "--- OK! ---"
- echo "./create-mail-sync.sh '$SRCHOST' '$EMAIL' '$PASS' '$PASS2' $TEST" >> accounts.log
+ # echo "./create-mail-sync.sh $EMAIL $PASS $PASS2 $TEST"
+ sed -i "s/--justlogin//g" accounts/$EMAIL
+ echo "--- OK! ---"
+ echo "./create-mail-sync.sh '$SRCHOST' '$EMAIL' '$PASS' '$PASS2' $TEST" >> accounts.log
else
- echo "********* $EMAIL ERROR !!! [ret: $RET ] ************"
- echo "********* $EMAIL ERROR !!! [ret: $RET ] ************"
- echo "********* $EMAIL ERROR !!! [ret: $RET ] ************"
- rm accounts/$EMAIL
+ echo "********* $EMAIL ERROR !!! [ret: $RET ] ************"
+ rm accounts/$EMAIL
+ read -p "=== Press ENTER to continue ===" entered
fi
exit $RET;
diff --git a/src/deb/for-download/tools/imapsync/import-from-file.sh b/src/deb/for-download/tools/imapsync/import-from-file.sh
new file mode 100644
index 00000000..ac0c42f4
--- /dev/null
+++ b/src/deb/for-download/tools/imapsync/import-from-file.sh
@@ -0,0 +1,56 @@
+#!/bin/bash
+#
+# This script reads email and password=s in following format:
+# email1 pass
+# email2 pass
+# email3 pass
+
+# The first parameter is the text file from which we read emails and passwords
+# The second parameter is SMTP Hostname
+# The third parameter is domain if lines contains only username part
+
+
+host=''
+if [ $# -gt 1 ]; then
+ host=$2
+else
+ echo "Usage: ./import-from-file.sh 'FILE' 'SMTPHOST' ['DOMAIN']"
+ exit 1;
+fi
+
+domain=''
+if [ $# -gt 2 ]; then
+ domain=$3
+fi
+
+end_of_file=0
+while [[ $end_of_file == 0 ]]; do
+
+ read -r line
+ end_of_file=$?
+
+ if [ "$line" == "" ]; then
+ if [[ $end_of_file == 1 ]]; then
+ echo "===EOF==="
+ break;
+ fi
+ continue
+ fi
+
+ email=$(echo "$line" | awk '{print $1}')
+ pass=$(echo "$line" | awk '{print $2}')
+
+ if [[ $email != *"@"* ]]; then
+ email="$email@$domain"
+ fi
+
+ echo "Extracted: '$email' = '$pass'"
+
+ ./create-mail-sync.sh "$host" "$email" "$pass"
+
+ if [[ $end_of_file == 1 ]]; then
+ echo "===EOF==="
+ break;
+ fi
+
+done < $1
diff --git a/src/deb/for-download/tools/install-new-roundcube.sh b/src/deb/for-download/tools/install-new-roundcube.sh
index 8838e0ab..0f6a343a 100644
--- a/src/deb/for-download/tools/install-new-roundcube.sh
+++ b/src/deb/for-download/tools/install-new-roundcube.sh
@@ -3,7 +3,7 @@
USER='webmail'
DOMAIN='' # enter domain or subdomain
-VERSION='1.6.1'
+VERSION='1.6.6'
DOWNLOAD="https://github.com/roundcube/roundcubemail/releases/download/$VERSION/roundcubemail-$VERSION-complete.tar.gz"
LOGINMESSAGE1='Click here for NEW Webmail'
diff --git a/src/deb/for-download/tools/install-rocket-nginx.sh b/src/deb/for-download/tools/install-rocket-nginx.sh
index 20364f80..ca1f8b2a 100644
--- a/src/deb/for-download/tools/install-rocket-nginx.sh
+++ b/src/deb/for-download/tools/install-rocket-nginx.sh
@@ -1,5 +1,12 @@
#!/bin/bash
+wget -nv -O /usr/local/vesta/data/templates/web/nginx/wprocket-force-https.tpl https://c.myvestacp.com/tools/rocket-nginx-templates/wprocket-force-https.tpl
+wget -nv -O /usr/local/vesta/data/templates/web/nginx/wprocket-force-https.stpl https://c.myvestacp.com/tools/rocket-nginx-templates/wprocket-force-https.stpl
+wget -nv -O /usr/local/vesta/data/templates/web/nginx/wprocket-hosting.tpl https://c.myvestacp.com/tools/rocket-nginx-templates/wprocket-hosting.tpl
+wget -nv -O /usr/local/vesta/data/templates/web/nginx/wprocket-hosting.stpl https://c.myvestacp.com/tools/rocket-nginx-templates/wprocket-hosting.stpl
+wget -nv -O /usr/local/vesta/data/templates/web/nginx/wprocket-webp-express-force-https.tpl https://c.myvestacp.com/tools/rocket-nginx-templates/wprocket-webp-express-force-https.tpl
+wget -nv -O /usr/local/vesta/data/templates/web/nginx/wprocket-webp-express-force-https.stpl https://c.myvestacp.com/tools/rocket-nginx-templates/wprocket-webp-express-force-https.stpl
+
echo "Updating apt, please wait..."
apt-get update > /dev/null 2>&1
@@ -17,9 +24,6 @@ fi
cd rocket-nginx
cp rocket-nginx.ini.disabled rocket-nginx.ini
php rocket-parser.php
-/usr/local/vesta/bin/v-php-func 'strip_once_in_file_between_including_borders' '/etc/nginx/rocket-nginx/conf.d/default.conf' '# BROWSER MEDIA CACHE' '}'
-
-wget -nv -O /usr/local/vesta/data/templates/web/nginx/wprocket-force-https.tpl https://c.myvestacp.com/tools/rocket-nginx-templates/wprocket-force-https.tpl
-wget -nv -O /usr/local/vesta/data/templates/web/nginx/wprocket-force-https.stpl https://c.myvestacp.com/tools/rocket-nginx-templates/wprocket-force-https.stpl
-wget -nv -O /usr/local/vesta/data/templates/web/nginx/wprocket-hosting.tpl https://c.myvestacp.com/tools/rocket-nginx-templates/wprocket-hosting.tpl
-wget -nv -O /usr/local/vesta/data/templates/web/nginx/wprocket-hosting.stpl https://c.myvestacp.com/tools/rocket-nginx-templates/wprocket-hosting.stpl
+if [ -f "/etc/nginx/rocket-nginx/conf.d/default.conf" ]; then
+ /usr/local/vesta/bin/v-php-func 'strip_once_in_file_between_including_borders' '/etc/nginx/rocket-nginx/conf.d/default.conf' '# BROWSER MEDIA CACHE' '}'
+fi
diff --git a/src/deb/for-download/tools/multi-php-install.sh b/src/deb/for-download/tools/multi-php-install.sh
index 88528e92..aa1b7353 100644
--- a/src/deb/for-download/tools/multi-php-install.sh
+++ b/src/deb/for-download/tools/multi-php-install.sh
@@ -13,6 +13,8 @@ inst_74=0
inst_80=0
inst_81=0
inst_82=0
+inst_83=0
+inst_84=0
#######################################################################
@@ -56,8 +58,14 @@ fi
if [ $# -gt 9 ]; then
inst_82=${10}
fi
+if [ $# -gt 10 ]; then
+ inst_83=${11}
+fi
+if [ $# -gt 11 ]; then
+ inst_84=${12}
+fi
-if [ $inst_56 -eq 1 ] || [ $inst_70 -eq 1 ] || [ $inst_71 -eq 1 ] || [ $inst_72 -eq 1 ] || [ $inst_73 -eq 1 ] || [ $inst_74 -eq 1 ] || [ $inst_80 -eq 1 ] || [ $inst_81 -eq 1 ] || [ $inst_82 -eq 1 ]; then
+if [ $inst_56 -eq 1 ] || [ $inst_70 -eq 1 ] || [ $inst_71 -eq 1 ] || [ $inst_72 -eq 1 ] || [ $inst_73 -eq 1 ] || [ $inst_74 -eq 1 ] || [ $inst_80 -eq 1 ] || [ $inst_81 -eq 1 ] || [ $inst_82 -eq 1 ] || [ $inst_83 -eq 1 ] || [ $inst_84 -eq 1 ]; then
inst_repo=1
fi
@@ -87,6 +95,8 @@ echo "inst_74=$inst_74"
echo "inst_80=$inst_80"
echo "inst_81=$inst_81"
echo "inst_82=$inst_82"
+echo "inst_83=$inst_83"
+echo "inst_84=$inst_84"
echo "wait_to_press_enter=$wait_to_press_enter"
press_enter "=== Press enter to continue ==============================================================================="
@@ -95,16 +105,12 @@ apt update
if [ "$inst_repo" -eq 1 ]; then
press_enter "=== Press enter to install sury.org repo ==============================================================================="
apt -y install apt-transport-https ca-certificates
- wget -nv -O /etc/apt/trusted.gpg.d/php.gpg https://packages.sury.org/php/apt.gpg
- if [ $debian_version -eq 8 ]; then
- sh -c 'echo "deb https://packages.sury.org/php/ jessie main" > /etc/apt/sources.list.d/php.list'
- fi
- if [ $debian_version -eq 9 ]; then
- sh -c 'echo "deb https://packages.sury.org/php/ stretch main" > /etc/apt/sources.list.d/php.list'
- fi
- if [ $debian_version -eq 10 ]; then
- sh -c 'echo "deb https://packages.sury.org/php/ buster main" > /etc/apt/sources.list.d/php.list'
+ if [ $debian_version -ge 11 ]; then
+ wget -nv -O /etc/apt/trusted.gpg.d/php.gpg https://packages.sury.org/php/apt.gpg
fi
+ # if [ $debian_version -eq 10 ]; then
+ # sh -c 'echo "deb https://packages.sury.org/php/ buster main" > /etc/apt/sources.list.d/php.list'
+ # fi
if [ $debian_version -eq 11 ]; then
sh -c 'echo "deb https://packages.sury.org/php/ bullseye main" > /etc/apt/sources.list.d/php.list'
fi
@@ -112,7 +118,7 @@ if [ "$inst_repo" -eq 1 ]; then
sh -c 'echo "deb https://packages.sury.org/php/ bookworm main" > /etc/apt/sources.list.d/php.list'
fi
apt update
- apt upgrade -y
+ # apt upgrade -y
press_enter "=== Press enter to continue ==============================================================================="
fi
@@ -344,9 +350,63 @@ if [ "$inst_82" -eq 1 ]; then
press_enter "=== PHP 8.2 installed, press enter to continue ==============================================================================="
fi
+if [ "$inst_83" -eq 1 ]; then
+ press_enter "=== Press enter to install PHP 8.3 ==============================================================================="
+ apt -y install php8.3-mbstring php8.3-bcmath php8.3-cli php8.3-curl php8.3-fpm php8.3-gd php8.3-intl php8.3-mysql php8.3-soap php8.3-xml php8.3-zip php8.3-memcache php8.3-memcached php8.3-imagick
+ update-rc.d php8.3-fpm defaults
+ a2enconf php8.3-fpm
+ a2dismod php8.3
+ apt-get -y remove libapache2-mod-php8.3
+ systemctl restart apache2
+ cp -r /etc/php/8.3/ /root/vst_install_backups/php8.3/
+ wget -nv https://c.myvestacp.com/tools/apache-fpm-tpl/PHP-FPM-83.stpl -O /usr/local/vesta/data/templates/web/apache2/PHP-FPM-83.stpl
+ wget -nv https://c.myvestacp.com/tools/apache-fpm-tpl/PHP-FPM-83.tpl -O /usr/local/vesta/data/templates/web/apache2/PHP-FPM-83.tpl
+ wget -nv https://c.myvestacp.com/tools/apache-fpm-tpl/PHP-FPM-83.sh -O /usr/local/vesta/data/templates/web/apache2/PHP-FPM-83.sh
+ wget -nv https://c.myvestacp.com/tools/apache-fpm-tpl/PHP-FPM-83-public.stpl -O /usr/local/vesta/data/templates/web/apache2/PHP-FPM-83-public.stpl
+ wget -nv https://c.myvestacp.com/tools/apache-fpm-tpl/PHP-FPM-83-public.tpl -O /usr/local/vesta/data/templates/web/apache2/PHP-FPM-83-public.tpl
+ wget -nv https://c.myvestacp.com/tools/apache-fpm-tpl/PHP-FPM-83-public.sh -O /usr/local/vesta/data/templates/web/apache2/PHP-FPM-83-public.sh
+ chmod a+x /usr/local/vesta/data/templates/web/apache2/PHP-FPM-83.sh
+ chmod a+x /usr/local/vesta/data/templates/web/apache2/PHP-FPM-83-public.sh
+ echo "=== Patching php.ini for php8.3"
+ wget -nv https://c.myvestacp.com/tools/patches/php8.2.patch -O /root/php8.3.patch
+ patch /etc/php/8.3/fpm/php.ini < /root/php8.3.patch
+ if [ $memory -gt 9999999 ]; then
+ sed -i "s|opcache.memory_consumption=512|opcache.memory_consumption=2048|g" /etc/php/8.3/fpm/php.ini
+ fi
+ service php8.3-fpm restart
+ press_enter "=== PHP 8.3 installed, press enter to continue ==============================================================================="
+fi
-apt update > /dev/null 2>&1
-apt upgrade -y > /dev/null 2>&1
+if [ "$inst_84" -eq 1 ]; then
+ press_enter "=== Press enter to install PHP 8.4 ==============================================================================="
+ apt -y install php8.4-mbstring php8.4-bcmath php8.4-cli php8.4-curl php8.4-fpm php8.4-gd php8.4-intl php8.4-mysql php8.4-soap php8.4-xml php8.4-zip php8.4-memcache php8.4-memcached php8.4-imagick
+ update-rc.d php8.4-fpm defaults
+ a2enconf php8.4-fpm
+ a2dismod php8.4
+ apt-get -y remove libapache2-mod-php8.4
+ systemctl restart apache2
+ cp -r /etc/php/8.4/ /root/vst_install_backups/php8.4/
+ wget -nv https://c.myvestacp.com/tools/apache-fpm-tpl/PHP-FPM-84.stpl -O /usr/local/vesta/data/templates/web/apache2/PHP-FPM-84.stpl
+ wget -nv https://c.myvestacp.com/tools/apache-fpm-tpl/PHP-FPM-84.tpl -O /usr/local/vesta/data/templates/web/apache2/PHP-FPM-84.tpl
+ wget -nv https://c.myvestacp.com/tools/apache-fpm-tpl/PHP-FPM-84.sh -O /usr/local/vesta/data/templates/web/apache2/PHP-FPM-84.sh
+ wget -nv https://c.myvestacp.com/tools/apache-fpm-tpl/PHP-FPM-84-public.stpl -O /usr/local/vesta/data/templates/web/apache2/PHP-FPM-84-public.stpl
+ wget -nv https://c.myvestacp.com/tools/apache-fpm-tpl/PHP-FPM-84-public.tpl -O /usr/local/vesta/data/templates/web/apache2/PHP-FPM-84-public.tpl
+ wget -nv https://c.myvestacp.com/tools/apache-fpm-tpl/PHP-FPM-84-public.sh -O /usr/local/vesta/data/templates/web/apache2/PHP-FPM-84-public.sh
+ chmod a+x /usr/local/vesta/data/templates/web/apache2/PHP-FPM-84.sh
+ chmod a+x /usr/local/vesta/data/templates/web/apache2/PHP-FPM-84-public.sh
+ echo "=== Patching php.ini for php8.4"
+ wget -nv https://c.myvestacp.com/tools/patches/php8.2.patch -O /root/php8.4.patch
+ patch /etc/php/8.4/fpm/php.ini < /root/php8.4.patch
+ if [ $memory -gt 9999999 ]; then
+ sed -i "s|opcache.memory_consumption=512|opcache.memory_consumption=2048|g" /etc/php/8.4/fpm/php.ini
+ fi
+ service php8.4-fpm restart
+ press_enter "=== PHP 8.4 installed, press enter to continue ==============================================================================="
+fi
+
+
+# apt update > /dev/null 2>&1
+# apt upgrade -y > /dev/null 2>&1
if [ $debian_version -ge 10 ]; then
a2dismod ruid2 > /dev/null 2>&1
@@ -360,8 +420,44 @@ if [ $debian_version -ge 10 ]; then
a2dismod php8.0 > /dev/null 2>&1
a2dismod php8.1 > /dev/null 2>&1
a2dismod php8.2 > /dev/null 2>&1
+ a2dismod php8.3 > /dev/null 2>&1
+ a2dismod php8.4 > /dev/null 2>&1
a2dismod mpm_prefork > /dev/null 2>&1
a2enmod mpm_event > /dev/null 2>&1
apt-get -y remove libapache2-mod-php* > /dev/null 2>&1
service apache2 restart
fi
+
+if [ -f "/usr/share/phpgate/phpgate.php" ]; then
+ echo "=== upgrading phpgate"
+ /usr/local/vesta/bin/v-commander 'm' 'inst pgw' 'q'
+ echo "=== upgrading phpgate done."
+ echo ""
+fi
+
+if [ -f "/usr/local/bin/tailf_apache_error.php" ]; then
+ echo "=== upgrading tailf_apache_error.php"
+ wget -nv http://dl.myvestacp.com/vesta/tailf.php -O /usr/local/bin/tailf.php
+ wget -nv http://dl.myvestacp.com/vesta/tailf_apache_error.php -O /usr/local/bin/tailf_apache_error.php
+ wget -nv http://dl.myvestacp.com/vesta/see-apache-processlist-once.sh -O /usr/local/bin/see-apache-processlist-once.sh
+ wget -nv http://dl.myvestacp.com/vesta/see-mysql-processlist-once.sh -O /usr/local/bin/see-mysql-processlist-once.sh
+ chmod u+x /usr/local/bin/see-apache-processlist-once.sh
+ chmod u+x /usr/local/bin/see-mysql-processlist-once.sh
+
+ # ps aux | grep 'tailf_apache_error' | grep -v "grep tailf_apache_error"
+ # echo $(ps aux | grep 'tailf_apache_error' | grep -v "grep tailf_apache_error" | awk '{print $2}')
+ kill $(ps aux | grep 'tailf_apache_error' | grep -v "grep tailf_apache_error" | awk '{print $2}')
+ sleep 1
+ # ps -Af | grep 'tailf_apache_error' | grep -v "grep tailf_apache_error"
+ # sleep 1
+ nohup php /usr/local/bin/tailf_apache_error.php > /var/log/tailf_apache_error.log &
+ echo "=== upgrading tailf_apache_error.php done."
+ sleep 3
+ echo ""
+fi
+
+# Fixing php.ini files to have the correct disable_functions line
+/usr/local/vesta/bin/v-fix-php-ini-disable-functions
+
+echo "Everything done."
+echo ""
diff --git a/src/deb/for-download/tools/nginx-templates/hosting-webp-smush.stpl b/src/deb/for-download/tools/nginx-templates/hosting-webp-smush.stpl
new file mode 100644
index 00000000..7597746c
--- /dev/null
+++ b/src/deb/for-download/tools/nginx-templates/hosting-webp-smush.stpl
@@ -0,0 +1,56 @@
+server {
+ listen %ip%:%proxy_ssl_port% ssl http2;
+ server_name %domain_idn% %alias_idn%;
+ # #ssl_on;
+ ssl_certificate %ssl_pem%;
+ ssl_certificate_key %ssl_key%;
+ error_log /var/log/%web_system%/domains/%domain%.error.log error;
+
+ location / {
+ proxy_pass https://%ip%:%web_ssl_port%;
+
+ # BEGIN SMUSH-WEBP
+ location ~* "wp-content\/(uploads\/)(.*.(?:png|jpe?g))" {
+ root %sdocroot%;
+ add_header Vary Accept;
+ expires max;
+ set $image_path $2;
+ if (-f "%sdocroot%/wp-content/smush-webp/disable_smush_webp") {
+ break;
+ }
+ if ($http_accept !~* "webp") {
+ break;
+ }
+ # add_header X_WebP_Try /wp-content/smush-webp/$image_path.webp;
+ try_files /wp-content/smush-webp/$image_path.webp $uri =404;
+ }
+ # END SMUSH-WEBP
+
+ location ~* ^.+\.(%proxy_extentions%)$ {
+ root %sdocroot%;
+ access_log /var/log/%web_system%/domains/%domain%.log combined;
+ access_log /var/log/%web_system%/domains/%domain%.bytes bytes;
+ expires max;
+ # try_files $uri @fallback;
+ }
+ }
+
+ location /error/ {
+ alias %home%/%user%/web/%domain%/document_errors/;
+ }
+
+ location @fallback {
+ proxy_pass https://%ip%:%web_ssl_port%;
+ }
+
+ location ~ /\.ht {return 404;}
+ location ~ /\.svn/ {return 404;}
+ location ~ /\.git/ {return 404;}
+ location ~ /\.hg/ {return 404;}
+ location ~ /\.bzr/ {return 404;}
+
+ disable_symlinks if_not_owner from=%docroot%;
+
+ include %home%/%user%/conf/web/snginx.%domain%.conf*;
+}
+
diff --git a/src/deb/for-download/tools/nginx-templates/hosting-webp-smush.tpl b/src/deb/for-download/tools/nginx-templates/hosting-webp-smush.tpl
new file mode 100644
index 00000000..7e408254
--- /dev/null
+++ b/src/deb/for-download/tools/nginx-templates/hosting-webp-smush.tpl
@@ -0,0 +1,52 @@
+server {
+ listen %ip%:%proxy_port%;
+ server_name %domain_idn% %alias_idn%;
+ error_log /var/log/%web_system%/domains/%domain%.error.log error;
+
+ location / {
+ proxy_pass http://%ip%:%web_port%;
+
+ # BEGIN SMUSH-WEBP
+ location ~* "wp-content\/(uploads\/)(.*.(?:png|jpe?g))" {
+ root %sdocroot%;
+ add_header Vary Accept;
+ expires max;
+ set $image_path $2;
+ if (-f "%sdocroot%/wp-content/smush-webp/disable_smush_webp") {
+ break;
+ }
+ if ($http_accept !~* "webp") {
+ break;
+ }
+ # add_header X_WebP_Try /wp-content/smush-webp/$image_path.webp;
+ try_files /wp-content/smush-webp/$image_path.webp $uri =404;
+ }
+ # END SMUSH-WEBP
+
+ location ~* ^.+\.(%proxy_extentions%)$ {
+ root %docroot%;
+ access_log /var/log/%web_system%/domains/%domain%.log combined;
+ access_log /var/log/%web_system%/domains/%domain%.bytes bytes;
+ # try_files $uri @fallback;
+ }
+ }
+
+ location /error/ {
+ alias %home%/%user%/web/%domain%/document_errors/;
+ }
+
+ location @fallback {
+ proxy_pass http://%ip%:%web_port%;
+ }
+
+ location ~ /\.ht {return 404;}
+ location ~ /\.svn/ {return 404;}
+ location ~ /\.git/ {return 404;}
+ location ~ /\.hg/ {return 404;}
+ location ~ /\.bzr/ {return 404;}
+
+ disable_symlinks if_not_owner from=%docroot%;
+
+ include %home%/%user%/conf/web/nginx.%domain%.conf*;
+}
+
diff --git a/src/deb/for-download/tools/nginx-templates/wp-super-cache.stpl b/src/deb/for-download/tools/nginx-templates/wp-super-cache.stpl
new file mode 100644
index 00000000..3bed6ce3
--- /dev/null
+++ b/src/deb/for-download/tools/nginx-templates/wp-super-cache.stpl
@@ -0,0 +1,87 @@
+server {
+ listen %ip%:%proxy_ssl_port% ssl;
+ http2 on;
+ server_name %domain_idn% %alias_idn%;
+ root %sdocroot%;
+
+ ssl_certificate %ssl_pem%;
+ ssl_certificate_key %ssl_key%;
+ error_log /var/log/%web_system%/domains/%domain%.error.log error;
+
+ set $cache_uri $request_uri;
+ set $caching 'ON';
+
+ # POST requests and urls with a query string should always go to PHP
+ if ($request_method = POST) {
+ set $caching 'OFF';
+ }
+
+ if ($query_string ~* "(fb_action_ids=|fb_action_types=|fb_source=|fbclid=|utm_source=|utm_campaign=|utm_medium=|utm_expid=|utm_term=|utm_content=|utm_id=|utm_source_platform=|utm_creative_format=|utm_marketing_tactic=|_ga=|gclid=|campaignid=|adgroupid=|adid=|gbraid=|wbraid=|_gl=|gclsrc=|gdfms=|gdftrk=|gdffi=|_ke=|_kx=|trk_contact=|trk_msg=|trk_module=|trk_sid=|mc_cid=|mc_eid=|mkwid=|pcrid=|mtm_source=|mtm_medium=|mtm_campaign=|mtm_keyword=|mtm_cid=|mtm_content=|msclkid=|epik=|pp=|pk_source=|pk_medium=|pk_campaign=|pk_keyword=|pk_cid=|pk_content=|redirect_log_mongo_id=|redirect_mongo_id=|sb_referer_host=)") {
+ set $query_string_cachable 1;
+ }
+
+ if ($query_string != "") {
+ set $query_string_cacheable 1$query_string_cacheable;
+ }
+
+ if ($query_string_cacheable = 11) {
+ set $caching 'ON';
+ }
+
+ if ($query_string_cacheable = 1) {
+ set $caching 'OFF';
+ }
+
+ # Don't cache uris containing the following segments
+ if ($request_uri ~* "(/wp-admin/|/xmlrpc.php|/wp-(app|cron|login|register|mail).php|wp-.*.php|/feed/|index.php|wp-comments-popup.php|wp-links-opml.php|wp-locations.php|sitemap(_index)?.xml|[a-z0–9_-]+-sitemap([0–9]+)?.xml)") {
+ set $caching 'OFF';
+ }
+
+ # Don't use the cache for logged-in users or recent commenters
+ if ($http_cookie ~* "comment_author|wordpress_[a-f0–9]+|wp-postpass|wordpress_logged_in") {
+ set $caching 'OFF';
+ }
+
+ if ($caching = 'ON') {
+ set $cachefile "/wp-content/cache/supercache/$http_host/$cache_uri/index-https.html";
+ set $cachestatus 'HIT';
+ }
+
+ if ($caching = 'OFF') {
+ set $cachestatus 'MISS';
+ }
+
+ add_header X-Cache-Status $cachestatus;
+ add_header X-Cache-File $cachefile;
+
+ location / {
+ try_files $cachefile @fallback;
+ location ~* ^.+\.(%proxy_extentions%)$ {
+ root %sdocroot%;
+ access_log /var/log/%web_system%/domains/%domain%.log combined;
+ access_log /var/log/%web_system%/domains/%domain%.bytes bytes;
+ expires max;
+ # try_files $uri @fallback;
+ }
+ }
+
+ location /error/ {
+ alias %home%/%user%/web/%domain%/document_errors/;
+ }
+
+ location @fallback {
+ proxy_pass https://%ip%:%web_ssl_port%;
+ }
+
+ location ~ /\.ht {return 404;}
+ location ~ /\.env {return 404;}
+ location ~ /\.svn/ {return 404;}
+ location ~ /\.git/ {return 404;}
+ location ~ /\.hg/ {return 404;}
+ location ~ /\.bzr/ {return 404;}
+
+ disable_symlinks if_not_owner from=%docroot%;
+
+ include %home%/%user%/conf/web/*nginx.%domain_idn%.conf_letsencrypt;
+ include %home%/%user%/conf/web/s%proxy_system%.%domain%.conf*;
+}
diff --git a/src/deb/for-download/tools/nginx-templates/wp-super-cache.tpl b/src/deb/for-download/tools/nginx-templates/wp-super-cache.tpl
new file mode 100644
index 00000000..5a463370
--- /dev/null
+++ b/src/deb/for-download/tools/nginx-templates/wp-super-cache.tpl
@@ -0,0 +1,8 @@
+server {
+ listen %ip%:%proxy_port%;
+ server_name %domain_idn% %alias_idn%;
+ location / {
+ rewrite ^(.*) https://$host$1 permanent;
+ }
+include %home%/%user%/conf/web/*nginx.%domain_idn%.conf_letsencrypt;
+}
diff --git a/src/deb/for-download/tools/nodejs-nginx-templates/node-app-3000-no-https-force.stpl b/src/deb/for-download/tools/nodejs-nginx-templates/node-app-3000-no-https-force.stpl
index d66f80be..f49e99dc 100644
--- a/src/deb/for-download/tools/nodejs-nginx-templates/node-app-3000-no-https-force.stpl
+++ b/src/deb/for-download/tools/nodejs-nginx-templates/node-app-3000-no-https-force.stpl
@@ -1,53 +1,54 @@
-server {
- listen %ip%:%proxy_ssl_port%;
- server_name %domain_idn% %alias_idn%;
- ssl on;
- ssl_certificate %ssl_pem%;
- ssl_certificate_key %ssl_key%;
- error_log /var/log/%web_system%/domains/%domain%.error.log error;
-
- # test %port_num%
- ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
- ssl_prefer_server_ciphers on;
- ssl_ciphers 'EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH';
-
- root %sdocroot%/public;
- index index.html;
-
- location / {
- proxy_pass http://localhost:3000;
- proxy_http_version 1.1;
- proxy_set_header Upgrade $http_upgrade;
- proxy_set_header Connection 'upgrade';
- proxy_set_header Host $host;
- proxy_cache_bypass $http_upgrade;
-
-
- # try_files $uri $uri/ @rewrites;
-
- location ~* ^.+\.(%proxy_extentions%)$ {
- access_log /var/log/%web_system%/domains/%domain%.log combined;
- access_log /var/log/%web_system%/domains/%domain%.bytes bytes;
- expires max;
- }
- }
-
- location @rewrites {
- rewrite ^(.+)$ /index.html last;
- }
-
- location /error/ {
- alias %home%/%user%/web/%domain%/document_errors/;
- }
-
-
+server {
+ listen %ip%:%proxy_ssl_port% ssl;
+ server_name %domain_idn% %alias_idn%;
+ # ssl on;
+ # http2 on;
+ ssl_certificate %ssl_pem%;
+ ssl_certificate_key %ssl_key%;
+ error_log /var/log/%web_system%/domains/%domain%.error.log error;
+
+ # test %port_num%
+ ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
+ ssl_prefer_server_ciphers on;
+ ssl_ciphers 'EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH';
+
+ root %sdocroot%/public;
+ index index.html;
+
+ location / {
+ proxy_pass http://localhost:3000;
+ proxy_http_version 1.1;
+ proxy_set_header Upgrade $http_upgrade;
+ proxy_set_header Connection 'upgrade';
+ proxy_set_header Host $host;
+ proxy_cache_bypass $http_upgrade;
+
+
+ # try_files $uri $uri/ @rewrites;
+
+ location ~* ^.+\.(%proxy_extentions%)$ {
+ access_log /var/log/%web_system%/domains/%domain%.log combined;
+ access_log /var/log/%web_system%/domains/%domain%.bytes bytes;
+ expires max;
+ }
+ }
+
+ location @rewrites {
+ rewrite ^(.+)$ /index.html last;
+ }
+
+ location /error/ {
+ alias %home%/%user%/web/%domain%/document_errors/;
+ }
+
+
location ~ /\.ht {return 404;}
- location ~ /\.env {return 404;}
- location ~ /\.svn/ {return 404;}
- location ~ /\.git/ {return 404;}
- location ~ /\.hg/ {return 404;}
- location ~ /\.bzr/ {return 404;}
-
- include %home%/%user%/conf/web/*nginx.%domain_idn%.conf_letsencrypt;
- include %home%/%user%/conf/web/s%proxy_system%.%domain%.conf*;
+ location ~ /\.env {return 404;}
+ location ~ /\.svn/ {return 404;}
+ location ~ /\.git/ {return 404;}
+ location ~ /\.hg/ {return 404;}
+ location ~ /\.bzr/ {return 404;}
+
+ include %home%/%user%/conf/web/*nginx.%domain_idn%.conf_letsencrypt;
+ include %home%/%user%/conf/web/s%proxy_system%.%domain%.conf*;
}
\ No newline at end of file
diff --git a/src/deb/for-download/tools/nodejs-nginx-templates/node-app-3000-pass-to-https.stpl b/src/deb/for-download/tools/nodejs-nginx-templates/node-app-3000-pass-to-https.stpl
index 27dd354b..1387a879 100644
--- a/src/deb/for-download/tools/nodejs-nginx-templates/node-app-3000-pass-to-https.stpl
+++ b/src/deb/for-download/tools/nodejs-nginx-templates/node-app-3000-pass-to-https.stpl
@@ -1,7 +1,8 @@
server {
- listen %ip%:%proxy_ssl_port%;
+ listen %ip%:%proxy_ssl_port% ssl;
server_name %domain_idn% %alias_idn%;
- ssl on;
+ # ssl on;
+ # http2 on;
ssl_certificate %ssl_pem%;
ssl_certificate_key %ssl_key%;
error_log /var/log/%web_system%/domains/%domain%.error.log error;
diff --git a/src/deb/for-download/tools/nodejs-nginx-templates/node-app-3000.stpl b/src/deb/for-download/tools/nodejs-nginx-templates/node-app-3000.stpl
index d66f80be..f49e99dc 100644
--- a/src/deb/for-download/tools/nodejs-nginx-templates/node-app-3000.stpl
+++ b/src/deb/for-download/tools/nodejs-nginx-templates/node-app-3000.stpl
@@ -1,53 +1,54 @@
-server {
- listen %ip%:%proxy_ssl_port%;
- server_name %domain_idn% %alias_idn%;
- ssl on;
- ssl_certificate %ssl_pem%;
- ssl_certificate_key %ssl_key%;
- error_log /var/log/%web_system%/domains/%domain%.error.log error;
-
- # test %port_num%
- ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
- ssl_prefer_server_ciphers on;
- ssl_ciphers 'EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH';
-
- root %sdocroot%/public;
- index index.html;
-
- location / {
- proxy_pass http://localhost:3000;
- proxy_http_version 1.1;
- proxy_set_header Upgrade $http_upgrade;
- proxy_set_header Connection 'upgrade';
- proxy_set_header Host $host;
- proxy_cache_bypass $http_upgrade;
-
-
- # try_files $uri $uri/ @rewrites;
-
- location ~* ^.+\.(%proxy_extentions%)$ {
- access_log /var/log/%web_system%/domains/%domain%.log combined;
- access_log /var/log/%web_system%/domains/%domain%.bytes bytes;
- expires max;
- }
- }
-
- location @rewrites {
- rewrite ^(.+)$ /index.html last;
- }
-
- location /error/ {
- alias %home%/%user%/web/%domain%/document_errors/;
- }
-
-
+server {
+ listen %ip%:%proxy_ssl_port% ssl;
+ server_name %domain_idn% %alias_idn%;
+ # ssl on;
+ # http2 on;
+ ssl_certificate %ssl_pem%;
+ ssl_certificate_key %ssl_key%;
+ error_log /var/log/%web_system%/domains/%domain%.error.log error;
+
+ # test %port_num%
+ ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
+ ssl_prefer_server_ciphers on;
+ ssl_ciphers 'EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH';
+
+ root %sdocroot%/public;
+ index index.html;
+
+ location / {
+ proxy_pass http://localhost:3000;
+ proxy_http_version 1.1;
+ proxy_set_header Upgrade $http_upgrade;
+ proxy_set_header Connection 'upgrade';
+ proxy_set_header Host $host;
+ proxy_cache_bypass $http_upgrade;
+
+
+ # try_files $uri $uri/ @rewrites;
+
+ location ~* ^.+\.(%proxy_extentions%)$ {
+ access_log /var/log/%web_system%/domains/%domain%.log combined;
+ access_log /var/log/%web_system%/domains/%domain%.bytes bytes;
+ expires max;
+ }
+ }
+
+ location @rewrites {
+ rewrite ^(.+)$ /index.html last;
+ }
+
+ location /error/ {
+ alias %home%/%user%/web/%domain%/document_errors/;
+ }
+
+
location ~ /\.ht {return 404;}
- location ~ /\.env {return 404;}
- location ~ /\.svn/ {return 404;}
- location ~ /\.git/ {return 404;}
- location ~ /\.hg/ {return 404;}
- location ~ /\.bzr/ {return 404;}
-
- include %home%/%user%/conf/web/*nginx.%domain_idn%.conf_letsencrypt;
- include %home%/%user%/conf/web/s%proxy_system%.%domain%.conf*;
+ location ~ /\.env {return 404;}
+ location ~ /\.svn/ {return 404;}
+ location ~ /\.git/ {return 404;}
+ location ~ /\.hg/ {return 404;}
+ location ~ /\.bzr/ {return 404;}
+
+ include %home%/%user%/conf/web/*nginx.%domain_idn%.conf_letsencrypt;
+ include %home%/%user%/conf/web/s%proxy_system%.%domain%.conf*;
}
\ No newline at end of file
diff --git a/src/deb/for-download/tools/nodejs-nginx-templates/node-app-4000-and-websocket-6001.stpl b/src/deb/for-download/tools/nodejs-nginx-templates/node-app-4000-and-websocket-6001.stpl
index d8a23009..70fa2866 100644
--- a/src/deb/for-download/tools/nodejs-nginx-templates/node-app-4000-and-websocket-6001.stpl
+++ b/src/deb/for-download/tools/nodejs-nginx-templates/node-app-4000-and-websocket-6001.stpl
@@ -1,7 +1,8 @@
server {
- listen %ip%:%proxy_ssl_port%;
+ listen %ip%:%proxy_ssl_port% ssl;
server_name %domain_idn% %alias_idn%;
- ssl on;
+ # ssl on;
+ # http2 on;
ssl_certificate %ssl_pem%;
ssl_certificate_key %ssl_key%;
error_log /var/log/%web_system%/domains/%domain%.error.log error;
diff --git a/src/deb/for-download/tools/nodejs-nginx-templates/node-app-also-handle-static-files-3000.stpl b/src/deb/for-download/tools/nodejs-nginx-templates/node-app-also-handle-static-files-3000.stpl
index a6a0b744..415b6f9c 100644
--- a/src/deb/for-download/tools/nodejs-nginx-templates/node-app-also-handle-static-files-3000.stpl
+++ b/src/deb/for-download/tools/nodejs-nginx-templates/node-app-also-handle-static-files-3000.stpl
@@ -1,7 +1,8 @@
server {
- listen %ip%:%proxy_ssl_port%;
+ listen %ip%:%proxy_ssl_port% ssl;
server_name %domain_idn% %alias_idn%;
- ssl on;
+ # ssl on;
+ # http2 on;
ssl_certificate %ssl_pem%;
ssl_certificate_key %ssl_key%;
error_log /var/log/%web_system%/domains/%domain%.error.log error;
diff --git a/src/deb/for-download/tools/patches/exim_forwarding.patch b/src/deb/for-download/tools/patches/exim_forwarding.patch
index 1fa6d408..dcefe327 100644
--- a/src/deb/for-download/tools/patches/exim_forwarding.patch
+++ b/src/deb/for-download/tools/patches/exim_forwarding.patch
@@ -6,7 +6,7 @@
+ warn !authenticated = *
+ hosts = !+relay_from_hosts
-+ condition = ${lookup{$local_part@$domain}lsearch{/etc/exim4/domains/$domain/aliases}{true}{false}}
++ condition = ${lookup{$local_part@$domain}lsearch{/etc/exim4/domains/${lookup{$domain}dsearch{/etc/exim4/domains/}}/aliases}{true}{false}}
+ set acl_m3 = yes
+
deny message = Restricted characters in address
diff --git a/src/deb/for-download/tools/patches/fix-fpm-poold.sh b/src/deb/for-download/tools/patches/fix-fpm-poold.sh
index 94566768..311ef9cd 100644
--- a/src/deb/for-download/tools/patches/fix-fpm-poold.sh
+++ b/src/deb/for-download/tools/patches/fix-fpm-poold.sh
@@ -16,10 +16,10 @@ if [ -d "/etc/php" ]; then
find /etc/php/*/fpm/pool.d/ -name "*.conf" -type f -exec grep -l "$OLDVAL" {} \; | xargs sed -i "s|$OLDVAL|$NEWVAL|g"
find /usr/local/vesta/data/templates/web/apache2/ -type f -name "*.sh" -exec grep -l "$OLDVAL" {} \; | xargs sed -i "s|$OLDVAL|$NEWVAL|g"
- OLDVAL='pm.max_children = 8'
+ OLDVAL='pm.max_children = '
NEWVAL='pm.max_children = 3'
- find /etc/php/*/fpm/pool.d/ -name "*.conf" -type f -exec grep -l "$OLDVAL" {} \; | xargs sed -i "s|$OLDVAL|$NEWVAL|g"
- find /usr/local/vesta/data/templates/web/apache2/ -type f -name "*.sh" -exec grep -l "$OLDVAL" {} \; | xargs sed -i "s|$OLDVAL|$NEWVAL|g"
+ find /etc/php/*/fpm/pool.d/ -name "*.conf" -type f -exec grep -l "$OLDVAL" {} \; | xargs sed -i "s|$OLDVAL.*|$NEWVAL|g"
+ find /usr/local/vesta/data/templates/web/apache2/ -type f -name "*.sh" -exec grep -l "$OLDVAL" {} \; | xargs sed -i "s|$OLDVAL.*|$NEWVAL|g"
OLDVAL='request_terminate_timeout = '
NEWVAL='request_terminate_timeout = 360s'
diff --git a/src/deb/for-download/tools/patches/php8.2.patch b/src/deb/for-download/tools/patches/php8.2.patch
index 1083a720..ed127499 100644
--- a/src/deb/for-download/tools/patches/php8.2.patch
+++ b/src/deb/for-download/tools/patches/php8.2.patch
@@ -5,7 +5,7 @@
; It receives a comma-delimited list of function names.
; https://php.net/disable-functions
-disable_functions =
-+ disable_functions = pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,exec,system,passthru,shell_exec,proc_open,popen
++disable_functions = pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,exec,system,passthru,shell_exec,proc_open,popen
; This directive allows you to disable certain classes.
; It receives a comma-delimited list of class names.
diff --git a/src/deb/for-download/tools/rate-limit-tpl/force-https-firewall-burst-2-speed-2-conn-4.stpl b/src/deb/for-download/tools/rate-limit-tpl/force-https-firewall-burst-2-speed-2-conn-4.stpl
index d770ac6a..1f67154e 100644
--- a/src/deb/for-download/tools/rate-limit-tpl/force-https-firewall-burst-2-speed-2-conn-4.stpl
+++ b/src/deb/for-download/tools/rate-limit-tpl/force-https-firewall-burst-2-speed-2-conn-4.stpl
@@ -7,7 +7,8 @@ server {
error_log /var/log/%web_system%/domains/%domain%.error.log error;
location / {
- limit_conn addr 8;
+ limit_conn addr 9;
+ limit_conn zone_site 25;
limit_req zone=two burst=14 delay=7;
proxy_pass https://%ip%:%web_ssl_port%;
}
diff --git a/src/deb/for-download/tools/rate-limit-tpl/force-https-firewall-burst-2-speed-2.stpl b/src/deb/for-download/tools/rate-limit-tpl/force-https-firewall-burst-2-speed-2.stpl
index a2f7f9f2..dfd00270 100644
--- a/src/deb/for-download/tools/rate-limit-tpl/force-https-firewall-burst-2-speed-2.stpl
+++ b/src/deb/for-download/tools/rate-limit-tpl/force-https-firewall-burst-2-speed-2.stpl
@@ -7,7 +7,8 @@ server {
error_log /var/log/%web_system%/domains/%domain%.error.log error;
location / {
- limit_conn addr 4;
+ limit_conn addr 7;
+ limit_conn zone_site 20;
limit_req zone=two burst=14 delay=7;
proxy_pass https://%ip%:%web_ssl_port%;
}
diff --git a/src/deb/for-download/tools/rate-limit-tpl/force-https-firewall-burst-2.stpl b/src/deb/for-download/tools/rate-limit-tpl/force-https-firewall-burst-2.stpl
index 6118fa82..6d632713 100644
--- a/src/deb/for-download/tools/rate-limit-tpl/force-https-firewall-burst-2.stpl
+++ b/src/deb/for-download/tools/rate-limit-tpl/force-https-firewall-burst-2.stpl
@@ -7,7 +7,8 @@ server {
error_log /var/log/%web_system%/domains/%domain%.error.log error;
location / {
- limit_conn addr 3;
+ limit_conn addr 5;
+ limit_conn zone_site 15;
limit_req zone=one burst=14 delay=7;
proxy_pass https://%ip%:%web_ssl_port%;
}
diff --git a/src/deb/for-download/tools/rate-limit-tpl/force-https-firewall-wordpress-2.stpl b/src/deb/for-download/tools/rate-limit-tpl/force-https-firewall-wordpress-2.stpl
new file mode 100644
index 00000000..5c3f22ac
--- /dev/null
+++ b/src/deb/for-download/tools/rate-limit-tpl/force-https-firewall-wordpress-2.stpl
@@ -0,0 +1,95 @@
+server {
+ listen %ip%:%proxy_ssl_port% ssl http2;
+ server_name %domain_idn% %alias_idn%;
+ # ssl on;
+ ssl_certificate %ssl_pem%;
+ ssl_certificate_key %ssl_key%;
+ error_log /var/log/%web_system%/domains/%domain%.error.log error;
+
+ location / {
+ error_page 418 = @wordfence_lh;
+ error_page 419 = @wordfence_route;
+ error_page 420 = @wordfence_sync;
+
+ if ($request_uri ~ "^/\?wordfence_lh") { return 418; }
+ if ($request_uri ~ "^/\?rest_route=%2Fwordfence") { return 419; }
+ if ($request_uri ~ "^/\?wordfence_syncAttackData") { return 420; }
+
+ limit_conn addr 10;
+ limit_conn zone_site 30;
+ limit_req zone=one burst=28 delay=14;
+ proxy_pass https://%ip%:%web_ssl_port%;
+ }
+
+ location /wp-admin/ {
+ limit_conn addr 48;
+ limit_conn zone_site 60;
+ limit_req zone=one burst=80 delay=14;
+ proxy_pass https://%ip%:%web_ssl_port%;
+ }
+
+ location /wp-json/ {
+ limit_conn addr 16;
+ limit_conn zone_site 30;
+ limit_req zone=one burst=80 delay=14;
+ proxy_pass https://%ip%:%web_ssl_port%;
+ }
+
+ location @wordfence_lh {
+ limit_conn addr 16;
+ limit_conn zone_site 30;
+ limit_req zone=wfone burst=240;
+ proxy_pass https://%ip%:%web_ssl_port%;
+ }
+
+ location @wordfence_route {
+ limit_conn addr 16;
+ limit_conn zone_site 30;
+ limit_req zone=wfone burst=240;
+ proxy_pass https://%ip%:%web_ssl_port%;
+ }
+
+ location @wordfence_sync {
+ limit_conn addr 16;
+ limit_conn zone_site 30;
+ limit_req zone=wfone burst=240;
+ proxy_pass https://%ip%:%web_ssl_port%;
+ }
+
+ location /wp-json/wordfence/ {
+ limit_conn addr 16;
+ limit_conn zone_site 30;
+ limit_req zone=wfone burst=240;
+ proxy_pass https://%ip%:%web_ssl_port%;
+ }
+
+ location ~* ^.+\.(%proxy_extentions%)$ {
+ root %sdocroot%;
+ access_log /var/log/%web_system%/domains/%domain%.log combined;
+ access_log /var/log/%web_system%/domains/%domain%.bytes bytes;
+ expires max;
+ # try_files $uri @fallback;
+ }
+
+ location /error/ {
+ alias %home%/%user%/web/%domain%/document_errors/;
+ }
+
+ location @fallback {
+ proxy_pass https://%ip%:%web_ssl_port%;
+ }
+
+ location ~ /wp-config.php {return 404;}
+ location ~ /xmlrpc.php {return 404;}
+ location ~ /\.ht {return 404;}
+ location ~ /\.env {return 404;}
+ location ~ /\.svn/ {return 404;}
+ location ~ /\.git/ {return 404;}
+ location ~ /\.hg/ {return 404;}
+ location ~ /\.bzr/ {return 404;}
+
+ disable_symlinks if_not_owner from=%docroot%;
+
+ include %home%/%user%/conf/web/*nginx.%domain_idn%.conf_letsencrypt;
+ include %home%/%user%/conf/web/s%proxy_system%.%domain%.conf*;
+}
diff --git a/src/deb/for-download/tools/rate-limit-tpl/force-https-firewall-wordpress-2.tpl b/src/deb/for-download/tools/rate-limit-tpl/force-https-firewall-wordpress-2.tpl
new file mode 100644
index 00000000..5a463370
--- /dev/null
+++ b/src/deb/for-download/tools/rate-limit-tpl/force-https-firewall-wordpress-2.tpl
@@ -0,0 +1,8 @@
+server {
+ listen %ip%:%proxy_port%;
+ server_name %domain_idn% %alias_idn%;
+ location / {
+ rewrite ^(.*) https://$host$1 permanent;
+ }
+include %home%/%user%/conf/web/*nginx.%domain_idn%.conf_letsencrypt;
+}
diff --git a/src/deb/for-download/tools/rate-limit-tpl/force-https-firewall-wordpress.stpl b/src/deb/for-download/tools/rate-limit-tpl/force-https-firewall-wordpress.stpl
new file mode 100644
index 00000000..b263d6b5
--- /dev/null
+++ b/src/deb/for-download/tools/rate-limit-tpl/force-https-firewall-wordpress.stpl
@@ -0,0 +1,95 @@
+server {
+ listen %ip%:%proxy_ssl_port% ssl http2;
+ server_name %domain_idn% %alias_idn%;
+ # ssl on;
+ ssl_certificate %ssl_pem%;
+ ssl_certificate_key %ssl_key%;
+ error_log /var/log/%web_system%/domains/%domain%.error.log error;
+
+ location / {
+ error_page 418 = @wordfence_lh;
+ error_page 419 = @wordfence_route;
+ error_page 420 = @wordfence_sync;
+
+ if ($request_uri ~ "^/\?wordfence_lh") { return 418; }
+ if ($request_uri ~ "^/\?rest_route=%2Fwordfence") { return 419; }
+ if ($request_uri ~ "^/\?wordfence_syncAttackData") { return 420; }
+
+ limit_conn addr 5;
+ limit_conn zone_site 15;
+ limit_req zone=one burst=14 delay=7;
+ proxy_pass https://%ip%:%web_ssl_port%;
+ }
+
+ location /wp-admin/ {
+ limit_conn addr 24;
+ limit_conn zone_site 30;
+ limit_req zone=one burst=40 delay=7;
+ proxy_pass https://%ip%:%web_ssl_port%;
+ }
+
+ location /wp-json/ {
+ limit_conn addr 8;
+ limit_conn zone_site 15;
+ limit_req zone=one burst=40 delay=7;
+ proxy_pass https://%ip%:%web_ssl_port%;
+ }
+
+ location @wordfence_lh {
+ limit_conn addr 8;
+ limit_conn zone_site 15;
+ limit_req zone=wfone burst=120;
+ proxy_pass https://%ip%:%web_ssl_port%;
+ }
+
+ location @wordfence_route {
+ limit_conn addr 8;
+ limit_conn zone_site 15;
+ limit_req zone=wfone burst=120;
+ proxy_pass https://%ip%:%web_ssl_port%;
+ }
+
+ location @wordfence_sync {
+ limit_conn addr 8;
+ limit_conn zone_site 15;
+ limit_req zone=wfone burst=120;
+ proxy_pass https://%ip%:%web_ssl_port%;
+ }
+
+ location /wp-json/wordfence/ {
+ limit_conn addr 8;
+ limit_conn zone_site 15;
+ limit_req zone=wfone burst=120;
+ proxy_pass https://%ip%:%web_ssl_port%;
+ }
+
+ location ~* ^.+\.(%proxy_extentions%)$ {
+ root %sdocroot%;
+ access_log /var/log/%web_system%/domains/%domain%.log combined;
+ access_log /var/log/%web_system%/domains/%domain%.bytes bytes;
+ expires max;
+ # try_files $uri @fallback;
+ }
+
+ location /error/ {
+ alias %home%/%user%/web/%domain%/document_errors/;
+ }
+
+ location @fallback {
+ proxy_pass https://%ip%:%web_ssl_port%;
+ }
+
+ location ~ /wp-config.php {return 404;}
+ location ~ /xmlrpc.php {return 404;}
+ location ~ /\.ht {return 404;}
+ location ~ /\.env {return 404;}
+ location ~ /\.svn/ {return 404;}
+ location ~ /\.git/ {return 404;}
+ location ~ /\.hg/ {return 404;}
+ location ~ /\.bzr/ {return 404;}
+
+ disable_symlinks if_not_owner from=%docroot%;
+
+ include %home%/%user%/conf/web/*nginx.%domain_idn%.conf_letsencrypt;
+ include %home%/%user%/conf/web/s%proxy_system%.%domain%.conf*;
+}
diff --git a/src/deb/for-download/tools/rate-limit-tpl/force-https-firewall-wordpress.tpl b/src/deb/for-download/tools/rate-limit-tpl/force-https-firewall-wordpress.tpl
new file mode 100644
index 00000000..5a463370
--- /dev/null
+++ b/src/deb/for-download/tools/rate-limit-tpl/force-https-firewall-wordpress.tpl
@@ -0,0 +1,8 @@
+server {
+ listen %ip%:%proxy_port%;
+ server_name %domain_idn% %alias_idn%;
+ location / {
+ rewrite ^(.*) https://$host$1 permanent;
+ }
+include %home%/%user%/conf/web/*nginx.%domain_idn%.conf_letsencrypt;
+}
diff --git a/src/deb/for-download/tools/rate-limit-tpl/force-https-firewall.stpl b/src/deb/for-download/tools/rate-limit-tpl/force-https-firewall.stpl
index b4468a6a..db6ab623 100644
--- a/src/deb/for-download/tools/rate-limit-tpl/force-https-firewall.stpl
+++ b/src/deb/for-download/tools/rate-limit-tpl/force-https-firewall.stpl
@@ -7,7 +7,8 @@ server {
error_log /var/log/%web_system%/domains/%domain%.error.log error;
location / {
- limit_conn addr 2;
+ limit_conn addr 3;
+ limit_conn zone_site 10;
limit_req zone=one burst=7 delay=3;
proxy_pass https://%ip%:%web_ssl_port%;
}
diff --git a/src/deb/for-download/tools/rate-limit-tpl/hosting-firewall-burst-2-speed-2-conn-4.stpl b/src/deb/for-download/tools/rate-limit-tpl/hosting-firewall-burst-2-speed-2-conn-4.stpl
index df269ad4..8435a72b 100644
--- a/src/deb/for-download/tools/rate-limit-tpl/hosting-firewall-burst-2-speed-2-conn-4.stpl
+++ b/src/deb/for-download/tools/rate-limit-tpl/hosting-firewall-burst-2-speed-2-conn-4.stpl
@@ -7,7 +7,8 @@ server {
error_log /var/log/%web_system%/domains/%domain%.error.log error;
location / {
- limit_conn addr 8;
+ limit_conn addr 9;
+ limit_conn zone_site 25;
limit_req zone=two burst=14 delay=7;
proxy_pass https://%ip%:%web_ssl_port%;
}
diff --git a/src/deb/for-download/tools/rate-limit-tpl/hosting-firewall-burst-2-speed-2-conn-4.tpl b/src/deb/for-download/tools/rate-limit-tpl/hosting-firewall-burst-2-speed-2-conn-4.tpl
index 13657bd3..2cc5c781 100644
--- a/src/deb/for-download/tools/rate-limit-tpl/hosting-firewall-burst-2-speed-2-conn-4.tpl
+++ b/src/deb/for-download/tools/rate-limit-tpl/hosting-firewall-burst-2-speed-2-conn-4.tpl
@@ -4,7 +4,8 @@ server {
error_log /var/log/%web_system%/domains/%domain%.error.log error;
location / {
- limit_conn addr 8;
+ limit_conn addr 9;
+ limit_conn zone_site 25;
limit_req zone=two burst=14 delay=7;
proxy_pass http://%ip%:%web_port%;
}
diff --git a/src/deb/for-download/tools/rate-limit-tpl/hosting-firewall-burst-2-speed-2.stpl b/src/deb/for-download/tools/rate-limit-tpl/hosting-firewall-burst-2-speed-2.stpl
index 8e0a0f5a..856ebd56 100644
--- a/src/deb/for-download/tools/rate-limit-tpl/hosting-firewall-burst-2-speed-2.stpl
+++ b/src/deb/for-download/tools/rate-limit-tpl/hosting-firewall-burst-2-speed-2.stpl
@@ -7,7 +7,8 @@ server {
error_log /var/log/%web_system%/domains/%domain%.error.log error;
location / {
- limit_conn addr 4;
+ limit_conn addr 7;
+ limit_conn zone_site 20;
limit_req zone=two burst=14 delay=7;
proxy_pass https://%ip%:%web_ssl_port%;
}
diff --git a/src/deb/for-download/tools/rate-limit-tpl/hosting-firewall-burst-2-speed-2.tpl b/src/deb/for-download/tools/rate-limit-tpl/hosting-firewall-burst-2-speed-2.tpl
index a4035844..5bf3fbf8 100644
--- a/src/deb/for-download/tools/rate-limit-tpl/hosting-firewall-burst-2-speed-2.tpl
+++ b/src/deb/for-download/tools/rate-limit-tpl/hosting-firewall-burst-2-speed-2.tpl
@@ -4,7 +4,8 @@ server {
error_log /var/log/%web_system%/domains/%domain%.error.log error;
location / {
- limit_conn addr 4;
+ limit_conn addr 7;
+ limit_conn zone_site 20;
limit_req zone=two burst=14 delay=7;
proxy_pass http://%ip%:%web_port%;
}
diff --git a/src/deb/for-download/tools/rate-limit-tpl/hosting-firewall-burst-2.stpl b/src/deb/for-download/tools/rate-limit-tpl/hosting-firewall-burst-2.stpl
index 9649671d..5d42830f 100644
--- a/src/deb/for-download/tools/rate-limit-tpl/hosting-firewall-burst-2.stpl
+++ b/src/deb/for-download/tools/rate-limit-tpl/hosting-firewall-burst-2.stpl
@@ -7,7 +7,8 @@ server {
error_log /var/log/%web_system%/domains/%domain%.error.log error;
location / {
- limit_conn addr 3;
+ limit_conn addr 5;
+ limit_conn zone_site 15;
limit_req zone=one burst=14 delay=7;
proxy_pass https://%ip%:%web_ssl_port%;
}
diff --git a/src/deb/for-download/tools/rate-limit-tpl/hosting-firewall-burst-2.tpl b/src/deb/for-download/tools/rate-limit-tpl/hosting-firewall-burst-2.tpl
index 9e0edcf8..e57dbd1a 100644
--- a/src/deb/for-download/tools/rate-limit-tpl/hosting-firewall-burst-2.tpl
+++ b/src/deb/for-download/tools/rate-limit-tpl/hosting-firewall-burst-2.tpl
@@ -4,7 +4,8 @@ server {
error_log /var/log/%web_system%/domains/%domain%.error.log error;
location / {
- limit_conn addr 3;
+ limit_conn addr 5;
+ limit_conn zone_site 15;
limit_req zone=one burst=14 delay=7;
proxy_pass http://%ip%:%web_port%;
}
diff --git a/src/deb/for-download/tools/rate-limit-tpl/hosting-firewall-wordpress-2.stpl b/src/deb/for-download/tools/rate-limit-tpl/hosting-firewall-wordpress-2.stpl
new file mode 100644
index 00000000..5c3f22ac
--- /dev/null
+++ b/src/deb/for-download/tools/rate-limit-tpl/hosting-firewall-wordpress-2.stpl
@@ -0,0 +1,95 @@
+server {
+ listen %ip%:%proxy_ssl_port% ssl http2;
+ server_name %domain_idn% %alias_idn%;
+ # ssl on;
+ ssl_certificate %ssl_pem%;
+ ssl_certificate_key %ssl_key%;
+ error_log /var/log/%web_system%/domains/%domain%.error.log error;
+
+ location / {
+ error_page 418 = @wordfence_lh;
+ error_page 419 = @wordfence_route;
+ error_page 420 = @wordfence_sync;
+
+ if ($request_uri ~ "^/\?wordfence_lh") { return 418; }
+ if ($request_uri ~ "^/\?rest_route=%2Fwordfence") { return 419; }
+ if ($request_uri ~ "^/\?wordfence_syncAttackData") { return 420; }
+
+ limit_conn addr 10;
+ limit_conn zone_site 30;
+ limit_req zone=one burst=28 delay=14;
+ proxy_pass https://%ip%:%web_ssl_port%;
+ }
+
+ location /wp-admin/ {
+ limit_conn addr 48;
+ limit_conn zone_site 60;
+ limit_req zone=one burst=80 delay=14;
+ proxy_pass https://%ip%:%web_ssl_port%;
+ }
+
+ location /wp-json/ {
+ limit_conn addr 16;
+ limit_conn zone_site 30;
+ limit_req zone=one burst=80 delay=14;
+ proxy_pass https://%ip%:%web_ssl_port%;
+ }
+
+ location @wordfence_lh {
+ limit_conn addr 16;
+ limit_conn zone_site 30;
+ limit_req zone=wfone burst=240;
+ proxy_pass https://%ip%:%web_ssl_port%;
+ }
+
+ location @wordfence_route {
+ limit_conn addr 16;
+ limit_conn zone_site 30;
+ limit_req zone=wfone burst=240;
+ proxy_pass https://%ip%:%web_ssl_port%;
+ }
+
+ location @wordfence_sync {
+ limit_conn addr 16;
+ limit_conn zone_site 30;
+ limit_req zone=wfone burst=240;
+ proxy_pass https://%ip%:%web_ssl_port%;
+ }
+
+ location /wp-json/wordfence/ {
+ limit_conn addr 16;
+ limit_conn zone_site 30;
+ limit_req zone=wfone burst=240;
+ proxy_pass https://%ip%:%web_ssl_port%;
+ }
+
+ location ~* ^.+\.(%proxy_extentions%)$ {
+ root %sdocroot%;
+ access_log /var/log/%web_system%/domains/%domain%.log combined;
+ access_log /var/log/%web_system%/domains/%domain%.bytes bytes;
+ expires max;
+ # try_files $uri @fallback;
+ }
+
+ location /error/ {
+ alias %home%/%user%/web/%domain%/document_errors/;
+ }
+
+ location @fallback {
+ proxy_pass https://%ip%:%web_ssl_port%;
+ }
+
+ location ~ /wp-config.php {return 404;}
+ location ~ /xmlrpc.php {return 404;}
+ location ~ /\.ht {return 404;}
+ location ~ /\.env {return 404;}
+ location ~ /\.svn/ {return 404;}
+ location ~ /\.git/ {return 404;}
+ location ~ /\.hg/ {return 404;}
+ location ~ /\.bzr/ {return 404;}
+
+ disable_symlinks if_not_owner from=%docroot%;
+
+ include %home%/%user%/conf/web/*nginx.%domain_idn%.conf_letsencrypt;
+ include %home%/%user%/conf/web/s%proxy_system%.%domain%.conf*;
+}
diff --git a/src/deb/for-download/tools/rate-limit-tpl/hosting-firewall-wordpress-2.tpl b/src/deb/for-download/tools/rate-limit-tpl/hosting-firewall-wordpress-2.tpl
new file mode 100644
index 00000000..44f6162c
--- /dev/null
+++ b/src/deb/for-download/tools/rate-limit-tpl/hosting-firewall-wordpress-2.tpl
@@ -0,0 +1,92 @@
+server {
+ listen %ip%:%proxy_port%;
+ server_name %domain_idn% %alias_idn%;
+ error_log /var/log/%web_system%/domains/%domain%.error.log error;
+
+ location / {
+ error_page 418 = @wordfence_lh;
+ error_page 419 = @wordfence_route;
+ error_page 420 = @wordfence_sync;
+
+ if ($request_uri ~ "^/\?wordfence_lh") { return 418; }
+ if ($request_uri ~ "^/\?rest_route=%2Fwordfence") { return 419; }
+ if ($request_uri ~ "^/\?wordfence_syncAttackData") { return 420; }
+
+ limit_conn addr 10;
+ limit_conn zone_site 30;
+ limit_req zone=one burst=28 delay=14;
+ proxy_pass http://%ip%:%web_port%;
+ }
+
+ location /wp-admin/ {
+ limit_conn addr 48;
+ limit_conn zone_site 60;
+ limit_req zone=one burst=80 delay=14;
+ proxy_pass http://%ip%:%web_port%;
+ }
+
+ location /wp-json/ {
+ limit_conn addr 16;
+ limit_conn zone_site 30;
+ limit_req zone=one burst=80 delay=14;
+ proxy_pass http://%ip%:%web_port%;
+ }
+
+ location @wordfence_lh {
+ limit_conn addr 16;
+ limit_conn zone_site 30;
+ limit_req zone=wfone burst=240;
+ proxy_pass http://%ip%:%web_port%;
+ }
+
+ location @wordfence_route {
+ limit_conn addr 16;
+ limit_conn zone_site 30;
+ limit_req zone=wfone burst=240;
+ proxy_pass http://%ip%:%web_port%;
+ }
+
+ location @wordfence_sync {
+ limit_conn addr 16;
+ limit_conn zone_site 30;
+ limit_req zone=wfone burst=240;
+ proxy_pass http://%ip%:%web_port%;
+ }
+
+ location /wp-json/wordfence/ {
+ limit_conn addr 16;
+ limit_conn zone_site 30;
+ limit_req zone=wfone burst=240;
+ proxy_pass http://%ip%:%web_port%;
+ }
+
+ location ~* ^.+\.(%proxy_extentions%)$ {
+ root %docroot%;
+ access_log /var/log/%web_system%/domains/%domain%.log combined;
+ access_log /var/log/%web_system%/domains/%domain%.bytes bytes;
+ expires max;
+ # try_files $uri @fallback;
+ }
+
+ location /error/ {
+ alias %home%/%user%/web/%domain%/document_errors/;
+ }
+
+ location @fallback {
+ proxy_pass http://%ip%:%web_port%;
+ }
+
+ location ~ /wp-config.php {return 404;}
+ location ~ /xmlrpc.php {return 404;}
+ location ~ /\.ht {return 404;}
+ location ~ /\.env {return 404;}
+ location ~ /\.svn/ {return 404;}
+ location ~ /\.git/ {return 404;}
+ location ~ /\.hg/ {return 404;}
+ location ~ /\.bzr/ {return 404;}
+
+ disable_symlinks if_not_owner from=%docroot%;
+
+ include %home%/%user%/conf/web/nginx.%domain%.conf*;
+}
+
diff --git a/src/deb/for-download/tools/rate-limit-tpl/hosting-firewall-wordpress.stpl b/src/deb/for-download/tools/rate-limit-tpl/hosting-firewall-wordpress.stpl
new file mode 100644
index 00000000..b263d6b5
--- /dev/null
+++ b/src/deb/for-download/tools/rate-limit-tpl/hosting-firewall-wordpress.stpl
@@ -0,0 +1,95 @@
+server {
+ listen %ip%:%proxy_ssl_port% ssl http2;
+ server_name %domain_idn% %alias_idn%;
+ # ssl on;
+ ssl_certificate %ssl_pem%;
+ ssl_certificate_key %ssl_key%;
+ error_log /var/log/%web_system%/domains/%domain%.error.log error;
+
+ location / {
+ error_page 418 = @wordfence_lh;
+ error_page 419 = @wordfence_route;
+ error_page 420 = @wordfence_sync;
+
+ if ($request_uri ~ "^/\?wordfence_lh") { return 418; }
+ if ($request_uri ~ "^/\?rest_route=%2Fwordfence") { return 419; }
+ if ($request_uri ~ "^/\?wordfence_syncAttackData") { return 420; }
+
+ limit_conn addr 5;
+ limit_conn zone_site 15;
+ limit_req zone=one burst=14 delay=7;
+ proxy_pass https://%ip%:%web_ssl_port%;
+ }
+
+ location /wp-admin/ {
+ limit_conn addr 24;
+ limit_conn zone_site 30;
+ limit_req zone=one burst=40 delay=7;
+ proxy_pass https://%ip%:%web_ssl_port%;
+ }
+
+ location /wp-json/ {
+ limit_conn addr 8;
+ limit_conn zone_site 15;
+ limit_req zone=one burst=40 delay=7;
+ proxy_pass https://%ip%:%web_ssl_port%;
+ }
+
+ location @wordfence_lh {
+ limit_conn addr 8;
+ limit_conn zone_site 15;
+ limit_req zone=wfone burst=120;
+ proxy_pass https://%ip%:%web_ssl_port%;
+ }
+
+ location @wordfence_route {
+ limit_conn addr 8;
+ limit_conn zone_site 15;
+ limit_req zone=wfone burst=120;
+ proxy_pass https://%ip%:%web_ssl_port%;
+ }
+
+ location @wordfence_sync {
+ limit_conn addr 8;
+ limit_conn zone_site 15;
+ limit_req zone=wfone burst=120;
+ proxy_pass https://%ip%:%web_ssl_port%;
+ }
+
+ location /wp-json/wordfence/ {
+ limit_conn addr 8;
+ limit_conn zone_site 15;
+ limit_req zone=wfone burst=120;
+ proxy_pass https://%ip%:%web_ssl_port%;
+ }
+
+ location ~* ^.+\.(%proxy_extentions%)$ {
+ root %sdocroot%;
+ access_log /var/log/%web_system%/domains/%domain%.log combined;
+ access_log /var/log/%web_system%/domains/%domain%.bytes bytes;
+ expires max;
+ # try_files $uri @fallback;
+ }
+
+ location /error/ {
+ alias %home%/%user%/web/%domain%/document_errors/;
+ }
+
+ location @fallback {
+ proxy_pass https://%ip%:%web_ssl_port%;
+ }
+
+ location ~ /wp-config.php {return 404;}
+ location ~ /xmlrpc.php {return 404;}
+ location ~ /\.ht {return 404;}
+ location ~ /\.env {return 404;}
+ location ~ /\.svn/ {return 404;}
+ location ~ /\.git/ {return 404;}
+ location ~ /\.hg/ {return 404;}
+ location ~ /\.bzr/ {return 404;}
+
+ disable_symlinks if_not_owner from=%docroot%;
+
+ include %home%/%user%/conf/web/*nginx.%domain_idn%.conf_letsencrypt;
+ include %home%/%user%/conf/web/s%proxy_system%.%domain%.conf*;
+}
diff --git a/src/deb/for-download/tools/rate-limit-tpl/hosting-firewall-wordpress.tpl b/src/deb/for-download/tools/rate-limit-tpl/hosting-firewall-wordpress.tpl
new file mode 100644
index 00000000..7203b88c
--- /dev/null
+++ b/src/deb/for-download/tools/rate-limit-tpl/hosting-firewall-wordpress.tpl
@@ -0,0 +1,92 @@
+server {
+ listen %ip%:%proxy_port%;
+ server_name %domain_idn% %alias_idn%;
+ error_log /var/log/%web_system%/domains/%domain%.error.log error;
+
+ location / {
+ error_page 418 = @wordfence_lh;
+ error_page 419 = @wordfence_route;
+ error_page 420 = @wordfence_sync;
+
+ if ($request_uri ~ "^/\?wordfence_lh") { return 418; }
+ if ($request_uri ~ "^/\?rest_route=%2Fwordfence") { return 419; }
+ if ($request_uri ~ "^/\?wordfence_syncAttackData") { return 420; }
+
+ limit_conn addr 5;
+ limit_conn zone_site 15;
+ limit_req zone=one burst=14 delay=7;
+ proxy_pass http://%ip%:%web_port%;
+ }
+
+ location /wp-admin/ {
+ limit_conn addr 24;
+ limit_conn zone_site 30;
+ limit_req zone=one burst=40 delay=7;
+ proxy_pass http://%ip%:%web_port%;
+ }
+
+ location /wp-json/ {
+ limit_conn addr 8;
+ limit_conn zone_site 15;
+ limit_req zone=one burst=40 delay=7;
+ proxy_pass http://%ip%:%web_port%;
+ }
+
+ location @wordfence_lh {
+ limit_conn addr 8;
+ limit_conn zone_site 15;
+ limit_req zone=wfone burst=120;
+ proxy_pass http://%ip%:%web_port%;
+ }
+
+ location @wordfence_route {
+ limit_conn addr 8;
+ limit_conn zone_site 15;
+ limit_req zone=wfone burst=120;
+ proxy_pass http://%ip%:%web_port%;
+ }
+
+ location @wordfence_sync {
+ limit_conn addr 8;
+ limit_conn zone_site 15;
+ limit_req zone=wfone burst=120;
+ proxy_pass http://%ip%:%web_port%;
+ }
+
+ location /wp-json/wordfence/ {
+ limit_conn addr 8;
+ limit_conn zone_site 15;
+ limit_req zone=wfone burst=120;
+ proxy_pass http://%ip%:%web_port%;
+ }
+
+ location ~* ^.+\.(%proxy_extentions%)$ {
+ root %docroot%;
+ access_log /var/log/%web_system%/domains/%domain%.log combined;
+ access_log /var/log/%web_system%/domains/%domain%.bytes bytes;
+ expires max;
+ # try_files $uri @fallback;
+ }
+
+ location /error/ {
+ alias %home%/%user%/web/%domain%/document_errors/;
+ }
+
+ location @fallback {
+ proxy_pass http://%ip%:%web_port%;
+ }
+
+ location ~ /wp-config.php {return 404;}
+ location ~ /xmlrpc.php {return 404;}
+ location ~ /\.ht {return 404;}
+ location ~ /\.env {return 404;}
+ location ~ /\.svn/ {return 404;}
+ location ~ /\.git/ {return 404;}
+ location ~ /\.hg/ {return 404;}
+ location ~ /\.bzr/ {return 404;}
+
+ disable_symlinks if_not_owner from=%docroot%;
+
+ include %home%/%user%/conf/web/nginx.%domain%.conf*;
+}
+
diff --git a/src/deb/for-download/tools/rate-limit-tpl/hosting-firewall.stpl b/src/deb/for-download/tools/rate-limit-tpl/hosting-firewall.stpl
index 21acb34b..42bc195b 100644
--- a/src/deb/for-download/tools/rate-limit-tpl/hosting-firewall.stpl
+++ b/src/deb/for-download/tools/rate-limit-tpl/hosting-firewall.stpl
@@ -7,7 +7,8 @@ server {
error_log /var/log/%web_system%/domains/%domain%.error.log error;
location / {
- limit_conn addr 2;
+ limit_conn addr 3;
+ limit_conn zone_site 10;
limit_req zone=one burst=7 delay=3;
proxy_pass https://%ip%:%web_ssl_port%;
}
diff --git a/src/deb/for-download/tools/rate-limit-tpl/hosting-firewall.tpl b/src/deb/for-download/tools/rate-limit-tpl/hosting-firewall.tpl
index 9438e532..177a71c6 100644
--- a/src/deb/for-download/tools/rate-limit-tpl/hosting-firewall.tpl
+++ b/src/deb/for-download/tools/rate-limit-tpl/hosting-firewall.tpl
@@ -4,7 +4,8 @@ server {
error_log /var/log/%web_system%/domains/%domain%.error.log error;
location / {
- limit_conn addr 2;
+ limit_conn addr 3;
+ limit_conn zone_site 10;
limit_req zone=one burst=7 delay=3;
proxy_pass http://%ip%:%web_port%;
}
diff --git a/src/deb/for-download/tools/rate-limit-tpl/install_rate_limit_tpl.sh b/src/deb/for-download/tools/rate-limit-tpl/install_rate_limit_tpl.sh
index 8710008c..8f4d4e88 100644
--- a/src/deb/for-download/tools/rate-limit-tpl/install_rate_limit_tpl.sh
+++ b/src/deb/for-download/tools/rate-limit-tpl/install_rate_limit_tpl.sh
@@ -12,7 +12,7 @@
grepc=$(grep -c 'limit_conn_zone' /etc/nginx/nginx.conf)
if [ "$grepc" -eq 0 ]; then
- sed -i 's|server_names_hash_bucket_size 512;|server_names_hash_bucket_size 512;\n limit_conn_zone $binary_remote_addr zone=addr:1m;\n limit_req_zone $binary_remote_addr zone=one:1m rate=1r/s;\n limit_req_zone $binary_remote_addr zone=two:1m rate=2r/s;\n limit_conn_log_level error;\n limit_req_log_level error;\n limit_conn_status 429;\n limit_req_status 429;|g' /etc/nginx/nginx.conf
+ sed -i 's|server_names_hash_bucket_size 512;|server_names_hash_bucket_size 512;\n limit_conn_zone $binary_remote_addr zone=addr:1m;\n limit_conn_zone $server_name zone=zone_site:1m;\n limit_req_zone $scheme zone=wfone:1m rate=1r/s;\n limit_req_zone $binary_remote_addr zone=one:1m rate=1r/s;\n limit_req_zone $binary_remote_addr zone=two:1m rate=2r/s;\n limit_conn_log_level error;\n limit_req_log_level error;\n limit_conn_status 429;\n limit_req_status 429;|g' /etc/nginx/nginx.conf
echo "=== Added rate_limit to nginx.conf"
fi
@@ -22,6 +22,18 @@ if [ "$grepc" -eq 1 ]; then
echo "=== Decrease addr zone to 1mb to nginx.conf"
fi
+grepc=$(grep -c 'zone=zone_site:1m' /etc/nginx/nginx.conf)
+if [ "$grepc" -eq 0 ]; then
+ sed -i 's| zone=addr:1m;| zone=addr:1m;\n limit_conn_zone $server_name zone=zone_site:1m;|g' /etc/nginx/nginx.conf
+ echo "=== Added rate_limit 'zone_site' to nginx.conf"
+fi
+
+grepc=$(grep -c 'zone=wfone:1m' /etc/nginx/nginx.conf)
+if [ "$grepc" -eq 0 ]; then
+ sed -i 's| zone=addr:1m;| zone=addr:1m;\n limit_req_zone $scheme zone=wfone:1m rate=1r/s;|g' /etc/nginx/nginx.conf
+ echo "=== Added rate_limit 'wfone' to nginx.conf"
+fi
+
grepc=$(grep -c 'zone=one:10m' /etc/nginx/nginx.conf)
if [ "$grepc" -eq 1 ]; then
sed -i 's|zone=one:10m|zone=one:1m|g' /etc/nginx/nginx.conf
@@ -54,4 +66,14 @@ wget -nv -O /usr/local/vesta/data/templates/web/nginx/force-https-firewall-burst
wget -nv -O /usr/local/vesta/data/templates/web/nginx/hosting-firewall-burst-2-speed-2-conn-4.tpl http://c.myvestacp.com/tools/rate-limit-tpl/hosting-firewall-burst-2-speed-2-conn-4.tpl
wget -nv -O /usr/local/vesta/data/templates/web/nginx/hosting-firewall-burst-2-speed-2-conn-4.stpl http://c.myvestacp.com/tools/rate-limit-tpl/hosting-firewall-burst-2-speed-2-conn-4.stpl
-service nginx restart
+wget -nv -O /usr/local/vesta/data/templates/web/nginx/force-https-firewall-wordpress.tpl http://c.myvestacp.com/tools/rate-limit-tpl/force-https-firewall-wordpress.tpl
+wget -nv -O /usr/local/vesta/data/templates/web/nginx/force-https-firewall-wordpress.stpl http://c.myvestacp.com/tools/rate-limit-tpl/force-https-firewall-wordpress.stpl
+wget -nv -O /usr/local/vesta/data/templates/web/nginx/hosting-firewall-wordpress.tpl http://c.myvestacp.com/tools/rate-limit-tpl/hosting-firewall-wordpress.tpl
+wget -nv -O /usr/local/vesta/data/templates/web/nginx/hosting-firewall-wordpress.stpl http://c.myvestacp.com/tools/rate-limit-tpl/hosting-firewall-wordpress.stpl
+
+wget -nv -O /usr/local/vesta/data/templates/web/nginx/force-https-firewall-wordpress-2.tpl http://c.myvestacp.com/tools/rate-limit-tpl/force-https-firewall-wordpress-2.tpl
+wget -nv -O /usr/local/vesta/data/templates/web/nginx/force-https-firewall-wordpress-2.stpl http://c.myvestacp.com/tools/rate-limit-tpl/force-https-firewall-wordpress-2.stpl
+wget -nv -O /usr/local/vesta/data/templates/web/nginx/hosting-firewall-wordpress-2.tpl http://c.myvestacp.com/tools/rate-limit-tpl/hosting-firewall-wordpress-2.tpl
+wget -nv -O /usr/local/vesta/data/templates/web/nginx/hosting-firewall-wordpress-2.stpl http://c.myvestacp.com/tools/rate-limit-tpl/hosting-firewall-wordpress-2.stpl
+
+systemctl restart nginx
diff --git a/src/deb/for-download/tools/rocket-nginx-templates/wprocket-webp-express-force-https.stpl b/src/deb/for-download/tools/rocket-nginx-templates/wprocket-webp-express-force-https.stpl
new file mode 100644
index 00000000..2a6a7671
--- /dev/null
+++ b/src/deb/for-download/tools/rocket-nginx-templates/wprocket-webp-express-force-https.stpl
@@ -0,0 +1,73 @@
+server {
+ listen %ip%:%proxy_ssl_port% ssl http2;
+ server_name %domain_idn% %alias_idn%;
+
+ ssl_certificate %ssl_pem%;
+ ssl_certificate_key %ssl_key%;
+ error_log /var/log/%web_system%/domains/%domain%.error.log error;
+
+ root %sdocroot%;
+
+ # Serve WebP if browser supports it
+ location ~* ^/wp-content/.*\.(png|jpe?g)$ {
+ add_header Vary Accept;
+ expires 365d;
+
+ if ($http_accept !~* "webp") {
+ break;
+ }
+
+ try_files
+ /wp-content/webp-express/webp-images/doc-root/$uri.webp
+ $uri.webp
+ @webp_on_demand;
+ }
+
+ # Route .webp requests to converter if not found
+ location @webp_on_demand {
+ proxy_pass https://%ip%:%web_ssl_port%;
+ }
+
+ # Allow .webp passthrough (trigger php fallback if not found)
+ location ~* ^/wp-content/.*\.(png|jpe?g)\.webp$ {
+ try_files
+ $uri
+ @webp_realizer;
+ }
+
+ location @webp_realizer {
+ proxy_pass https://%ip%:%web_ssl_port%;
+ }
+
+ # Allow PHP access to WebP Express WOD handler
+ location ~ ^/wp-content/plugins/webp-express/wod/.*\.php$ {
+ proxy_pass https://%ip%:%web_ssl_port%;
+ }
+
+ # Rocket-Nginx configuration
+ include rocket-nginx/conf.d/default.conf;
+
+ location / {
+ proxy_pass https://%ip%:%web_ssl_port%;
+ }
+
+ location /error/ {
+ alias %home%/%user%/web/%domain%/document_errors/;
+ }
+
+ location @fallback {
+ proxy_pass https://%ip%:%web_ssl_port%;
+ }
+
+ location ~ /\.ht {return 404;}
+ location ~ /\.env {return 404;}
+ location ~ /\.svn/ {return 404;}
+ location ~ /\.git/ {return 404;}
+ location ~ /\.hg/ {return 404;}
+ location ~ /\.bzr/ {return 404;}
+
+ disable_symlinks if_not_owner from=%docroot%;
+
+ include %home%/%user%/conf/web/*nginx.%domain_idn%.conf_letsencrypt;
+ include %home%/%user%/conf/web/s%proxy_system%.%domain%.conf*;
+}
diff --git a/src/deb/for-download/tools/rocket-nginx-templates/wprocket-webp-express-force-https.tpl b/src/deb/for-download/tools/rocket-nginx-templates/wprocket-webp-express-force-https.tpl
new file mode 100644
index 00000000..5a463370
--- /dev/null
+++ b/src/deb/for-download/tools/rocket-nginx-templates/wprocket-webp-express-force-https.tpl
@@ -0,0 +1,8 @@
+server {
+ listen %ip%:%proxy_port%;
+ server_name %domain_idn% %alias_idn%;
+ location / {
+ rewrite ^(.*) https://$host$1 permanent;
+ }
+include %home%/%user%/conf/web/*nginx.%domain_idn%.conf_letsencrypt;
+}
diff --git a/src/deb/ioncube/copyright b/src/deb/ioncube/copyright
index bd92bd81..c62257d2 100644
--- a/src/deb/ioncube/copyright
+++ b/src/deb/ioncube/copyright
@@ -1,243 +1,243 @@
-LICENCE AGREEMENT FOR THE IONCUBE PHP LOADER, PROVIDED TO ENABLE THE USE
-OF IONCUBE ENCODED FILES AND AS PART OF THE IONCUBE24 SERVICE (ioncube24.com)
-
-YOU SHOULD CAREFULLY READ THE FOLLOWING TERMS AND CONDITIONS BEFORE USING THE
-LOADER SOFTWARE. THE INSTALLATION AND/OR USE OR COPYING OF THE IONCUBE PHP
-LOADER SOFTWARE INDICATES YOUR ACCEPTANCE OF THIS LICENCE AGREEMENT. IF YOU
-DO NOT ACCEPT THE TERMS OF THIS LICENCE AGREEMENT, DO NOT INSTALL, COPY
-AND/OR USE THE LOADER SOFTWARE.
-
-DEFINITIONS
-
-The following definitions shall apply in this document:
-
-LOADER shall mean the ionCube PHP Loader software package or collection
-of Loaders, including any modifications or upgrades to the software, used for
-executing PHP scripts previously encoded with the ionCube PHP Encoder
-software to render them non-humanly readable, and any associated
-documentation or electronic or online materials relating to the software.
-
-ENCODER shall mean any ionCube PHP Encoder software or service used for the
-purpose of producing non-humanly readable encoded files from PHP scripts.
-
-ENCODED FILE shall mean a non-humanly readable file produced by the
-Encoder and being derived from humanly readable PHP script source.
-
-PROVIDER shall mean ionCube Ltd.
-
-USER/YOU shall mean any entity who has downloaded or obtained through any
-other means a version of the Loader software.
-
-
-1 LICENSE ENTITLEMENT
-
-1.1 The Loader is provided without charge. Title to the Loader does not pass
-to the user in any circumstances. The Loader is supplied as object code.
-
-1.2 The provider grants a personal, non-transferable, non-exclusive licence to
-use the Loader in accordance with the terms and conditions of this Licence
-Agreement.
-
-1.3 The installation or downloading and use of the Loader entitles the user
-to install and use the Loader for its own internal lawful purposes.
-
-
-2 DISTRIBUTION
-
-2.1 The Loader may be freely distributed to third parties alone or as
-part of a distribution containing other items provided that this license
-is also included.
-
-2.2 The Loader may under no circumstances be branded as another product,
-whether distributed or not.
-
-2.3 Distribution as part of a commercial product is permitted provided such
-distribution is in accordance with clauses 2.1 and 2.2 with respect to the
-Loader.
-
-
-3 ANALYSIS / REVERSE ENGINEERING / MODIFICATION
-
-Except insofar as the user is permitted to do so in accordance with applicable
-law:
-
-3.1 Any analysis of the Loader and embedded data by any means and by
-any entity whether human or otherwise and including but without limitation to
-discover details of internal operation, to reverse engineer, to de-compile
-object code, or to modify for the purposes of modifying behaviour is
-forbidden.
-
-3.2 Any analysis of encoded files by any means and by any entity whether human
-or otherwise and including but without limitation to discover details of file
-format or for the purposes of modifying behaviour or scope of their usage is
-forbidden.
-
-
-4 WARRANTY
-
-THE LOADER SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESSED OR IMPLIED
-WARRANTIES INCLUDING BUT WITHOUT LIMITATION THE IMPLIED WARRANTIES
-OF MERCHANTABILITY AND FITNESS FOR ANY PARTICULAR PURPOSE ARE
-DISCLAIMED. THE PROVIDER DOES NOT WARRANT THAT THE LOADER IS UNINTERRUPTED
-OR ERROR FREE, NOR THAT THE OPERATION OF THE LOADER WILL FUNCTION IN
-CONJUNCTION WITH ANY OTHER PRODUCT.
-
-
-5 LIMITATION OF LIABILITY
-
-5.1 IN NO EVENT WILL THE PROVIDER OF THE LOADER BE LIABLE TO THE USER OR ANY
-PARTY FOR ANY DIRECT, INDIRECT, PUNITIVE, SPECIAL, INCIDENTAL OR OTHER
-CONSEQUENTIAL DAMAGES ARISING DIRECTLY OR INDIRECTLY FROM THIS LICENCE
-AGREEMENT OR ANY USE OF THE LOADER OR ENCODED FILES, EVEN IF THE PROVIDER IS
-EXPRESSLY ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
-
-5.2 THE LOADER IS PROVIDED ON AN "AS IS" BASIS. THE PROVIDER EXCLUDES ALL
-WARRANTIES, CONDITIONS, TERMS, UNDERTAKINGS AND REPRESENTATIONS (EXCLUDING
-FRAUDULENT MISREPRESENTATION) OF ANY KIND, EXPRESS OR IMPLIED, STATUTORY OR
-OTHERWISE IN CONNECTION WITH THE LOADER TO THE FULLEST EXTENT PERMITTED BY
-LAW.
-
-5.3 DOWNLOADING THE LOADER IS AT YOUR OWN RISK AND THE PROVIDER DOES NOT
-ACCEPT LIABILITY FOR ANY DIRECT OR INDIRECT LOSS OR DAMAGE HOWSOEVER CAUSED AS
-A RESULT OF ANY COMPUTER VIRUSES, BUGS, TROJAN HORSES, WORMS, SOFTWARE BOMBS
-OR OTHER SIMILAR PROGRAMS ARISING FROM YOUR USE OF THE LOADER. WHILST THE
-PROVIDER WILL DO ITS BEST TO ENSURE THAT THE LOADER IS FREE FROM SUCH
-DESTRUCTIVE PROGRAMS, IT IS YOUR RESPONSIBILITY TO TAKE REASONABLE PRECAUTIONS
-TO SCAN FOR SUCH DESTRUCTIVE PROGRAMS DOWNLOADED FROM THE INTERNET.
-
-5.4 THE PROVIDER'S MAXIMUM LIABILITY FOR ANY LOSS OR DAMAGE ARISING FROM THIS
-LICENCE AGREEMENT SHALL IN ANY EVENT BE LIMITED IN THE SOLE DISCRETION OF THE
-PROVIDER TO THE REPLACEMENT OF THE LOADER PRODUCT.
-
-5.5 DUE TO THE NATURE OF THE INTERNET, THE PROVIDER CANNOT GUARANTEE THAT ANY
-E-MAILS OR OTHER ELECTRONIC TRANSMISSIONS WILL BE SENT TO YOU OR RECEIVED BY
-THE PROVIDER OR THAT THE CONTENT OF SUCH TRANSMISSIONS WILL BE SECURE DURING
-TRANSMISSION.
-
-
-6 BUG FIXING AND PRODUCT SUPPORT
-
-6.1 The provider will use reasonable endeavours to provide support to users.
-The provider will at their discretion only provide support for the latest
-release.
-
-6.2 Support comprises of fault reporting via tickets and fault diagnosis,
-recommendations on workarounds, and where reasonably possible a timely
-resolution.
-
-6.3 The user accepts that on occasion the ability of the provider to meet
-anticipated or published support schedules may be impaired due to, but without
-limitation, Internet service provider failures or software failures that
-affect the ability to communicate for an indeterminate period.
-
-6.4 The provider reserves the right to refuse to provide support at any time.
-
-6.5 The provider wishes to maintain and offer a product of the highest
-possible quality, and accordingly may from time to time and at its discretion
-make product changes for the purpose of correcting behaviour in variance to
-the published specification or the user's reasonable expectations.
-
-6.6 The provider reserves the right to charge for support where the user does
-not have a valid support plan in place, or where the support offered exceeds
-the scope of the active support plan.
-
-
-7 PRODUCT UPGRADES
-
-7.1 The provider may from time to time release product upgrades. These will
-be provided free of charge and attempts made to provide a timely notification
-to customers of the existence of any new release.
-
-
-8 ERRORS AND OMISSIONS
-
-Whilst reasonable endeavours are made to ensure the accuracy of documentation
-concerning the details of the Loader, the user accepts the possibility of
-inaccuracies in information presented in any format, including email
-communications and online services. The provider shall under no circumstances
-be liable for any events that arise as a result of unintentional inaccuracies
-or omissions.
-
-
-9 USER INDEMNITY
-
-You agree to fully indemnify, defend and hold the provider harmless
-immediately upon demand from and against all actions, liability, claims,
-losses, damages, costs and expenses (including legal/attorney fees) incurred
-by the provider arising directly or indirectly as a result of your breach of
-this Licence Agreement.
-
-
-10 INTELLECTUAL PROPERTY RIGHTS
-
-10.1 The user acknowledges that the Loader and associated documentation and
-materials contain proprietary information of the provider and are and shall
-remain the exclusive property of the provider and/or its licensors and all
-title, copyright, trade marks, trade names, patents and other intellectual
-property rights therein of whatever nature shall remain the sole property of
-the provider and/or its licensors.
-
-10.2 No title to or rights of ownership, copyright or other intellectual
-property in the Loader is transferred to the user (other than the licence
-rights expressly granted in this Licence Agreement).
-
-
-11 TERMINATION
-
-11.1 The provider reserves the right to terminate this Licence Agreement
-immediately by notice in writing against the user if the user is in breach of
-any terms and conditions of this Licence Agreement.
-
-11.2 Termination of this Licence Agreement for any reason shall be without
-prejudice to any other rights or remedies of the provider which may have
-arisen on or before the date of termination under this Licence Agreement or in
-law.
-
-11.3 The provisions of the following clauses shall survive any termination of
-this agreement; clause 3, 5, 10 and 13.
-
-
-12 GENERAL
-
-12.1 The provider reserves the right to transfer or assign all or any of its
-rights and duties and responsibilities set out in this Licence Agreement to
-another party.
-
-12.2 Headings have been included for convenience only and will not be used in
-construing any provision of this Licence Agreement.
-
-12.3 No delay or failure by the provider to exercise any powers, rights or
-remedies under this Licence Agreement will operate as a waiver of them nor
-will any single or partial exercise of any such powers, rights or remedies
-include any other or further exercise of them.
-
-12.4 If any part of this Licence Agreement is found by a court of competent
-jurisdiction or other competent authority to be invalid, unlawful or
-unenforceable then such part shall be severed from the remainder of this
-Licence Agreement which will continue to be valid and enforceable to the
-fullest extent permitted by applicable law.
-
-12.5 This Licence Agreement including the documents or other sources referred
-to herein supersede all prior representations, understandings and agreements
-between the user and the provider relating to the Loader and sets forth the
-entire agreement and understanding between the user and the provider relating
-to the Loader.
-
-12.6 Nothing in this Licence Agreement shall be deemed to constitute a
-partnership between you and the provider nor constitute either party being an
-agent of the other party.
-
-12.7 This Agreement does not create any rights or benefits enforceable by any
-person not a party to it (within the meaning of the U.K.Contracts (Rights of
-Third Parties) Act 1999) except that a person who under clause 12.1 is a
-permitted successor or assignee of the rights or benefits of the provider may
-enforce such rights or benefits.
-
-
-13 GOVERNING LAW AND JURISDICTION
-
-This License Agreement and any issues relating thereto shall be construed and
-interpreted in accordance with the laws of England and subject to the
-exclusive jurisdiction of the English courts.
-
-Copyright (c) 2002-2017 ionCube Ltd. Last revised 23-April-2015
+LICENCE AGREEMENT FOR THE IONCUBE PHP LOADER, PROVIDED TO ENABLE THE USE
+OF IONCUBE ENCODED FILES AND AS PART OF THE IONCUBE24 SERVICE (ioncube24.com)
+
+YOU SHOULD CAREFULLY READ THE FOLLOWING TERMS AND CONDITIONS BEFORE USING THE
+LOADER SOFTWARE. THE INSTALLATION AND/OR USE OR COPYING OF THE IONCUBE PHP
+LOADER SOFTWARE INDICATES YOUR ACCEPTANCE OF THIS LICENCE AGREEMENT. IF YOU
+DO NOT ACCEPT THE TERMS OF THIS LICENCE AGREEMENT, DO NOT INSTALL, COPY
+AND/OR USE THE LOADER SOFTWARE.
+
+DEFINITIONS
+
+The following definitions shall apply in this document:
+
+LOADER shall mean the ionCube PHP Loader software package or collection
+of Loaders, including any modifications or upgrades to the software, used for
+executing PHP scripts previously encoded with the ionCube PHP Encoder
+software to render them non-humanly readable, and any associated
+documentation or electronic or online materials relating to the software.
+
+ENCODER shall mean any ionCube PHP Encoder software or service used for the
+purpose of producing non-humanly readable encoded files from PHP scripts.
+
+ENCODED FILE shall mean a non-humanly readable file produced by the
+Encoder and being derived from humanly readable PHP script source.
+
+PROVIDER shall mean ionCube Ltd.
+
+USER/YOU shall mean any entity who has downloaded or obtained through any
+other means a version of the Loader software.
+
+
+1 LICENSE ENTITLEMENT
+
+1.1 The Loader is provided without charge. Title to the Loader does not pass
+to the user in any circumstances. The Loader is supplied as object code.
+
+1.2 The provider grants a personal, non-transferable, non-exclusive licence to
+use the Loader in accordance with the terms and conditions of this Licence
+Agreement.
+
+1.3 The installation or downloading and use of the Loader entitles the user
+to install and use the Loader for its own internal lawful purposes.
+
+
+2 DISTRIBUTION
+
+2.1 The Loader may be freely distributed to third parties alone or as
+part of a distribution containing other items provided that this license
+is also included.
+
+2.2 The Loader may under no circumstances be branded as another product,
+whether distributed or not.
+
+2.3 Distribution as part of a commercial product is permitted provided such
+distribution is in accordance with clauses 2.1 and 2.2 with respect to the
+Loader.
+
+
+3 ANALYSIS / REVERSE ENGINEERING / MODIFICATION
+
+Except insofar as the user is permitted to do so in accordance with applicable
+law:
+
+3.1 Any analysis of the Loader and embedded data by any means and by
+any entity whether human or otherwise and including but without limitation to
+discover details of internal operation, to reverse engineer, to de-compile
+object code, or to modify for the purposes of modifying behaviour is
+forbidden.
+
+3.2 Any analysis of encoded files by any means and by any entity whether human
+or otherwise and including but without limitation to discover details of file
+format or for the purposes of modifying behaviour or scope of their usage is
+forbidden.
+
+
+4 WARRANTY
+
+THE LOADER SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESSED OR IMPLIED
+WARRANTIES INCLUDING BUT WITHOUT LIMITATION THE IMPLIED WARRANTIES
+OF MERCHANTABILITY AND FITNESS FOR ANY PARTICULAR PURPOSE ARE
+DISCLAIMED. THE PROVIDER DOES NOT WARRANT THAT THE LOADER IS UNINTERRUPTED
+OR ERROR FREE, NOR THAT THE OPERATION OF THE LOADER WILL FUNCTION IN
+CONJUNCTION WITH ANY OTHER PRODUCT.
+
+
+5 LIMITATION OF LIABILITY
+
+5.1 IN NO EVENT WILL THE PROVIDER OF THE LOADER BE LIABLE TO THE USER OR ANY
+PARTY FOR ANY DIRECT, INDIRECT, PUNITIVE, SPECIAL, INCIDENTAL OR OTHER
+CONSEQUENTIAL DAMAGES ARISING DIRECTLY OR INDIRECTLY FROM THIS LICENCE
+AGREEMENT OR ANY USE OF THE LOADER OR ENCODED FILES, EVEN IF THE PROVIDER IS
+EXPRESSLY ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+
+5.2 THE LOADER IS PROVIDED ON AN "AS IS" BASIS. THE PROVIDER EXCLUDES ALL
+WARRANTIES, CONDITIONS, TERMS, UNDERTAKINGS AND REPRESENTATIONS (EXCLUDING
+FRAUDULENT MISREPRESENTATION) OF ANY KIND, EXPRESS OR IMPLIED, STATUTORY OR
+OTHERWISE IN CONNECTION WITH THE LOADER TO THE FULLEST EXTENT PERMITTED BY
+LAW.
+
+5.3 DOWNLOADING THE LOADER IS AT YOUR OWN RISK AND THE PROVIDER DOES NOT
+ACCEPT LIABILITY FOR ANY DIRECT OR INDIRECT LOSS OR DAMAGE HOWSOEVER CAUSED AS
+A RESULT OF ANY COMPUTER VIRUSES, BUGS, TROJAN HORSES, WORMS, SOFTWARE BOMBS
+OR OTHER SIMILAR PROGRAMS ARISING FROM YOUR USE OF THE LOADER. WHILST THE
+PROVIDER WILL DO ITS BEST TO ENSURE THAT THE LOADER IS FREE FROM SUCH
+DESTRUCTIVE PROGRAMS, IT IS YOUR RESPONSIBILITY TO TAKE REASONABLE PRECAUTIONS
+TO SCAN FOR SUCH DESTRUCTIVE PROGRAMS DOWNLOADED FROM THE INTERNET.
+
+5.4 THE PROVIDER'S MAXIMUM LIABILITY FOR ANY LOSS OR DAMAGE ARISING FROM THIS
+LICENCE AGREEMENT SHALL IN ANY EVENT BE LIMITED IN THE SOLE DISCRETION OF THE
+PROVIDER TO THE REPLACEMENT OF THE LOADER PRODUCT.
+
+5.5 DUE TO THE NATURE OF THE INTERNET, THE PROVIDER CANNOT GUARANTEE THAT ANY
+E-MAILS OR OTHER ELECTRONIC TRANSMISSIONS WILL BE SENT TO YOU OR RECEIVED BY
+THE PROVIDER OR THAT THE CONTENT OF SUCH TRANSMISSIONS WILL BE SECURE DURING
+TRANSMISSION.
+
+
+6 BUG FIXING AND PRODUCT SUPPORT
+
+6.1 The provider will use reasonable endeavours to provide support to users.
+The provider will at their discretion only provide support for the latest
+release.
+
+6.2 Support comprises of fault reporting via tickets and fault diagnosis,
+recommendations on workarounds, and where reasonably possible a timely
+resolution.
+
+6.3 The user accepts that on occasion the ability of the provider to meet
+anticipated or published support schedules may be impaired due to, but without
+limitation, Internet service provider failures or software failures that
+affect the ability to communicate for an indeterminate period.
+
+6.4 The provider reserves the right to refuse to provide support at any time.
+
+6.5 The provider wishes to maintain and offer a product of the highest
+possible quality, and accordingly may from time to time and at its discretion
+make product changes for the purpose of correcting behaviour in variance to
+the published specification or the user's reasonable expectations.
+
+6.6 The provider reserves the right to charge for support where the user does
+not have a valid support plan in place, or where the support offered exceeds
+the scope of the active support plan.
+
+
+7 PRODUCT UPGRADES
+
+7.1 The provider may from time to time release product upgrades. These will
+be provided free of charge and attempts made to provide a timely notification
+to customers of the existence of any new release.
+
+
+8 ERRORS AND OMISSIONS
+
+Whilst reasonable endeavours are made to ensure the accuracy of documentation
+concerning the details of the Loader, the user accepts the possibility of
+inaccuracies in information presented in any format, including email
+communications and online services. The provider shall under no circumstances
+be liable for any events that arise as a result of unintentional inaccuracies
+or omissions.
+
+
+9 USER INDEMNITY
+
+You agree to fully indemnify, defend and hold the provider harmless
+immediately upon demand from and against all actions, liability, claims,
+losses, damages, costs and expenses (including legal/attorney fees) incurred
+by the provider arising directly or indirectly as a result of your breach of
+this Licence Agreement.
+
+
+10 INTELLECTUAL PROPERTY RIGHTS
+
+10.1 The user acknowledges that the Loader and associated documentation and
+materials contain proprietary information of the provider and are and shall
+remain the exclusive property of the provider and/or its licensors and all
+title, copyright, trade marks, trade names, patents and other intellectual
+property rights therein of whatever nature shall remain the sole property of
+the provider and/or its licensors.
+
+10.2 No title to or rights of ownership, copyright or other intellectual
+property in the Loader is transferred to the user (other than the licence
+rights expressly granted in this Licence Agreement).
+
+
+11 TERMINATION
+
+11.1 The provider reserves the right to terminate this Licence Agreement
+immediately by notice in writing against the user if the user is in breach of
+any terms and conditions of this Licence Agreement.
+
+11.2 Termination of this Licence Agreement for any reason shall be without
+prejudice to any other rights or remedies of the provider which may have
+arisen on or before the date of termination under this Licence Agreement or in
+law.
+
+11.3 The provisions of the following clauses shall survive any termination of
+this agreement; clause 3, 5, 10 and 13.
+
+
+12 GENERAL
+
+12.1 The provider reserves the right to transfer or assign all or any of its
+rights and duties and responsibilities set out in this Licence Agreement to
+another party.
+
+12.2 Headings have been included for convenience only and will not be used in
+construing any provision of this Licence Agreement.
+
+12.3 No delay or failure by the provider to exercise any powers, rights or
+remedies under this Licence Agreement will operate as a waiver of them nor
+will any single or partial exercise of any such powers, rights or remedies
+include any other or further exercise of them.
+
+12.4 If any part of this Licence Agreement is found by a court of competent
+jurisdiction or other competent authority to be invalid, unlawful or
+unenforceable then such part shall be severed from the remainder of this
+Licence Agreement which will continue to be valid and enforceable to the
+fullest extent permitted by applicable law.
+
+12.5 This Licence Agreement including the documents or other sources referred
+to herein supersede all prior representations, understandings and agreements
+between the user and the provider relating to the Loader and sets forth the
+entire agreement and understanding between the user and the provider relating
+to the Loader.
+
+12.6 Nothing in this Licence Agreement shall be deemed to constitute a
+partnership between you and the provider nor constitute either party being an
+agent of the other party.
+
+12.7 This Agreement does not create any rights or benefits enforceable by any
+person not a party to it (within the meaning of the U.K.Contracts (Rights of
+Third Parties) Act 1999) except that a person who under clause 12.1 is a
+permitted successor or assignee of the rights or benefits of the provider may
+enforce such rights or benefits.
+
+
+13 GOVERNING LAW AND JURISDICTION
+
+This License Agreement and any issues relating thereto shall be construed and
+interpreted in accordance with the laws of England and subject to the
+exclusive jurisdiction of the English courts.
+
+Copyright (c) 2002-2017 ionCube Ltd. Last revised 23-April-2015
diff --git a/src/deb/latest.txt b/src/deb/latest.txt
index 8ebe40d1..dcb1761c 100644
--- a/src/deb/latest.txt
+++ b/src/deb/latest.txt
@@ -1 +1 @@
-vesta-0.9.9-0-4
+vesta-0.9.9-0-13
\ No newline at end of file
diff --git a/src/deb/vesta/postinst b/src/deb/vesta/postinst
index 09195d4c..186f54d5 100755
--- a/src/deb/vesta/postinst
+++ b/src/deb/vesta/postinst
@@ -21,12 +21,155 @@ if [ ! -d "/usr/local/vesta/data/upgrades" ]; then
mkdir -p /usr/local/vesta/data/upgrades
fi
+VESTA="/usr/local/vesta"
+
# show changelog after update
-# echo "1" > /usr/local/vesta/data/upgrades/show_changelog
-# chmod a=rw /usr/local/vesta/data/upgrades/show_changelog
+echo "1" > /usr/local/vesta/data/upgrades/show_changelog
+chmod a=rw /usr/local/vesta/data/upgrades/show_changelog
+
+# SSL fix for Apache 2.4.65+
+if [ ! -f "/usr/local/vesta/data/upgrades/fixssl.conf" ]; then
+ if [ "$release" -ge 11 ]; then
+ if [ -f "/etc/apache2/apache2.conf" ] && [ -f "/etc/nginx/nginx.conf" ] && [ ! -f "/etc/nginx/conf.d/fixssl.conf" ]; then
+ echo "== Fixing SSL for Apache 2.4.65+"
+ echo -e "proxy_ssl_server_name on;\nproxy_ssl_name \$host;\nproxy_ssl_session_reuse off;" > /etc/nginx/conf.d/fixssl.conf
+ touch /usr/local/vesta/data/upgrades/fixssl.conf
+ nginx_running=$(/usr/local/vesta/bin/v-list-sys-services | grep 'nginx' | grep -c 'running')
+ if [ $nginx_running -eq 1 ]; then
+ echo "== Restarting Nginx"
+ systemctl restart nginx
+ fi
+ fi
+ fi
+fi
+
+# Adding cron job for disk usage snapshot
+if [ ! -f "/usr/local/vesta/data/upgrades/v-df-snapshot-make" ]; then
+ if ! grep -q "v-df-snapshot-make" /usr/local/vesta/data/users/admin/cron.conf; then
+ echo "== Adding cron job for disk usage snapshot"
+ command="sudo $VESTA/bin/v-df-snapshot-make"
+ $VESTA/bin/v-add-cron-job 'admin' '05' '04' '*' '*' '*' "$command"
+ touch /usr/local/vesta/data/upgrades/v-df-snapshot-make
+ systemctl restart cron.service
+ fi
+ if ! grep -q "v-df-snapshot-logs-cleaner" /usr/local/vesta/data/users/admin/cron.conf; then
+ echo "== Adding cron job for disk usage snapshot logs cleaner"
+ command="sudo $VESTA/bin/v-df-snapshot-logs-cleaner"
+ $VESTA/bin/v-add-cron-job 'admin' '10' '04' '*' '*' '*' "$command"
+ touch /usr/local/vesta/data/upgrades/v-df-snapshot-make
+ systemctl restart cron.service
+ fi
+fi
+
+# Fixing PHP and .env permissions and ownership for all websites
+if [ ! -f "/usr/local/vesta/data/upgrades/fix-website-permissions-for-all-websites-only-php" ]; then
+ # Renaming fix-website-permissions-for-all-websites to fix-website-permissions-for-all-websites-only-php"
+ if grep -q "fix-website-permissions-for-all-websites" /usr/local/vesta/data/users/admin/cron.conf; then
+ if ! grep -q "fix-website-permissions-for-all-websites-only-php" /usr/local/vesta/data/users/admin/cron.conf; then
+ echo "== Renaming fix-website-permissions-for-all-websites to fix-website-permissions-for-all-websites-only-php"
+ sed -i 's|v-fix-website-permissions-for-all-websites > /dev/null 2>&1|v-fix-website-permissions-for-all-websites-only-php|' /usr/local/vesta/data/users/admin/cron.conf
+ sed -i 's|v-fix-website-permissions-for-all-websites > /dev/null 2>&1|v-fix-website-permissions-for-all-websites-only-php|' /var/spool/cron/crontabs/admin
+ sed -i 's|v-fix-website-permissions-for-all-websites |v-fix-website-permissions-for-all-websites-only-php |' /usr/local/vesta/data/users/admin/cron.conf
+ sed -i 's|v-fix-website-permissions-for-all-websites |v-fix-website-permissions-for-all-websites-only-php |' /var/spool/cron/crontabs/admin
+ systemctl restart cron.service
+ fi
+ fi
+ echo "== Fixing PHP and .env permissions and ownership for all websites"
+ command="sudo $VESTA/bin/v-fix-website-permissions-for-all-websites-only-php"
+ $VESTA/bin/v-add-cron-job 'admin' '05' '03' '*' '*' '*' "$command"
+ touch /usr/local/vesta/data/upgrades/fix-website-permissions-for-all-websites-only-php
+ systemctl restart cron.service
+fi
+
+if ! grep -q "FILEMANAGER_KEY='FREEFM'" /usr/local/vesta/conf/vesta.conf; then
+ echo "== Adding FileManager license to vesta.conf"
+ echo "FILEMANAGER_KEY='FREEFM'" >> /usr/local/vesta/conf/vesta.conf
+fi
+
+if [ -f "/root/.bash_profile" ]; then
+ if ! grep -q "v-cd-www" /root/.bash_profile; then
+ echo "== Adding v-cd-www alias to root bash profile"
+ echo "alias v-cd-www='source /usr/local/vesta/bin/v-change-dir-www'" >> /root/.bash_profile
+ fi
+fi
+
+# Adding myVesta rules to SpamAssassin
+if [ -d "/etc/spamassassin" ]; then
+ spamassassin_modified=0
+ if [ ! -f "/etc/spamassassin/myvesta.cf" ]; then
+ touch /etc/spamassassin/myvesta.cf
+ fi
+ if ! grep -q 'RCVD_IN_RP_SAFE' /etc/spamassassin/myvesta.cf; then
+ echo "== Adding RCVD_IN_RP_ myVesta rules to SpamAssassin"
+ echo 'score RCVD_IN_RP_SAFE 0' >> /etc/spamassassin/myvesta.cf
+ echo 'score RCVD_IN_RP_CERTIFIED 0' >> /etc/spamassassin/myvesta.cf
+ spamassassin_modified=1
+ fi
+ if ! grep -q 'SPF_FAIL' /etc/spamassassin/myvesta.cf; then
+ echo "== Adding SPF_FAIL myVesta rules to SpamAssassin"
+ cat <> /etc/spamassassin/myvesta.cf
+score SPF_FAIL 3.0
+score SPF_SOFTFAIL 4.0
+score SPF_NONE 4.0
+EOF
+ spamassassin_modified=1
+ fi
+
+ if [ $spamassassin_modified -eq 1 ]; then
+ spamassassin_running=$(/usr/local/vesta/bin/v-list-sys-services | grep 'spamassassin\|spamd' | grep -c 'running')
+ if [ $spamassassin_running -eq 1 ]; then
+ echo "== Restarting SpamAssassin"
+ if [ "$release" -lt 12 ]; then
+ systemctl restart spamassassin.service
+ else
+ systemctl restart spamd.service
+ fi
+ fi
+ fi
+fi
+
+# Adding ProFTPD to Fail2Ban
+if [ -f "/etc/fail2ban/jail.local" ] && [ -f "/etc/proftpd/proftpd.conf" ]; then
+ if ! grep -q 'proftpd' /etc/fail2ban/jail.local; then
+ echo "== Adding ProFTPD to Fail2Ban"
+ cat <> /etc/fail2ban/jail.local
+
+[proftpd]
+enabled = true
+filter = proftpd
+action = vesta[name=FTP]
+port = ftp,ftp-data,ftps,ftps-data
+logpath = %(proftpd_log)s
+backend = %(proftpd_backend)s
+maxretry = 5
+EOF
+ fail2ban_running=$(/usr/local/vesta/bin/v-list-sys-services | grep 'fail2ban' | grep -c 'running')
+ if [ $fail2ban_running -eq 1 ]; then
+ echo "== Restarting Fail2Ban"
+ systemctl restart fail2ban
+ fi
+ fi
+fi
+
+# Removing SpamHaus DNSBL
+if [ ! -f "/usr/local/vesta/data/upgrades/spamhaus_dnsbl_removed" ]; then
+ sed -i '/zen.spamhaus.org/d' /etc/exim4/dnsbl.conf
+ touch /usr/local/vesta/data/upgrades/spamhaus_dnsbl_removed
+fi
+
+# Fixing 'dh key too small' in dovecot
+if [ -f "/var/log/dovecot.log.1" ] && [ -f "/etc/dovecot/conf.d/10-ssl.conf" ] && [ -f "/usr/share/dovecot/dh.pem" ]; then
+ if grep -q 'dh key too small' /var/log/dovecot.log.1; then
+ if ! grep -q 'dh.pem' /etc/dovecot/conf.d/10-ssl.conf; then
+ echo "== Fixing 'dh key too small' in dovecot"
+ echo "ssl_dh=> /etc/dovecot/conf.d/10-ssl.conf
+ systemctl restart dovecot
+ fi
+ fi
+fi
# Patching exim4.conf for: smtputf8_advertise_hosts
-if [ "$release" -gt 10 ]; then
+if [ "$release" -ge 11 ]; then
if [ -f "/etc/exim4/exim4.conf.template" ]; then
if ! grep -q 'smtputf8_advertise_hosts' /etc/exim4/exim4.conf.template; then
echo 'Patching exim4.conf for: smtputf8_advertise_hosts'
@@ -47,7 +190,7 @@ if [ -f "/etc/exim4/exim4.conf.template" ]; then
fi
# Making sure yescrypt is disabled
-if [ "$release" -eq 11 ]; then
+if [ "$release" -ge 11 ]; then
sed -i "s/yescrypt/sha512/g" /etc/pam.d/common-password
fi
@@ -66,25 +209,34 @@ if [ "$release" -eq 11 ]; then
ADD=" hosts_try_fastopen = \!\*.l.google.com"
sed -i "s#$FIND#$FIND\n$ADD#g" /etc/exim4/exim4.conf.template
systemctl restart exim4
-
- sed -i "s/net.ipv4.tcp_window_scaling/#net.ipv4.tcp_window_scaling/g" /etc/sysctl.conf
- echo 1 > /proc/sys/net/ipv4/tcp_window_scaling
fi
fi
fi
+if [ "$release" -ge 11 ]; then
+ check_grep=$(grep -c '^net\.ipv4\.tcp_window_scaling' /etc/sysctl.conf)
+ if [ "$check_grep" -gt 0 ]; then
+ echo "=== Removing net.ipv4.tcp_window_scaling"
+ sed -i "s/net\.ipv4\.tcp_window_scaling/#net.ipv4.tcp_window_scaling/g" /etc/sysctl.conf
+ echo 1 > /proc/sys/net/ipv4/tcp_window_scaling
+ fi
+fi
# Adding Barracuda RBL to SpamAssassin
if [ ! -f "/usr/local/vesta/data/upgrades/barracuda_rbl" ]; then
spamassassin_installed=$(/usr/local/vesta/bin/v-list-sys-services | grep -c 'spamassassin')
- spamassassin_running=$(/usr/local/vesta/bin/v-list-sys-services | grep 'spamassassin' | grep -c 'running')
+ spamassassin_running=$(/usr/local/vesta/bin/v-list-sys-services | grep 'spamassassin\|spamd' | grep -c 'running')
if [ $spamassassin_installed -eq 1 ]; then
echo "== Adding Barracuda RBL to SpamAssassin"
wget -nv -O /etc/spamassassin/barracuda.cf http://c.myvestacp.com/tools/spamassassin/barracuda.cf
fi
if [ $spamassassin_running -eq 1 ]; then
echo "== Restarting SpamAssassin"
- systemctl restart spamassassin
+ if [ "$release" -lt 12 ]; then
+ systemctl restart spamassassin.service
+ else
+ systemctl restart spamd.service
+ fi
fi
touch /usr/local/vesta/data/upgrades/barracuda_rbl
fi
@@ -141,7 +293,11 @@ if [ ! -f "/usr/local/vesta/data/upgrades/enable-tls-in-proftpd" ]; then
echo "== Enabling TLS for ProFTPD FTPS"
wget -nv https://c.myvestacp.com/debian/10/proftpd/tls.conf -O /etc/proftpd/tls.conf
sed -i "s|AuthPAMConfig|Include /etc/proftpd/tls.conf\n\nAuthPAMConfig|g" /etc/proftpd/proftpd.conf
- systemctl restart proftpd
+ proftpd_running=$(/usr/local/vesta/bin/v-list-sys-services | grep 'proftpd' | grep -c 'running')
+ if [ $proftpd_running -eq 1 ]; then
+ echo "== Restarting ProFTPD"
+ systemctl restart proftpd
+ fi
fi
fi
fi
diff --git a/src/deb/vesta_compile.sh b/src/deb/vesta_compile.sh
index a80316d9..2d0e4874 100644
--- a/src/deb/vesta_compile.sh
+++ b/src/deb/vesta_compile.sh
@@ -7,8 +7,8 @@
build_deb_package=1
add_deb_to_apt_repo=0
-TARGET_DEB_NAME='bookworm'
-TARGET_DEB_VER='12'
+TARGET_DEB_NAME='trixie'
+TARGET_DEB_VER='13'
run_apt_update_and_install=1
wait_to_press_enter=1
@@ -31,8 +31,8 @@ fi
MAINTAINER_EMAIL='info@myvestacp.com'
-TARGET_DEB_NAME_MAIN='bookworm'
-TARGET_DEB_VER_MAIN='12'
+TARGET_DEB_NAME_MAIN='trixie'
+TARGET_DEB_VER_MAIN='13'
# Set compiling directory
BUILD_DIR="/usr/src/$TARGET_DEB_NAME"
@@ -58,11 +58,12 @@ BUILD_DATE=$(date +"%d-%b-%Y")
# Set Version for compiling
VESTA_V=$VESTA_VER"_amd64"
-NGINX_V='1.25.1'
-OPENSSL_V='1.1.1u'
+
+NGINX_V='1.29.1'
+PHP_V='8.4.11'
+OPENSSL_V='1.1.1w'
PCRE_V='8.45'
-ZLIB_V='1.2.13'
-PHP_V='5.6.40'
+ZLIB_V='1.3.1'
# Generate Links for sourcecode
NGINX='https://nginx.org/download/nginx-'$NGINX_V'.tar.gz'
@@ -73,7 +74,7 @@ OPENSSL='https://www.openssl.org/source/openssl-'$OPENSSL_V'.tar.gz'
PCRE='https://sourceforge.net/projects/pcre/files/pcre/'$PCRE_V'/pcre-'$PCRE_V'.tar.gz/download'
# Zlib moved archives to Github
ZLIB='https://github.com/madler/zlib/archive/refs/tags/v'$ZLIB_V'.tar.gz'
-PHP='http://de2.php.net/distributions/php-'$PHP_V'.tar.gz'
+PHP='https://www.php.net/distributions/php-'$PHP_V'.tar.gz'
# Set package dependencies for compiling
release=$(cat /etc/debian_version | tr "." "\n" | head -n1)
@@ -81,7 +82,7 @@ release=$(cat /etc/debian_version | tr "." "\n" | head -n1)
if [ "$release" -lt 12 ]; then
SOFTWARE='build-essential libxml2-dev libz-dev libcurl4-gnutls-dev unzip openssl libssl-dev pkg-config reprepro dpkg-sig git rsync'
else
- SOFTWARE='build-essential libxml2-dev libz-dev libcurl4-gnutls-dev unzip openssl libssl-dev pkg-config reprepro git rsync'
+ SOFTWARE='build-essential libxml2-dev libz-dev libcurl4-gnutls-dev unzip openssl libssl-dev pkg-config reprepro git rsync libsqlite3-dev libonig-dev'
fi
function press_enter {
@@ -130,6 +131,9 @@ if [ $run_apt_update_and_install -eq 1 ]; then
if [ ! -e /usr/local/include/curl ] && [ "$release" -lt 12 ]; then
ln -s /usr/include/x86_64-linux-gnu/curl /usr/local/include/curl
fi
+ if [ ! -e /usr/local/include/curl ] && [ "$release" -eq 13 ]; then
+ ln -s /usr/include/x86_64-linux-gnu/curl /usr/local/include/curl
+ fi
press_enter "=== Press enter to continue ==============================================================================="
fi
@@ -258,6 +262,7 @@ EOF
press_enter "*** please copy above generated key to your clipboard and then paste it after pressing enter now ***"
vi $PATH_OF_APT_REPO_ROOT/deb_signing.key
cp $PATH_OF_APT_REPO_ROOT/deb_signing.key $PATH_OF_C_WEB_FOLDER_ROOT/deb_signing.key
+ cp $PATH_OF_APT_REPO_ROOT/deb_signing.key $PATH_OF_C_WEB_FOLDER_ROOT/debian/13/deb_signing.key
cp $PATH_OF_APT_REPO_ROOT/deb_signing.key $PATH_OF_C_WEB_FOLDER_ROOT/debian/12/deb_signing.key
cp $PATH_OF_APT_REPO_ROOT/deb_signing.key $PATH_OF_C_WEB_FOLDER_ROOT/debian/11/deb_signing.key
cp $PATH_OF_APT_REPO_ROOT/deb_signing.key $PATH_OF_C_WEB_FOLDER_ROOT/debian/10/deb_signing.key
@@ -448,6 +453,34 @@ if [ "$CWEB_B" = true ]; then
tar -czf dovecot.tar.gz dovecot/
echo "=== All done for Debian12"
##########
+ cd $PATH_OF_C_WEB_FOLDER_ROOT/debian/13
+
+ if [ -f "packages.tar.gz" ]; then
+ rm packages.tar.gz
+ fi
+ tar -czf packages.tar.gz packages/
+
+ if [ -f "templates.tar.gz" ]; then
+ rm templates.tar.gz
+ fi
+ tar -czf templates.tar.gz templates/
+
+ if [ -f "firewall.tar.gz" ]; then
+ rm firewall.tar.gz
+ fi
+ tar -czf firewall.tar.gz firewall/
+
+ if [ -f "fail2ban.tar.gz" ]; then
+ rm fail2ban.tar.gz
+ fi
+ tar -czf fail2ban.tar.gz fail2ban/
+
+ if [ -f "dovecot.tar.gz" ]; then
+ rm dovecot.tar.gz
+ fi
+ tar -czf dovecot.tar.gz dovecot/
+ echo "=== All done for Debian13"
+ ##########
cp /root/vesta/install/vst-install-debian.sh $PATH_OF_C_WEB_FOLDER_ROOT/vst-install-debian.sh
@@ -498,7 +531,7 @@ if [ "$NGINX_B" = true ]; then
--with-openssl-opt=no-weak-ssl-ciphers \
--with-openssl-opt=no-ssl3 \
--with-pcre=../pcre-$PCRE_V \
- --with-pcre-jit \
+ --with-pcre-jit \
--with-zlib=../zlib-$ZLIB_V
# Check install directory and remove if exists
@@ -593,11 +626,10 @@ if [ "$PHP_B" = true ]; then
--with-zlib \
--with-fpm-user=admin \
--with-fpm-group=admin \
- --with-mysql \
--with-mysqli \
--with-curl \
--enable-mbstring \
- --with-mysql-sock=/var/run/mysqld/mysqld.sock
+ --with-mysql-sock=/var/run/mysqld/mysqld.sock
# Check install directory and remove if exists
if [ -d $INSTALL_DIR/php ]; then
@@ -605,7 +637,7 @@ if [ "$PHP_B" = true ]; then
fi
press_enter "=== Press enter to compile PHP ==============================================================================="
-
+
make && make install
press_enter "=== Press enter to continue ==============================================================================="
diff --git a/web/add/dns/index.php b/web/add/dns/index.php
index 7c18faab..b9e47abe 100644
--- a/web/add/dns/index.php
+++ b/web/add/dns/index.php
@@ -80,7 +80,7 @@ if (!empty($_POST['ok'])) {
// Flush field values on success
if (empty($_SESSION['error_msg'])) {
- $_SESSION['ok_msg'] = __('DNS_DOMAIN_CREATED_OK',htmlentities($_POST[v_domain]),htmlentities($_POST[v_domain]));
+ $_SESSION['ok_msg'] = __('DNS_DOMAIN_CREATED_OK',htmlentities($_POST['v_domain']),htmlentities($_POST['v_domain']));
unset($v_domain);
}
}
@@ -128,7 +128,7 @@ if (!empty($_POST['ok_rec'])) {
// Flush field values on success
if (empty($_SESSION['error_msg'])) {
- $_SESSION['ok_msg'] = __('DNS_RECORD_CREATED_OK',htmlentities($_POST[v_rec]),htmlentities($_POST[v_domain]));
+ $_SESSION['ok_msg'] = __('DNS_RECORD_CREATED_OK',htmlentities($_POST['v_rec']),htmlentities($_POST['v_domain']));
unset($v_domain);
unset($v_rec);
unset($v_val);
diff --git a/web/add/mail/index.php b/web/add/mail/index.php
index c761139c..6a8b6e9f 100644
--- a/web/add/mail/index.php
+++ b/web/add/mail/index.php
@@ -186,7 +186,7 @@ if (!empty($_POST['ok_acc'])) {
// Flush field values on success
if (empty($_SESSION['error_msg'])) {
- $_SESSION['ok_msg'] = __('MAIL_ACCOUNT_CREATED_OK',htmlentities(strtolower($_POST['v_account'])),htmlentities($_POST[v_domain]),htmlentities(strtolower($_POST['v_account'])),htmlentities($_POST[v_domain]));
+ $_SESSION['ok_msg'] = __('MAIL_ACCOUNT_CREATED_OK',htmlentities(strtolower($_POST['v_account'])),htmlentities($_POST['v_domain']),htmlentities(strtolower($_POST['v_account'])),htmlentities($_POST['v_domain']));
$_SESSION['ok_msg'] .= " / " . __('open webmail') . "";
unset($v_account);
unset($v_password);
diff --git a/web/add/web/index.php b/web/add/web/index.php
index d77b8f40..e11cff23 100644
--- a/web/add/web/index.php
+++ b/web/add/web/index.php
@@ -323,7 +323,7 @@ if (!empty($_POST['ok'])) {
}
if (!empty($_SESSION['error_msg']) && $domain_added) {
- $_SESSION['ok_msg'] = __('WEB_DOMAIN_CREATED_OK',htmlentities($_POST[v_domain]),htmlentities($_POST[v_domain]));
+ $_SESSION['ok_msg'] = __('WEB_DOMAIN_CREATED_OK',htmlentities($_POST['v_domain']),htmlentities($_POST['v_domain']));
$_SESSION['flash_error_msg'] = $_SESSION['error_msg'];
$url = '/edit/web/?domain='.strtolower(preg_replace("/^www\./i", "", $_POST['v_domain']));
header('Location: ' . $url);
diff --git a/web/css/styles.min.css b/web/css/styles.min.css
index 374b458c..d84a6a85 100644
--- a/web/css/styles.min.css
+++ b/web/css/styles.min.css
@@ -4236,3 +4236,29 @@ div.ui-dialog + div div{
padding: 5px 10px !important;
border-radius: 13px;
}
+
+.get-ip-info-btn {
+ cursor: pointer;
+ margin-left: 10px;
+}
+.get-ip-info-btn:hover {
+ color: #000000;
+}
+.get-ip-info-btn + .get-ip-info-result {
+ margin: 10px 0;
+}
+.get-ip-info-btn + .get-ip-info-result dl dt {
+ font-weight: bold;
+}
+.get-ip-info-btn + .get-ip-info-result dl dd {
+ margin: 0 0 10px 0;
+}
+.get-ip-info-btn + .get-ip-info-result dl .fa-exclamation-triangle {
+ color: red;
+}
+.get-ip-info-btn + .get-ip-info-result dl .fa-check-circle {
+ color: green;
+}
+.get-ip-info-btn + .get-ip-info-result dl .fa-exclamation-circle {
+ color: orange;
+}
diff --git a/web/edit/server/index.php b/web/edit/server/index.php
index 49c577d8..eed4baab 100644
--- a/web/edit/server/index.php
+++ b/web/edit/server/index.php
@@ -339,7 +339,8 @@ if (!empty($_POST['save'])) {
$v_backup_username = escapeshellarg($_POST['v_backup_username']);
$v_backup_password = escapeshellarg($_POST['v_backup_password']);
$v_backup_bpath = escapeshellarg($_POST['v_backup_bpath']);
- exec (VESTA_CMD."v-add-backup-host ".$v_backup_type." ".$v_backup_host ." ".$v_backup_username." ".$v_backup_password." ".$v_backup_bpath, $output, $return_var);
+ $v_backup_port = escapeshellarg($_POST['v_backup_port']);
+ exec (VESTA_CMD."v-add-backup-host ".$v_backup_type." ".$v_backup_host ." ".$v_backup_username." ".$v_backup_password." ".$v_backup_bpath." ".$v_backup_port, $output, $return_var);
check_return_code($return_var,$output);
unset($output);
if (empty($_SESSION['error_msg'])) $v_backup_host = $_POST['v_backup_host'];
@@ -347,12 +348,12 @@ if (!empty($_POST['save'])) {
if (empty($_SESSION['error_msg'])) $v_backup_username = $_POST['v_backup_username'];
if (empty($_SESSION['error_msg'])) $v_backup_password = $_POST['v_backup_password'];
if (empty($_SESSION['error_msg'])) $v_backup_bpath = $_POST['v_backup_bpath'];
+ if (empty($_SESSION['error_msg'])) $v_backup_port = $_POST['v_backup_port'];
$v_backup_new = 'yes';
$v_backup_adv = 'yes';
$v_backup_remote_adv = 'yes';
}
}
-
// Change remote backup host type
if (empty($_SESSION['error_msg'])) {
if ((!empty($_POST['v_backup_host'])) && ($_POST['v_backup_type'] != $v_backup_type)) {
diff --git a/web/inc/i18n/en.php b/web/inc/i18n/en.php
index 39c3bfff..09ae210f 100644
--- a/web/inc/i18n/en.php
+++ b/web/inc/i18n/en.php
@@ -377,6 +377,7 @@ $LANG['en'] = array(
'ErrorLog' => 'ErrorLog',
'Download AccessLog' => 'Download AccessLog',
'Download ErrorLog' => 'Download ErrorLog',
+ 'Continent' => 'Continent',
'Country' => 'Country',
'2 letter code' => '2 letter code',
'State / Province' => 'State / Province',
diff --git a/web/inc/main.php b/web/inc/main.php
index 26df863e..f13e4142 100644
--- a/web/inc/main.php
+++ b/web/inc/main.php
@@ -38,8 +38,13 @@ if(!isset($_SESSION['user_combined_ip'])){
$_SESSION['user_combined_ip'] = $user_combined_ip;
}
+$SKIP_IP_CHECK = false;
+if (isset($_SESSION['DISABLE_IP_CHECK']) && $_SESSION['DISABLE_IP_CHECK'] == 'yes') {
+ $SKIP_IP_CHECK = true;
+}
+
// Checking user to use session from the same IP he has been logged in
-if($_SESSION['user_combined_ip'] != $user_combined_ip && $_SERVER['REMOTE_ADDR'] != '127.0.0.1'){
+if ($_SESSION['user_combined_ip'] != $user_combined_ip && $_SERVER['REMOTE_ADDR'] != '127.0.0.1' && $SKIP_IP_CHECK==false) {
session_destroy();
session_start();
$_SESSION['request_uri'] = $_SERVER['REQUEST_URI'];
diff --git a/web/inc/secure_login.php b/web/inc/secure_login.php
index 3dcdb0ae..d21a4322 100644
--- a/web/inc/secure_login.php
+++ b/web/inc/secure_login.php
@@ -59,7 +59,7 @@ function prevent_post_csrf ($hard_check=false) {
if (isset($_SERVER['HTTP_ORIGIN']) == false) return;
} else {
if (isset($_SERVER['HTTP_HOST']) == false) $_SERVER['HTTP_HOST'] = '';
- if (isset($_SERVER['SERVER_PORT']) == false) $_SERVER['HTTP_PORT'] = '';
+ if (isset($_SERVER['SERVER_PORT']) == false) $_SERVER['SERVER_PORT'] = '';
if (isset($_SERVER['HTTP_ORIGIN']) == false) $_SERVER['HTTP_ORIGIN'] = '';
}
$_SERVER['HTTP_HOST'] = strtolower($_SERVER['HTTP_HOST']);
diff --git a/web/js/app.js b/web/js/app.js
index 9ba909a5..978b7d09 100644
--- a/web/js/app.js
+++ b/web/js/app.js
@@ -1072,3 +1072,42 @@ function elementHideShow(elementToHideOrShow){
el.style.display = el.style.display === 'none' ? 'block' : 'none';
}
+(function($) {
+ $(document).ready(function() {
+ $('.get-ip-info-btn').click(function() {
+ var token = $('#token').attr('token');
+ var index = $(this).attr('data-index');
+ var btn_el = $('.get-ip-info-btn[data-index="' + index + '"]');
+ var result_el = $('.get-ip-info-btn[data-index="' + index + '"] + .get-ip-info-result');
+ var ip = btn_el.attr('data-ip');
+
+ var url_params = new URLSearchParams(window.location.search);
+ var clear_cache = url_params.get('clear_cache');
+
+ if (!$.trim(result_el.html())) {
+ result_el.html('');
+
+ $.ajax({
+ method: "POST",
+ url: "/list/firewall/banlist/ip_info.php",
+ data: { ip: ip, clear_cache: clear_cache, token: token },
+ cache: false,
+ error: function(jqXHR, textStatus, errorThrown) {
+ result_el.html('GENERAL ERROR ' + errorThrown);
+ },
+ success: function(result_data) {
+ if (btn_el.find('i').hasClass('fa-times')) {
+ result_el.html(result_data);
+ }
+ }
+ });
+
+ btn_el.find('i').removeClass('fa-search').addClass('fa-times');
+ }
+ else {
+ result_el.html('');
+ btn_el.find('i').removeClass('fa-times').addClass('fa-search');
+ }
+ });
+ });
+})(jQuery);
diff --git a/web/list/firewall/banlist/ip_info.php b/web/list/firewall/banlist/ip_info.php
new file mode 100644
index 00000000..e7888a75
--- /dev/null
+++ b/web/list/firewall/banlist/ip_info.php
@@ -0,0 +1,164 @@
+
+error_reporting(NULL);
+session_start();
+
+include($_SERVER['DOCUMENT_ROOT']."/inc/main.php");
+
+if (!function_exists('str_contains')) {
+ function str_contains($haystack, $needle)
+ {
+ return $needle !== '' && mb_strpos($haystack, $needle) !== false;
+ }
+}
+
+// cidrMatch() based on https://stackoverflow.com/a/14535823
+function cidrMatch($ip, $range)
+{
+ if (!filter_var($ip, FILTER_VALIDATE_IP, FILTER_FLAG_IPV4)) return false;
+ list($subnet, $bits) = explode('/', $range);
+ $ip = substr(ipToBinary($ip), 0, $bits);
+ $subnet = substr(ipToBinary($subnet), 0, $bits);
+ return ($ip == $subnet);
+}
+
+// ipToBinary based on https://stackoverflow.com/a/14535823
+function ipToBinary($ip)
+{
+ $ipbin = '';
+ $ips = explode(".", $ip);
+ foreach ($ips as $iptmp) {
+ $ipbin .= sprintf("%08b", $iptmp);
+ }
+ return $ipbin;
+}
+
+function fetchURL($url, &$info = [])
+{
+ $curl_handle = curl_init();
+ curl_setopt($curl_handle, CURLOPT_FOLLOWLOCATION, true);
+ curl_setopt($curl_handle, CURLOPT_ENCODING, 'gzip, deflate');
+ curl_setopt($curl_handle, CURLOPT_URL, $url);
+ curl_setopt($curl_handle, CURLOPT_CONNECTTIMEOUT, 10);
+ curl_setopt($curl_handle, CURLOPT_RETURNTRANSFER, 1);
+ $data = curl_exec($curl_handle);
+ $info = curl_getinfo($curl_handle);
+ curl_close($curl_handle);
+ return $data;
+}
+
+function parseCacheEntries($strEntries)
+{
+ $parsed = [];
+ $entries = explode("\n", $strEntries);
+ if ($entries) {
+ foreach ($entries as $entry) {
+ list($entry,) = explode("#", $entry);
+ list($entry,) = explode(";", $entry);
+ $entry = trim($entry);
+ if (!empty($entry)) $parsed[] = $entry;
+ }
+ }
+ return $parsed;
+}
+
+function checkIP($ip)
+{
+ $check_results = [];
+ $lists = [
+ 'BDEALL' => 'http://lists.blocklist.de/lists/all.txt',
+ 'BFB' => 'http://danger.rulez.sk/projects/bruteforceblocker/blist.php',
+ 'CIARMY' => 'http://www.ciarmy.com/list/ci-badguys.txt',
+ 'GREENSNOW' => 'https://blocklist.greensnow.co/greensnow.txt',
+ 'SPAMDROP' => 'https://www.spamhaus.org/drop/drop.txt',
+ 'SPAMEDROP' => 'https://www.spamhaus.org/drop/edrop.txt',
+ 'TOR' => 'https://check.torproject.org/cgi-bin/TorBulkExitList.py',
+ ];
+ $today = date('Y-m-d');
+
+ foreach ($lists as $code => $url) {
+ $cache_tag = 'ip-blacklist-' . $code . '-cache';
+
+ // init cache
+ if (!isset($_SESSION[$cache_tag])) $_SESSION[$cache_tag] = ['updated' => '', 'items' => [], 'http_code' => ''];
+
+ // invalidate cache if clear_cache parameter is 1
+ if (!empty($_REQUEST['clear_cache']) && $_REQUEST['clear_cache'] == 1) $_SESSION[$cache_tag]['updated'] = '2000-01-01';
+
+ // if cache is not updated, fetch new data and save to cache
+ if (strtotime($today) > strtotime($_SESSION[$cache_tag]['updated'])) {
+ $new_cache_data = fetchURL($url, $url_result);
+ if ($url_result['http_code'] == '200') $new_cache_items = parseCacheEntries($new_cache_data);
+ $_SESSION[$cache_tag] = ['updated' => $today, 'items' => $new_cache_items, 'http_code' => $url_result['http_code']];
+ }
+
+ // check ip
+ $matched_ips = array_filter($_SESSION[$cache_tag]['items'], function ($item) use ($ip) {
+ if (str_contains($item, '/')) return cidrMatch($ip, $item);
+ if ($ip == $item) return true;
+ return false;
+ });
+
+ $check_results[$code]['found'] = count($matched_ips) > 0 ? true : false;
+ $check_results[$code]['updated'] = $_SESSION[$cache_tag]['updated'];
+ $check_results[$code]['http_code'] = $_SESSION[$cache_tag]['http_code'];
+ }
+
+ return $check_results;
+}
+
+// Check token
+if ((!isset($_REQUEST['token'])) || ($_SESSION['token'] != $_REQUEST['token'])) {
+ die("Wrong token");
+}
+
+$ip = $_REQUEST['ip'];
+
+// Validate IP format
+if (filter_var($ip, FILTER_VALIDATE_IP) === false) {
+ die('GENERAL ERROR BAD_IP_FORMAT');
+}
+
+// Query host
+$host = gethostbyaddr($ip);
+
+// Query blocklists
+$result_blocklists = '';
+$ip_check = checkIP($ip);
+if ($ip_check) {
+ foreach ($ip_check as $list_code => $list_results) {
+ $result_blocklists .= '