I’ve Ubuntu Droplet and want to use as Mysql server. SO I’ want to remove Apache2. With earlier provider Linode, there was some settings that if Apache or Mysql ever stopped it’d automatically restart the VPS.

Is there something like this here?

Can I go ahead and remove the Apache2( on Ubuntu 14)?

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.

×
2 answers

Hi,

Removing Apache2.
I do not recommend removing packages related to Apache2. There may be some dependencies between packages which may not be correctly followed by package manager during removal process. It may end in system malfunction. Preventing Apache2 service from automatic start seems to be better solution. So first, stop apache2 service

sudo service apache2 stop

and then, disable its automatic start when system starts

sudo update-rc.d apache2 disable

Restarting a droplet when particular service is stopped.
I do not know if DO droplets have this feature. Anyway, you could configure it using bash script and cron, if such solution would satisfy you.

BTW, you asked a question related to unsupported version of Ubuntu. Ubuntu 14 reached its end of life in April 2019. So, my advice is to migrate to the most current version ASAP.

1st you need to disable default configuration, RUN>>

a2dissite 000-default.conf

and then restart apache2 >>>

service apache2 restart

Hope this will help to solve the issue :)

Submit an Answer