From Fedora Project Wiki
No edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
{{QA/Test_Case | {{QA/Test_Case | ||
|description=This test case | |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= | |setup= | ||
# | # Install the `httpd` package if it is not already installed: `sudo dnf install httpd` | ||
|actions= | |actions= | ||
# | # Start the `httpd` service: `sudo systemctl start httpd` | ||
< | # Enable the `httpd` service to start on boot: `sudo systemctl enable httpd` | ||
# Verify that the `httpd` service is running: `sudo systemctl status httpd` | |||
# Create a simple HTML file to serve: | |||
echo "<html><body><h1>Hello, Fedora!</h1></body></html>" | sudo tee /var/www/html/index.html | |||
# Open a web browser and navigate to `http://localhost/` to see the served content. | |||
# Check the Apache configuration file for errors: `sudo apachectl configtest` | |||
# Reload the `httpd` service to apply any configuration changes: `sudo systemctl reload httpd` | |||
|results= | |results= | ||
# | # The `httpd` package should install without errors. | ||
# The `httpd` service should start without errors and be enabled to start on boot. | |||
. | # The status command should indicate that `httpd` is active and running. | ||
# Navigating to `http://localhost/` should display "Hello, Fedora!" in the web browser. | |||
# The `apachectl configtest` command should return "Syntax OK". | |||
# The `httpd` service should reload without errors. | |||
|optional=For additional testing: | |||
# Configure a virtual host and verify it serves content correctly. | |||
# Enable and test SSL support by generating a self-signed certificate. | |||
# Test serving different types of files (e.g., images, scripts) and using different modules. | |||
= | |||
}} | }} | ||
[[Category:Package_httpd_test_cases]] | [[Category:Package_httpd_test_cases]] | ||
[[Category:Critical_path_test_cases]] |
Revision as of 08:17, 29 August 2024
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
- Install the
httpd
package if it is not already installed:sudo dnf install httpd
How to test
- Start the
httpd
service:sudo systemctl start httpd
- Enable the
httpd
service to start on boot:sudo systemctl enable httpd
- Verify that the
httpd
service is running:sudo systemctl status httpd
- Create a simple HTML file to serve:
echo "<html><body>
Hello, Fedora!
</body></html>"
Expected Results
- The
httpd
package should install without errors. - The
httpd
service should start without errors and be enabled to start on boot. - The status command should indicate that
httpd
is active and running. - Navigating to
http://localhost/
should display "Hello, Fedora!" in the web browser. - The
apachectl configtest
command should return "Syntax OK". - The
httpd
service should reload without errors.
Optional
For additional testing:
- Configure a virtual host and verify it serves content correctly.
- Enable and test SSL support by generating a self-signed certificate.
- Test serving different types of files (e.g., images, scripts) and using different modules.