Install Apache httpd to configure a Web Server.
# Install httpd
[root@www ~]# dnf -y install httpd
# Rename or remove the welcome page
[root@www ~]# mv /etc/httpd/conf.d/welcome.conf /etc/httpd/conf.d/welcome.conf.org
Replace the Server name with your own environment.
# Edit httpd configuration file
[root@www ~]# vi /etc/httpd/conf/httpd.conf
# Line 91: Change to admin's email address
ServerAdmin root@emc.world
# Line 100: Change to your server's name
ServerName www.emc.world:80
# Line 149: Change (remove [Indexes])
Options FollowSymLinks
# Line 156: Change
AllowOverride All
# Line 169: Add file name that can be accessed only with directory's name
DirectoryIndex index.html index.php index.cgi
# Add the following to the end for server's response header
ServerTokens Prod
Enable and start the httpd service:
[root@www ~]# systemctl enable --now httpd
If Firewalld is running, allow HTTP service. HTTP uses 80/TCP.
[root@www ~]# firewall-cmd --add-service=http
success
[root@www ~]# firewall-cmd --runtime-to-permanent
success
Create a HTML test page and access it from any client computer with a web browser. It's OK if the following page is shown.
# Create a test HTML page
[root@www ~]# vi /var/www/html/index.html
<html>
<body>
<div style="width: 100%; font-size: 40px; font-weight: bold; text-align: center;">
Test Page
</div>
</body>
</html>
