How to Install and Configure Apache on AlmaLinux 10

To install and configure Apache on AlmaLinux 10, follow the steps below:

Step 1 : Update all system packages to the latest version:

Step 2 : Install the Apache web server:

Step 3 : If firewalld is running, allow HTTP and HTTPS traffic:

Step 4 : Apply the firewall rule changes:

Step 5 : Start Apache and enable it to run automatically at system boot:

Step 6 : Verify that Apache is running properly:

Step 7 : Create a document root directory for the domain example.com:

Set proper ownership and permissions:

Create an index.html file:

Example content:

Step 8 : Create a virtual host configuration file:

Add the following configuration:

Step 9 : Check the Apache configuration for errors:

Expected output:

Step 10 : Restart Apache to apply the changes:

Step 11 : Open a web browser and visit:

Congratulations! You have successfully installed and configured Apache on AlmaLinux 10.