Driver FixRecommendedSound, Wi-Fi or graphics acting up? Check drivers firstFind missing or outdated drivers fast.Check DriversOctober DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsWindows FixRecommendedWindows errors stealing your time? Find the fix fastScan stability, cleanup and performance issues.Fix Now×
Skip to content
World desk8 min

How to Install Apache (httpd) on a Fedora VPS

A complete Fedora VPS walkthrough: install the httpd package, enable Apache at boot, configure firewalld for HTTP and HTTPS, verify local and public access, and understand the separate requirements for TLS.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

On Fedora, Apache HTTP Server is packaged as httpd, not apache2. Install it with sudo dnf install httpd, start it and configure automatic startup with sudo systemctl enable --now httpd, allow the HTTP and HTTPS services through firewalld, and then test the server with its public IP address. HTTPS is a separate step that requires both mod_ssl and a certificate.

What you need before installing

This procedure assumes you already have a running Fedora VPS and an account that can use sudo. It covers the operating-system installation and firewall configuration. SSH key creation, account provisioning, provider-specific security groups, and cloud firewall interfaces differ between VPS companies and are outside the Fedora commands shown here.

As an Amazon Associate I earn from qualifying purchases.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  • A Fedora VPS that you can reach over SSH.
  • A user with sudo privileges.
  • The server’s public IPv4 or IPv6 address for remote testing.
  • Outbound package access so dnf can reach Fedora repositories.

Use a shell session on the VPS for every command below. Commands beginning with sudo may prompt for your password.

Choose Fedora’s Apache package

Fedora names the Apache HTTP Server package httpd. The Debian and Ubuntu package name apache2 is not the command to use on Fedora. Installing apache2 on a Fedora VPS will not install the Fedora Apache service.

Approach Command When to use it What it installs
Single package sudo dnf install httpd When you want the Apache server package and a small, explicit installation. The Apache HTTP Server package and its required dependencies.
Package group sudo dnf group install "Web Server" When you want Fedora’s web-server group rather than only the core package. A set of related web-server packages; the exact group contents can vary by Fedora release.

For a straightforward Apache VPS, the single-package command is easier to audit. The group command is an alternative, not an additional step you need to run after installing httpd.

Install Apache with dnf

  1. Refresh package metadata and install Apache by running:
    sudo dnf install httpd
  2. Review the transaction summary. Enter y when dnf asks for confirmation.
  3. Wait for the transaction to complete. A successful installation returns you to the shell prompt without an error.

Installing a package does not necessarily mean that its service is running or that it will start after a reboot. Perform the systemd step next.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Start Apache and enable it at boot

Use one systemd command to start the service now and enable it for future boots:

sudo systemctl enable --now httpd

The --now option starts httpd immediately; enable creates the boot-time enablement. If you run only sudo systemctl start httpd, the current session works but a later reboot can leave Apache stopped. If you run only sudo systemctl enable httpd, it will start at boot but is not necessarily started in the current session.

Check the service state

sudo systemctl status httpd

Look for an active, running state. The status view also shows recent service messages if startup failed. Press q to leave the status display.

When the service is active, Apache should be listening locally. If status reports a failure, keep that output available while troubleshooting rather than repeatedly restarting the service; it usually identifies a configuration or port problem.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Allow web traffic through Fedora’s firewalld

Fedora commonly uses firewalld as its host firewall. A running Apache process can still be unreachable from the internet when the firewall blocks its ports. Fedora’s predefined http service represents TCP port 80, and https represents TCP port 443.

Add both services permanently, then reload firewalld:

sudo firewall-cmd --add-service=http --add-service=https --permanent
sudo firewall-cmd --reload

The first command writes the rules to the permanent configuration. The reload applies that configuration to the running firewall. Reloading also discards runtime-only changes that were made without --permanent, so make any temporary rule permanent before reloading if you need to keep it.

Confirm the firewall configuration

sudo firewall-cmd --list-services

The output should include http and https in the active zone. If the add-service command fails because of option parsing, consult the help for the firewalld version installed on that Fedora release:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
sudo firewall-cmd --help

Command-flag ordering has differed in reports from users on different Fedora releases. Do not assume a command copied from another release will accept exactly the same ordering; use the syntax displayed by the local help output.

Verify Apache from the VPS and from another machine

Test locally

From the VPS itself, open a text-mode HTTP request or a browser to:

http://localhost

A working default installation should display Fedora’s Test Page. That page confirms that the HTTP service is responding locally, but it does not prove that an external network can reach the VPS.

Test the public address

From your workstation or another network, browse to:

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
http://YOUR_VPS_PUBLIC_IP

Replace YOUR_VPS_PUBLIC_IP with the address assigned to the VPS. You should see the same Fedora Test Page. Testing from a different machine matters because it exercises the VPS’s public interface and the host firewall rather than only the local loopback connection.

Interpret the common outcomes

Result Likely scope of the problem First check
Local page works; public page times out Firewall or an additional network-layer rule Run sudo firewall-cmd --list-services and verify that http is present. If the host firewall is correct, inspect any provider-side security group or cloud firewall separately.
Local request fails and systemd is inactive Apache is not running Run sudo systemctl status httpd and read the reported error.
Local request fails while systemd is active Listener, configuration, or request-path issue Recheck the service status output and whether the request uses http://localhost, not an HTTPS URL.
HTTP works but HTTPS does not No TLS configuration, missing certificate, or blocked port 443 Complete the HTTPS section below; opening port 443 alone does not create an HTTPS site.

