October DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsSlow PC?RecommendedPC slow today? Run a repair scan before it gets worseResolve common Windows issues and optimize system performance.Scan NowOctober DealsAmazon USDeal season is back - check today's better picksAmazon US: current deals, useful picks and tech finds.See Picks×
Skip to content
VGSources
Blog

How to Install Apache (httpd) on a Fedora VPS

A complete Fedora VPS walkthrough: install the httpd package, start and enable Apache, open firewalld services, verify access locally and publicly, and prepare for HTTPS.
Length8 min Posted Quest giverVGSources Team
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. Install it with sudo dnf install httpd, start it and enable boot-time startup with sudo systemctl enable --now httpd, then permit the http and https services through firewalld. Open the VPS public IP in a browser to confirm that Fedora’s test page appears. HTTPS is a separate task: opening port 443 does not provide encryption until Apache has mod_ssl and a certificate.

What you are installing

Apache HTTP Server is Fedora’s standard Apache web-server package, but the package name differs from Debian- and Ubuntu-based systems. On Fedora, use httpd; apache2 is not the package name used by Fedora’s DNF repositories.

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.

The basic installation has four independent parts:

  1. Install the server package.
  2. Start Apache now and enable it for future boots.
  3. Allow web traffic in firewalld.
  4. Request the server’s page locally or through its public IP.

These stages matter separately. A package can be installed while its service is stopped; a running service can still be unreachable when the firewall blocks ports; and an open HTTPS port does not create a certificate or encrypted connection.

Prerequisites for a Fedora VPS

Use a shell account on the Fedora VPS that can run commands with sudo. You also need the server’s public IP address if you will test from another computer. The commands below change the operating system, so run them on the Fedora machine rather than on your local workstation.

Fedora enables firewalld by default in the setup described by Fedora’s guidance. If your server has an additional network control outside the operating system, that control is separate from the commands here; the procedure below only changes Fedora’s own firewall configuration.

Install Apache with DNF

Recommended single-package installation

Refresh the package transaction and install Apache with:

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

Read the transaction summary and confirm the installation when DNF asks. The command installs the Fedora Apache package and its required dependencies. It does not, by itself, guarantee that Apache is currently running or that it will start after a reboot.

Optional Web Server package group

Fedora documentation also describes a package-group approach:

sudo dnf group install "Web Server"

The group installs a set of related web-server packages rather than selecting only httpd. Choose the single package when you want the smallest, most explicit Apache installation. Choose the group only when you intentionally want the related packages that Fedora associates with the Web Server group. Do not run both merely as a matter of procedure; one method is enough for a basic Apache server.

Approach Command What it does
Apache package sudo dnf install httpd Installs Fedora’s Apache HTTP Server package and dependencies.
Web Server group sudo dnf group install "Web Server" Installs the related package set defined by Fedora’s Web Server group.

Start Apache and enable it at boot

Run one command that both starts Apache immediately and registers it for automatic startup:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
sudo systemctl enable --now httpd

--now starts the service during this command. enable makes the service start during subsequent boots. If you omit enable, Apache may work until the next reboot and then remain stopped; if you omit --now, it may be enabled for the future without serving requests in the current session.

Inspect the service state with:

sudo systemctl status httpd

A successful state should show that the httpd service is active. If it is not active, read the status output before moving to firewall troubleshooting: a firewall rule cannot make a stopped service answer requests. Re-run the enable-and-start command after correcting an installation or configuration problem, then check the status again.

Allow HTTP and HTTPS in Fedora’s firewall

Fedora’s firewalld uses named services. The http service represents HTTP on port 80, and https represents HTTPS on port 443. Add both permanently with:

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

Apply the permanent configuration to the active firewall:

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

The reload is important: adding a permanent rule does not by itself apply that change to the running firewall. Conversely, a reload discards runtime-only changes that were never saved with --permanent. Make any temporary firewall changes permanent before reloading if you need to retain them.

If the firewall command is rejected

Comments on one Fedora guide report that option ordering has varied between Fedora releases. If your installed version rejects the syntax, consult the command’s own usage text:

firewall-cmd --help

Use the equivalent syntax accepted by your release, keeping the same intent: permanently allow the named http and https services, then reload firewalld. Do not assume that a successful DNF installation has opened either port.

Verify the installation

Test from the VPS itself

On the server, open:

http://localhost

Fedora’s developer guidance describes a successful default setup as showing the Fedora Test Page. Seeing that page establishes that the local Apache service is answering an HTTP request. It does not yet prove that an outside network can reach the VPS.

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

Test from another computer

From a browser on another machine, visit the VPS’s public IP using the HTTP scheme:

http://YOUR_PUBLIC_IP

Replace YOUR_PUBLIC_IP with the actual address; do not include the angle brackets. If the local test works but the external test does not, check the sequence in this order:

  1. Confirm sudo systemctl status httpd still reports an active service.
  2. Confirm the permanent firewalld rule was added for http and that sudo firewall-cmd --reload completed.
  3. Recheck the address in the browser and make sure you are using http://, not https:// before HTTPS has been configured.

A browser warning or failure at https:// at this stage is expected if no certificate and TLS configuration have been installed. Port 443 being allowed is not equivalent to having a working HTTPS virtual host.

HTTP versus HTTPS: what remains after the basic install

The commands above provide an HTTP server. HTTPS requires two additional components: Apache’s SSL module, mod_ssl, and a certificate that identifies the domain being served. The firewall rule for https only permits traffic to port 443; it does not supply either component.

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

