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...
Category: Basic Linux
Basic Linux, Shell Programming and Scripting
Script to automatically start nginx
You can use the following script to auto restart the nginx on the server. The following script check the status and if it is down then it restart. You can set cron "* * * * * /bin/sh /root/autongnixrestart.sh" ========================== #!...
Basic Linux, How to, htaccess
https to http redirection
How to redirect domain from https://domain.com to http://domain.com ? Ans: If you tried all the possibilities with the .htaccess file and your domain is still not redirected from https to http then finally you can add following code in virtual...
Basic Linux, Shell Programming and Scripting
Make your shell colorful
You can easily changed your black ssh screen to colorful screen by using following steps. 1) Login to the server via SSH as root 2) Edit the .bash_profile file found in the /root directory & paste the following line: vi ...