apache2

set up firewall

firewall-cmd --permanent --zone=public --add-service=http firewall-cmd --permanent --zone=public --add-service=https firewall-cmd --reload

sudo iptables -A INPUT -p tcp --dport 80 -m conntrack --ctstate NEW,ESTABLISHED -j ACCEPT

$ sudo netstat -plunt | grep :80 tcp6 0 0 :::80 :::* LISTEN 1557/apache2

systemctl status apache2

$ sudo iptables -L Chain INPUT (policy ACCEPT) target prot opt source destination ACCEPT tcp -- anywhere anywhere tcp dpt:http ctstate NEW,ESTABLISHED Chain FORWARD (policy ACCEPT) target prot opt source destination Chain OUTPUT (policy ACCEPT) target prot opt source destination

if sudo service.apache2 restart not run

    1. sudo apt-get remove nginx nginx-common # Removes all but config files.

  1. sudo apt-get purge nginx nginx-common # Removes everything.

  2. sudo apt-get autoremove #After using any of the above commands, use this in order to remove dependencies used by nginx which are no longer required.