How to set up Apache Virtual Host on Fedora 39

To install and configure Apache Virtual Host on Fedora 39, follow the steps below.

Step 1 : Begin by updating your system to ensure you have the latest packages and dependencies.

Step 2 : If Apache is not installed, install it using the following command:

Step 3 :Create a directory to host your website files. Replace "/var/www/example.com" with your preferred path.

Step 4 : Create index.html

Create a simple HTML file to test your virtual host. Use a text editor to create the file.

Add content to index.html, save, and exit.

Step 5 : Set proper permissions for the web directory.

Step 6 : Create Virtual Host Configuration

Create a new Apache configuration file for your virtual host.

Add the following configuration, adjusting paths and settings accordingly.

Save and exit.

Step 7 : Test Configuration and Restart Apache

Test the Apache configuration for syntax errors.

If the test is successful, restart Apache.

Step 8 : Test the Web Domain

Open a web browser and navigate to your domain (e.g., http://example.com) to verify the virtual host setup.

Congratulations! You have successfully set up and configured Apache Virtual Host on Fedora 39. Your website is now accessible through the configured domain.