How to set up Apache Virtual Host on CentOS Stream 9

To set up an Apache Virtual Host on CentOS Stream 9, follow these steps.

Step 1 : Update

Step 2 : Install Apache (if not installed)

Step 3 : Create Web Directory

Step 3 : Create index.html

Step 4 : Set Permissions

Step 5 : Create Virtual Host Configuration

Add the following VirtualHost configuration (replace example.com with your domain):

Save the file and exit the text editor.

Step 6 : Test Configuration and Restart Apache

Step 7 : Open a web browser and navigate to your domain (e.g., http://example.com) to test your Apache Virtual Host.

Congratulations! You have successfully set up an Apache Virtual Host on CentOS Stream 9.