What the initial installation does—and does not—provide

The package and service commands create a usable default Apache server. The Fedora Test Page is the expected first response, so seeing it is evidence that the base service is installed and serving its default content.

This first pass does not configure a domain, virtual hosts, application runtime, database, reverse proxy, authentication, or production content. Add those components only after the base service is reachable; otherwise, it is harder to distinguish an Apache installation issue from an application or DNS issue.

Keep the default document setup while validating the service. If you later move content to a non-default document root, treat file ownership and SELinux labeling as separate configuration work. This procedure does not prescribe SELinux context commands for custom paths, and a custom path should not be assumed to work merely because the default page does.

Enable HTTPS as a separate operation

HTTPS is optional for the initial connectivity test, but a public site should not treat an open port 443 as sufficient. Apache needs the SSL module and a certificate whose name matches the hostname visitors use.

Required pieces

  • mod_ssl: Apache’s TLS module.
  • A certificate and private key: The certificate must be configured for the hostname you intend to serve.
  • Port 443 access: Firewalld must allow the https service, and any external network firewall must allow TCP 443.

The firewall command earlier opens the operating-system rule for HTTPS, but it does not install mod_ssl, obtain a certificate, or create a valid TLS virtual host.

Certificate options

Option Use case Browser result Operational consideration
Self-signed or manually managed certificate Internal testing, development, or an environment where you control trust distribution. Public browsers normally show a trust warning unless the issuing authority is trusted locally. You must create, install, renew, and configure the certificate yourself.
Certificate issued by a public certificate authority Public websites where visitors should receive normal browser trust. Trusted when the hostname, chain, and validity period are correct. Plan renewal and keep the private key protected.

One Fedora-oriented automated route

One documented approach installs Certbot, the Apache integration package python3-certbot-apache, and mod_ssl from the Extra Packages for Enterprise Linux (EPEL) repository, then uses Certbot to obtain a free certificate. Repository availability and package details depend on the Fedora release and enabled repositories, so confirm the commands for your release before changing a live server.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Before requesting a public certificate, ensure that the domain resolves to this VPS and that HTTP traffic reaches Apache. Certificate authorities generally need to validate control of the hostname; an address-only test with the public IP is not a substitute for domain validation.

Harden the server before exposing a newly configured HTTPS endpoint publicly. At minimum, remove test content when you are ready to publish real content, protect private keys, and establish a renewal process. Do not advertise HTTPS merely because the firewall lists https; verify an actual TLS connection after the certificate and Apache configuration are in place.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Troubleshoot the installation in a fixed order

1. The package command says it cannot find Apache

Check that you used httpd, not apache2. If dnf cannot reach repositories, resolve the VPS’s package-network or repository configuration before attempting service commands. The service cannot start until the package transaction completes.

2. The service will not start

sudo systemctl status httpd

Read the error shown by systemd. Do not treat a successful package installation as proof that the daemon started. If another process already occupies the HTTP listener, Apache can fail even though installation succeeded; the status output is the appropriate first diagnostic.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

3. The page works on localhost but not remotely

Confirm the permanent firewalld services and apply them with sudo firewall-cmd --reload. If the local rule is correct, investigate a provider-side security group or cloud firewall, which is separate from Fedora’s firewalld and is not configured by the commands in this guide.

4. A reboot makes the site disappear

Check that you used sudo systemctl enable --now httpd, not only start. The enable portion is what schedules Apache to start during subsequent boots.

5. Firewalld rejects the command syntax

Run sudo firewall-cmd --help and follow the option order shown by the installed version. Fedora releases can differ in how the command parser accepts flag ordering. After correcting the command, verify the active services rather than assuming the rule was applied.

6. HTTPS shows a warning or refuses the connection

Check each layer independently: mod_ssl must be installed, Apache must have a certificate and key configured for the requested hostname, and TCP 443 must be permitted. A certificate for a different name, an expired certificate, or a missing intermediate chain can all produce browser errors even when Apache is running.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Installation checklist

  • sudo dnf install httpd completed successfully.
  • sudo systemctl enable --now httpd was run.
  • sudo systemctl status httpd reports an active service.
  • Firewalld permanently allows http and https.
  • sudo firewall-cmd --reload was run after permanent changes.
  • http://localhost displays Fedora’s Test Page.
  • The VPS public IP displays the page from another machine.
  • If HTTPS is required, mod_ssl, a hostname-matching certificate, and renewal handling are configured separately.

Package install versus group install: which should you choose?

Use sudo dnf install httpd when you want the smallest clearly defined starting point and intend to add only the modules your site needs. Use sudo dnf group install "Web Server" when you intentionally want Fedora’s broader web-server package set. The group is convenient, but because its related packages can change with Fedora’s group metadata, the single package is usually easier to reproduce on a minimal VPS.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Leave a Reply

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

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
Outdated Drivers Are Slowing You DownFree scan - exact matches
PC Slower Than It Used to Be?Free scan - under a minute

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.