From Fedora Project Wiki

Revision as of 08:17, 29 August 2024 by Sumantrom (talk | contribs)

Description

This test case ensures that the httpd (Apache HTTP Server) is installed correctly, starts properly, serves content, and can be managed through systemd.

Setup

  1. Install the httpd package if it is not already installed: sudo dnf install httpd

How to test

  1. Start the httpd service: sudo systemctl start httpd
  2. Enable the httpd service to start on boot: sudo systemctl enable httpd
  3. Verify that the httpd service is running: sudo systemctl status httpd
  4. Create a simple HTML file to serve:

echo "<html><body>

Hello, Fedora!

</body></html>"

Expected Results

  1. The httpd package should install without errors.
  2. The httpd service should start without errors and be enabled to start on boot.
  3. The status command should indicate that httpd is active and running.
  4. Navigating to http://localhost/ should display "Hello, Fedora!" in the web browser.
  5. The apachectl configtest command should return "Syntax OK".
  6. The httpd service should reload without errors.

Optional

For additional testing:

  1. Configure a virtual host and verify it serves content correctly.
  2. Enable and test SSL support by generating a self-signed certificate.
  3. Test serving different types of files (e.g., images, scripts) and using different modules.