Ubuntu

How to completely remove Nginx and re-activate Apache2?

I was having some problem with one of my VPS recently running Ubuntu 14.04 to host BitcoinDark block chain explorer. Every time server restarts it starts using Nginx server instead of the Apache2. When I wanted to uninstall it using sudo apt-get remove nginx nothing happened as the terminal is replying that this package is not installed. However, I’m able to stop the service and restart Apache2. Once it restarts it goes back again. Today I started looking into it and found that somehow I’ve got nginx-core package installed, that is the reason earlier nginx removing command didn’t work. In this article I will explain the steps I have taken to completely remove Nginx from my system and re-activate Apache2 server on Ubuntu 14.04 server. This is a little note to myself as well, if I mess it up again in the future.

# Stopping Nginx service

sudo service nginx stop

# Removing only Nginx

sudo apt-get remove nginx

# Remove only Nginx-core

sudo apt-get remove nginx-core

# Completely remove Nginx package

sudo apt-get remove nginx-*
sudo apt-get purge nginx-*

# If you don’t have Apache2 installed in your system use this command. If Apache2 is installed then skip to the next step.

sudo apt-get install apache2

# Restart / re-activate Apache2

sudo apache2ctl restart

Nginx server has been completely removed and Apache2 restarted and it should be fully working as you set it up.

TLHD

Tech blogger, web developer. Using Android from January 2009 when I got my first T-Mobile G1. Since then used a handful amount of Android smartphones and tablets. Also, rooting and using custom ROM & MODs on my phones and tablets. Photography is my passion along with Cryptocurrency. Taking pictures with my Samsung NX1 & Canon 70D during free times. Enjoy reading anything interesting happening with technology. Currently using a Galaxy S7 Edge, OnePlus 3, Nexus 5X, Galaxy Tab PRO 12.2.

Share
Published by
TLHD

Recent Posts

How to Send Komodo or Any Smart Chain Funds from Your Address Without Rescanning the Wallet?

Rescan can take long time to finish if you have thousands of transactions in… Read More

4 years ago

UK Granted Huawei A Limited Role In 5G Network

The British government has introduced that it will continue to give Huawei minimal role… Read More

5 years ago

Use Komodo’s DEXP2P Tech for Live Streaming [How-to]

Introduction Komodo's lead developer/founder James Lee "jl777" recently started working on an exciting new tech… Read More

5 years ago

AtomicDEX Mobile Decentralised Exchange is Out for Public Beta Testing

Komodo, the pioneer of decentralised cross-chain Atomic Swap has released their new version of mobile… Read More

5 years ago

How to Check Your VerusCoin Mining Balance, Hash Power & Estimated Average Time to Mine Block

This script and guide is for users who checks their VerusCoin mining node often and… Read More

6 years ago

Claim BTG and Convert to BCH in Quick & Easy to Follow Guide

This is a step-by-step guide to claim your Bitcoin Gold (BTG) and convert them into… Read More

7 years ago