Red Hat Certified System Administration 8



Exercise 21-1 Setting Up a Basic Web Server
  1. Type yum module install httpd. This installs the httpd package and some of the most commonly used additional packages as well.

  2. Open the main Apache configuration file with an editor, and look up the line that starts with DocumentRoot. This identifies the location where the Apache server will look for the contents it will service. Confirm that it is set to /var/www/html.

  3. In the directory /var/www/html, create a file with the name index.html. In this file, type “Welcome to my web server”.

  4. To start and enable the web server, type systemctl enable --now httpd. This starts the web server and makes sure that it starts automatically after restarting the server. Use systemctl status httpd to check that the web server is up and running. In Example 21-2 you can see what the result of this command should look like.

  5. Type yum install curl to install the elinks text-based browser. Type curl http://localhost to connect to the web server and verify it is working.



+ Correction

Eninam BAGNABANA     |         |     bagnadavid@outlook.fr     |