Why is apache installed on the LEMP one click setup?

Posted November 11, 2018 2.3k views
LEMPUbuntu 18.04

I’ve noticed on a couple of setups now that Apache is installed on the LEMP one click. This means that if i do an apt upgrade on the server it reactivated apache and kills NGINX. I’ve then got to go in and disable Apache again. This is not a good setup for beginners as they will not understand what broke after updating.

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Submit an Answer
3 answers

Man am I grateful for your post!

This just happened to me and I thought I was crazy.

I want my LEMP server for joomla so I needed extra php modules.

My NGINX broke after installing the php modules and rebooting. Eventually I traced it back to a port 80 conflict with.... apache2!!!

I was incredulous. I had no idea why apache2 was on my server or how it had got there.

I thought I must have (???) installed it or activated it myself but had no idea how…

All I had done was run the following command and reboot and NGINX stopped working:

sudo apt install php7.2-mbstring php7.2-xmlrpc php7.2-soap php7.2-xml php7.2-intl php7.2-zip php7.2-gd

So I created a new LEMP droplet to install them and reboot one by one.

php7.2-gd was the problem!

But at that point I realized that it wasn’t me. Apache2 was already on the server to begin with!

And somehow installing php7.2-gd makes apache2 take over on port 80.

So, as you said, this problem has just made a beginner go crazy for hours. I wish someone could explain why apache2 is even on the server. I’m scared of uninstalling it.

Could removing apache2 cause some kind of security issue? I’ve already been hacked 3 times over the years.

Hey friends!

It would seem that Apache is installed on the LEMP one-click image. I’m not aware of the reasoning for this, but I’ve reached out to the master of our images to find out :)


  • Hi Jarland,

    Any word on this yet?
    I’m in the same situation and am wondering if simply removing Apache will break anything important.

    • No updates yet, but you’re free to remove it. This won’t break anything. Though, it’s never a bad idea to take a snapshot before any significant change. While there’s no reason for this to be a significant change, computers will be computers ;)

      • Hi!, as a begineer i would really much appreciate if you can point me on how to do that (remove Apache on the LEMP 1-Click image).
        Its my first approach with Digital Ocean and im stuck with this.

        Thank you!

Any more information on this? Why is it there? Why is it running? What is it doing? Does it introduce any security issues? Thanks.