MyVesta

$ apt-get update --allow-releaseinfo-change
$ apt-get install --reinstall ca-certificates
$ apt-get upgrade -y
$ apt-get install nano wget curl perl sudo -y

$ sudo dpkg --configure -a 
$ sudo nano /etc/hosts 
$ sudo hostnamectl set-hostname new-one 
$ newgrp

$ sudo apt dist-upgrade
$ sudo apt --purge autoremove
$ sudo apt update && sudo apt upgrade
$ apt -y purge Apache2* bind* exim* ufw* firewalld* libapache2-mod-php*
$ curl -O http://c.myvestacp.com/vst-install-debian.sh
$ bash vst-install-debian.sh
OR choose what you want;
$ sudo bash vst-install-debian.sh --apache no --nginx yes --phpfpm yes --vsftpd no --proftpd no --named no
--mysql yes --mysql8 no --postgresql no --exim no --dovecot no --clamav no --spamassassin no --iptables no
--fail2ban no --quota no --force no --interactive yes --port 8083 --hostname hostname.com --email
jangseo@hotmail.com --password PASSWORD --lang en
Change passwd:  $ passwd admin

Remove apps--General command
$ sudo service nginx stop  (sudo systemctl stop apache2)
$ sudo apt -y purge cron* bind* phpmyadmin* fail2ban exim* clamav* dovecot 
$ sudo service nginx restart
$ sudo apt-get autoremove && sudo apt-get autoclean
Reduce Memory (after stop services you want inside Vestacp)
$ systemctl stop spamd.service 
$ systemctl disable spamd.service
$ nano /usr/local/vesta/conf/vesta.conf
    FIREWALL_SYSTEM=''
    FIREWALL_EXTENSION=''
    DNS_SYSTEM=''
    MAIL_SYSTEM=''
$ service vesta restart

wordpress2_rewrite    mink
wordpress2                  bludit, Htmly
PHP-FPM-82                 pluxml, wp

 

create a custom nginx template

$ cd /usr/local/vesta/data/templates/web/nginx
$ cp hosting.tpl mycustom.tpl
$ cp hosting.stpl mycustom.stpl
$ nano mycustom.tpl
server~~~ for HTMLy example
# Block access to .ini, .md files and the content/data folder.
location ~ /(content|data|\.ini|\.md) {
    deny all;
    return 404;
}
location / {
    try_files $uri $uri/ /index.php?$args;
}
Apply the Template in myVesta:
Log in to your myVesta control panel.
Go to the WEB section.
Edit the domain where you are installing HTMLy.
In the Web Template NGINX dropdown menu, select your newly created htmly template.
Click Save to apply the changes and restart Nginx.

prevent services timeout

NGINX
$ mcedit /etc/nginx/nginx.conf
  proxy_connect_timeout 86400;
  proxy_send_timeout 86400;
  proxy_read_timeout 86400;
$ systemctl restart nginx

MARIADB

$ mcedit /etc/mysql/mariadb.cnf
   wait_timeout=86400
   interactive_timeout=86400
$ systemctl restart mysql
=========================================================== 
1. remove cron 
$ sudo apt-get purge cron* -y 
$ sudo rm -rf /var/spool/cron/crontabs 
2. remove phpmyadmin 
$ sudo apt-get purge phpmyadmin* -y 
$ sudo rm -rf /usr/share/phpmyadmin 
$ sudo rm -rf /etc/phpMyAdmin 
3. Remove Roundcube 
$ sudo rm -R /usr/share/roundcube 
$ sudo rm -R /etc/roundcube 
$ sudo apt-get autoremove && sudo apt-get autoclean 
$ sudo service nginx restart 
$ service vesta restart  

Softavulous 
go to Vesta Server at top domain->configure->Softaculous->yes and then go to ssh; 
$ curl -O http://c.myvestacp.com/tools/install-softaculous.sh 
$ bash install-softaculous.sh 
log out from the myVesta panel, and login again. 

Create a Custom Nginx Template for rewrite rule (Recommended, Permanent) 

$ cd /usr/local/vesta/data/templates/web
$ cp -r nginx/default nginx/mycustomtemplate
$ cp -r nginx/default.stpl nginx/mycustomtemplate.stpl
$ cp -r nginx/default.ssl.stpl nginx/mycustomtemplate.ssl.stpl

1. Add Nginx Rewrite Rules in myVesta
rewrite ^/api/?(.*)$ /webservice/dispatcher.php?url=$1 last;

2 Force HTTPS
if ($scheme != "https") {
    return 301 https://$host$request_uri;
}

3. Standard WordPress permalinks (a common use case)
location / {
    try_files $uri $uri/ /index.php?$args;
}

$ systemctl reload nginx

Apply the new template to domain at myVesta control panel interface. 
Go to WEB, edit the domain, and select your new template (mycustomtemplate) from the Nginx template dropdown menu.
Save changes in the control panel; myVesta will automatically restart. 


Posted : Sunday 14th of September 2025 @ 03:40 AM— Tags : mycestacp