Alright, next task was about SELinux.
We need to ensure that Apache is installed on server 2, configure it to offer access
on port 82, and then copy the file etchost to tmphost and from there move it to var www.htmlhost
and ensure that it can be accessed by the Apache web server.
Let me show you.
So first, dnf install –y httpd.
There we go.
Then we need to listen on port 82, so vim etc.http.conf and httpd.conf, where we can
see it already on the listen line, listen needs to be set to 82.
That is done.
And now, of course, there is something SELinux involved, so man se-manage-port.
I like these man pages because they have nice examples and here we can see almost the exact
solution that we need, se-manage-port –a –t http-port-t –p tcp82 is going to do
it for us.
And now systemctl enable –now httpd should start it.
Is that so?
Systemctl status on httpd is showing that it has started and listening on port 82.
All right.
Then we copy etc.hosts to tmp and we move it from tmp.hosts to var.ww.html.
And then ls –z on var.ww.html is showing what?
Well, it's showing a host file with user tmpt and that's not accessible by Apache, but fortunately
if you use a resource called –rv on var.ww.html, that will be all fixed, as you can see.
And that's all.