Managing HTTP Services
Nov 18, 2025
Note: This is not a topic on the RHCSA exam, but will be useful for SELinux exercises
Common Web Services
- Apache (httpd)
- Offers many features implemented by using modules
- Nginx
- Lighter, faster, simpler
Apache Configuration
- /etc/httpd/conf/httpd.conf and /etc/httpd/conf/conf.d
- Default document root is /var/www/htdocs
Lab Exercise
- Configure Apache to serve a basic website that shows the text “hello world”
- Ensure that the Apache server can be used as a repository server by providing the repository directories in the document root.
- Verify connection with
curl - Reconfigure your repository client to use the Apache web server provided repositories
Solution
- On server:
dnf install httpd
echo 'hello world' > /var/www/html/index.html
firewall-cmd --add-service http --permanent
firewall-cmd --reload
- On workstation:
# optional: set up hostname resolution for server in /etc/hosts
curl server
- On workstation:
dnf config-manager --add-repo 'http://server/BaseOS'
dnf config-manager --add-repo 'http://server/AppStream'
echo 'gpgcheck=0' >> /etc/yum.repos.d/server_BaseOS.repo
echo 'gpgcheck=0' >> /etc/yum.repos.d/server_AppStream.repo
- Clint Jordan