1 00:00:06,780 --> 00:00:13,250 So let's have a look at the solution for this lab on Red Hat. And I actually 2 00:00:13,250 --> 00:00:19,719 want to reconfigure it. So sudo vim on etc HTTP conf Let's get back. So let me 3 00:00:19,719 --> 00:00:26,189 edit the configuration file and in the configuration file I'm looking for the listen parameter. 4 00:00:26,210 --> 00:00:29,269 Now next and next and there I can see listen 80. 5 00:00:30,050 --> 00:00:31,230 I'm changing that to listen 82. 6 00:00:33,929 --> 00:00:39,649 Then we need to do something with ports, right? What I would recommend is sudo semanage port. 7 00:00:41,689 --> 00:00:45,689 What I would recommend is you use man semanage port. 8 00:00:47,100 --> 00:00:48,270 That's giving information. 9 00:00:48,890 --> 00:00:52,189 Many man pages have useful examples near the end of the man page. 10 00:00:53,259 --> 00:00:54,170 This is what I need. 11 00:00:54,909 --> 00:00:57,570 Let me copy this and change it a little bit. 12 00:01:00,979 --> 00:01:06,236 Sudo followed by the Command followed by TCP. Well, we make that TCP 13 00:01:06,236 --> 00:01:11,493 82, right? And that allows the web server to bind to port 82. 14 00:01:11,493 --> 00:01:16,750 Then there is one thing remaining and that is the firewall. 15 00:01:17,230 --> 00:01:22,444 Well, let's use sudo firewall cmd help grab port 16 00:01:22,444 --> 00:01:27,659 because I never remember the syntax about it. 17 00:01:28,819 --> 00:01:32,879 Here we can see add port is portid protocol. 18 00:01:35,760 --> 00:01:41,284 So sudo firewall cmd add port is 82 TCP and 19 00:01:41,284 --> 00:01:46,810 that should make the web server available on port 82. 20 00:01:48,010 --> 00:01:52,340 Did I ever restart the web server? I did not. 21 00:01:52,340 --> 00:01:56,670 So. So sudo systemctl restart httpd and we're done. 22 00:01:57,109 --> 00:02:03,215 Final check is sudo systemctl status on httpd and we can see that it is 23 00:02:03,215 --> 00:02:09,319 listening on port 82. And that's what we wanted. That's the end of the lab.