Apache Installation & firewall‐cmd Configuration - aaralik1/SYS-255 GitHub Wiki

Apache Installation & firewall-cmd Configuration

To install Apache, I first installed the httpd packet by using the command yum install httpd. You have to be a root user in order to complete installations. The ports are going to be 80 & 443 which port 80 is going to be used for "http" and port 443 is going to be used for "hhtpd".

Here is the command you can use for port 80 to get access to Apache;

firewall-cmd --add-service=http --permanent

Make sure to use this command firewall-cmd --reload in order to reload and get the command above working.

Then, use this command to use port 443 to get access to Apache;

firewall-cmd --add-service=https --permanent

Again, make sure to use this command firewall-cmd --reload to refresh the system and get the command working.

After that, you may use the command firewall-cmd --list-all and it port 80 and 443 should show up under the ports section.