remote linux machine

How to run bash scripts from local machine to remote linux machine

Q. How to run bash script from local machine to remote linux machine ? Ans : We can run the bash script from our local machine to remote machine without login to remote server. We will get the result of some commands on our local machine. The syntax of this command is ssh [user]@[server] ‘[command]’ […]

See More

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