Script to restart any service automatically

We can set the cron to restart the server when it was down or not running. You can use following script to detect and restart the httpd,ngnix,Serv-U or any other services. 1) Create the file vi /root/autorestart.sh and add the following code and save it. You can replace the Serv-U with any your service like […]

See More

How to redirect HTTP to HTTPS using htaccess in Vesta Control Panel

  Redirect HTTP to HTTPS using htaccess in Vesta Control Panel You can automatically redirect visitors to the secured (HTTPS) version of your site to make sure your communications are encrypted by using following .htaccess file RewriteEngine On RewriteCond %{HTTPS} off RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R,L]

See More

How to replace MySQL with Percona Server Debian or Ubuntu in Vesta Control Panel

Replace MySQL with Percona Server Debian or Ubuntu  You can safely replace MySQL with Percona Server without lossing any data. In order to do it, please follow the instructions bellow 1. Import Percona GPG key apt-key adv –keyserver keys.gnupg.net –recv-keys 1C4CBDCDCD2EFD2A 2. Add this to /etc/apt/sources.list, replacing VERSION with the name of your distribution: deb […]

See More