So let's have a look at the solution for this lab on Red Hat. And I actually
want to reconfigure it. So sudo vim on etc HTTP conf Let's get back. So let me
edit the configuration file and in the configuration file I'm looking for the listen parameter.
Now next and next and there I can see listen 80.
I'm changing that to listen 82.
Then we need to do something with ports, right? What I would recommend is sudo semanage port.
What I would recommend is you use man semanage port.
That's giving information.
Many man pages have useful examples near the end of the man page.
This is what I need.
Let me copy this and change it a little bit.
Sudo followed by the Command followed by TCP. Well, we make that TCP
82, right? And that allows the web server to bind to port 82.
Then there is one thing remaining and that is the firewall.
Well, let's use sudo firewall cmd help grab port
because I never remember the syntax about it.
Here we can see add port is portid protocol.
So sudo firewall cmd add port is 82 TCP and
that should make the web server available on port 82.
Did I ever restart the web server? I did not.
So. So sudo systemctl restart httpd and we're done.
Final check is sudo systemctl status on httpd and we can see that it is
listening on port 82. And that's what we wanted. That's the end of the lab.