If you’re looking to host websites or applications on your VPS, Apache is one of the most popular and reliable web server software options available today. 

In this guide, we’ll walk you through the steps to install and configure Apache on a VPS running AlmaLinux OS — using simple terminal commands that anyone can follow.

Whether you’re new to Linux server administration or simply want a quick reference, this tutorial will help you get Apache up and running in just a few minutes.

Why Install Apache?

Apache HTTP Server is a powerful, open-source web server used to serve web content and handle incoming HTTP requests. It’s flexible, secure, and backed by a large developer community. If you’re running a VPS from RackNerd and want to host static sites, CMS platforms like WordPress, or custom applications — Apache is a great first step.

Best of all, when using AlmaLinux, everything you need to install Apache is already available via the default AppStream repository — no extra repos configuration needed.

Prerequisites

Before starting, make sure you:

  • Have a RackNerd VPS with AlmaLinux OS installed
  • Have SSH login credentials (root access recommended)
  • Have a working internet connection
  • Use an SSH client like Bitvise or PuTTY

If you haven’t ordered your VPS yet, we recommend watching our How to Order a VPS video first.

Step-by-Step: Installing Apache on AlmaLinux

Let’s go ahead and install Apache. Follow the steps below inside your SSH terminal.

Step 1: Log in to Your VPS via SSH

Use your SSH client to log into your server as the root user.

ssh root@your-server-ip

Step 2: Update the System

Start by updating your system packages to ensure everything is up to date.

dnf update -y

This may take a few minutes depending on your server and connection speed.

Step 3: Install Apache

Once the system update is complete, install the Apache HTTP server using the following command:

dnf install -y httpd

This will automatically install Apache and all required dependencies.

Step 4: Start and Enable Apache

Start the Apache service immediately and enable it to launch automatically at system boot:

systemctl start httpd
systemctl enable httpd

Step 5: Check Apache Status

To confirm Apache is running correctly, run:

service httpd status

You should see output showing that Apache is “active” and running.

Step 6: Allow HTTP and HTTPS Through the Firewall

If you’re using Firewalld, you’ll need to allow Apache traffic by running the following:

firewall-cmd –permanent –zone=public –add-service=http
firewall-cmd –permanent –zone=public –add-service=https
firewall-cmd –reload

This ensures your server can handle incoming traffic on ports 80 (HTTP) and 443 (HTTPS).

Step 7: Verify Installation in Your Browser

To check if everything works, open a browser and go to your server’s IP address:

http://your-server-ip

If Apache was installed and configured correctly, you’ll see the default Apache test page, similar to the below.

Where to Upload Website Files

The default directory for your public web files in Apache is:

/var/www/html

You can use FTP, SCP, or SFTP to upload your website content here. Files placed in this directory will be accessible via your domain or IP address.

What’s Next?

Now that you’ve successfully installed Apache, you may want to explore other essential tools to enhance your web server:

  • PHP – To support dynamic content or CMS platforms like WordPress
  • MySQL/MariaDB – To store data and run database-driven applications
  • SSL Certificates – To enable HTTPS and secure your site

We’ll cover these topics in future tutorials on RackNerdTV, so be sure to subscribe!

Reliable VPS Hosting for Apache Servers

At RackNerd, we offer a wide range of affordable and high-performance VPS hosting solutions perfect for running web servers, applications, and more. All of our VPS plans come with:

  • Full root access
  • Intel Xeon-powered infrastructure
  • SSD RAID-10 storage
  • 1Gbps network speeds
  • 24/7 support with fast response times

If you’re looking for a fast, secure, and scalable hosting environment, visit RackNerd.com to browse our VPS and Dedicated Server plans.

Conclusion

Installing Apache on AlmaLinux is a quick and easy process. Whether you’re hosting a personal project, business site, or application, Apache offers the reliability and flexibility you need.

If you have any questions or get stuck during the setup, don’t hesitate to reach out to our 24/7 support team — we’re always here to help.

Ready to launch your website or project? Order a VPS today and take the next step with RackNerd.

How to Install Apache on Your VPS with AlmaLinux OS Video Tutorial:

Server Hosting Solutions by RackNerd:

Shared Hosting
cPanel Web Hosting in US, Europe, and Asia datacenters
Logo
Reseller Hosting
Create your new income stream today with a reseller account
Logo
VPS (Virtual Private Server)
Fast and Affordable VPS services - Instantly Deployed
Logo
Dedicated Servers
Bare-metal servers, ideal for the performance-demanding use case.
Logo

Leave a comment

Your email address will not be published. Required fields are marked *