Certificate options

Option Result Important limitation
Self-signed or manually managed certificate Provides a certificate configured by the server administrator. Trust and certificate installation must be handled by the administrator and clients; the basic Fedora installation does not create it.
Certbot-issued certificate One Fedora setup guide uses Certbot and python3-certbot-apache, together with mod_ssl, from EPEL to obtain a free certificate. You must follow the current EPEL and Certbot instructions for your Fedora release and complete the certificate tool’s domain-validation prompts.

If you choose the Certbot route, the package names identified by that setup are certbot, python3-certbot-apache, and mod_ssl. Repository availability and the exact installation procedure can change with Fedora and EPEL releases, so verify the current package instructions for the version running on your VPS rather than copying an old repository command blindly.

After installing and configuring TLS, test the HTTPS URL separately:

https://YOUR_PUBLIC_IP

In normal production use, the certificate is issued for a domain name, not merely an address. Use the certificate tool’s current prompts and verify that Apache’s TLS configuration is active before directing users to HTTPS.

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.

What each command changes

Understanding the boundary of each command makes failures easier to diagnose:

  • dnf install httpd: places the Apache software and dependencies on the Fedora system.
  • systemctl enable --now httpd: starts Apache in the current boot and enables startup on later boots.
  • systemctl status httpd: reports the service’s current state so you can distinguish a stopped service from a network problem.
  • firewall-cmd --add-service=http --add-service=https --permanent: saves rules allowing Fedora’s named HTTP and HTTPS services.
  • firewall-cmd --reload: applies the saved firewalld configuration to the running firewall.
  • Browser verification: confirms whether a request reaches Apache locally or through the VPS address.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Common mistakes and recovery paths

Using the Debian package name

apache2 is the familiar package name on Debian and Ubuntu, but Fedora’s package is httpd. If DNF cannot find apache2, do not substitute another web server; use the Fedora package command shown above.

Installing without enabling startup

An installation can appear successful while Apache is not enabled for boot. Run sudo systemctl enable --now httpd and then inspect sudo systemctl status httpd. This explicitly handles both the immediate start and reboot behavior.

Opening only one protocol

Allowing http permits port 80; allowing https permits port 443. If you plan to configure TLS, save both services and reload firewalld. If HTTPS is not configured yet, test with HTTP first rather than interpreting an HTTPS failure as an Apache installation failure.

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.

Changing permanent rules but skipping reload

The --permanent option writes the saved firewall configuration. Until a reload, the running firewall may still use the old rules. Run sudo firewall-cmd --reload after the permanent change.

Testing only from localhost

A successful http://localhost response proves that Apache works on the VPS itself. It does not prove that the public path is open. Always perform the second test through the VPS public IP when the goal is an internet-facing site.

Assuming port 443 creates HTTPS

Port 443 is only a network destination. Apache still needs mod_ssl and a certificate. Install and configure those separately, then test an https:// URL.

Post-install checklist

  • httpd installed successfully with DNF.
  • sudo systemctl enable --now httpd completed.
  • sudo systemctl status httpd shows an active service.
  • Firewalld permanently allows the http and https services.
  • sudo firewall-cmd --reload completed after the permanent rule was added.
  • http://localhost displays Fedora’s test page on the VPS.
  • http://YOUR_PUBLIC_IP displays the page from another machine.
  • HTTPS is treated as a separate task requiring mod_ssl and a certificate.

After the test page

The Fedora Test Page is a verification target, not your finished website. Once the service and network path work, proceed with your site’s Apache configuration and content deployment using the Fedora release documentation that matches your server. Keep the default working state available while making changes: it gives you a known-good reference for deciding whether a later configuration change affected Apache, firewalld, or the content you are deploying.

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

For non-default document roots or other advanced layout changes, consult Fedora’s current SELinux guidance before serving files from a new location. The installation sequence above does not establish SELinux context instructions for custom document roots, so do not assume that copying files to an arbitrary directory is sufficient.

Frequently Asked Questions

Is the Fedora Apache package called apache2?

No. Fedora packages Apache HTTP Server as httpd. Install it with sudo dnf install httpd; apache2 is the package naming convention used by Debian- and Ubuntu-based systems.

Why does Apache stop working after a reboot?

Installing or starting the package is not the same as enabling boot-time startup. Run sudo systemctl enable --now httpd, then confirm the service with sudo systemctl status httpd.

Why can I open localhost but not the VPS public IP?

The local test confirms Apache is answering on the server. For external access, permanently allow firewalld’s http service and run sudo firewall-cmd --reload; then retry the public IP over HTTP.

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

Does allowing HTTPS in firewalld automatically enable SSL?

No. The firewall rule only permits traffic to port 443. Apache also needs mod_ssl and a certificate before an HTTPS URL can work.

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 quests from Patch Notes

  1. How to Set Up a RedM (RDR2) Server in 2026: License Key, txAdmin and server.cfg, Step by StepBlog11min
  2. Best RedM (RDR2) Server Hosting in 2026: Comparing Four Hosts on Slots, Memory and PriceBlog10min
  3. How to Host a Mindustry Server in 2026: server-release.jar, Port 6567 and the Commands That MatterBlog7min
Recommended PC Tool
Recommended PC Tool
Crashes, No Sound, or Screen Glitches?Free driver scan
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.