Skip to main content

Change Apache port and give it a proper SELinux label

Hands-On Lab


Photo of

Training Architect





The goal of this lab is to change the Apache port and give it a proper SELinux label. Keep in mind that, when you change the port of the web server you cannot just leave it like that. You need to follow your change through with SELinux and firewall. Firstly, you need to go to the Apache configuration file and then change the port on which Apache is listening. In this case, from port 80 to some other port. Upon changing the port, you have to configure SELinux for the new port, as well as close the previous port with firewalld (port 80), and open the new port for which we have configured Apache. When everything is done, you can test it out to si if it actually works or not.

What are Hands-On Labs?

Hands-On Labs are scenario-based learning environments where learners can practice without consequences. Don't compromise a system or waste money on expensive downloads. Practice real-world skills without the real-world risk, no assembly required.