How To Recover A Broken VPS Web Server

When all your web sites suddenly stop working, don't panic! The reason may be a system software clash.

Before I installed the blog software on my VPS that I am currently using ( Welcome › Dotclear › Blog management made easy ) I experimented with blog hosting software from another provider. It required me to install the HTTP server, nginx. A very bad idea, since I already use apache. Predictably, on VPS reboot, nginx took over from apache and all my web sites disappeared.

I am not criticisng nginx. If you prefer it to apache, that's fine. Just don't install two competing servers at the same time, uness you are an expert who knows how to make them work side by side.

Fortunately, my FTP and SSH access was not affected, so I had the means of effecting a repair.

The obvious solution might seem to be to remove nginx with:  sudo apt purge nginx

nginx was removed, but on reboot I still had no web sites.

Running processes can be listed with ps -ax | grep nginx (using the pipe symbol and grep to list only those lines containing the word "nginx" ). This showed that, despite the uninstallation, nginx was still running daemon processes.

So it was also necessary to do:

sudo update-rc.d -f nginx remove

AND

sudo rm /etc/init.d/nginx

I rebooted again and got my web sites back! But this wasn't the end of the story. On further reboot, the web sites again disappeared. There were still sufficient nginx files hanging around to cause problems. I had to take the sledgehammer approach of also doing: 

sudo rm /usr/sbin/nginx

The moral of this story is: do not allow yourself to be persuaded to install nginx if you already have a working apache based system, and vice-versa.

If you need advice in general on the configuration and management of web servers on a VPS, I have written two manuals, which describe in step-by-step detail how to install a secure web server and secure mail server on Linux. The manuals can be purchased at my author website: Unusual Mysteries - Cookbook  They are not expensive and will repay your investment of a small amount of cash in both time and trouble saved.

   

 

Add ping

Trackback URL : https://www.businessassistant.biz/the_vps_blog/index.php?trackback/5

Page top