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.
Antihost offers Linux VPS plans with full root access, unlimited traffic on a 1 Gbps port and a 14-day free trial.
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.
- A Fedora VPS that you can reach over SSH.
- A user with
sudoprivileges. - The server’s public IPv4 or IPv6 address for remote testing.
- Outbound package access so
dnfcan 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.
#1 Best Overall
| 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
- Refresh package metadata and install Apache by running:
sudo dnf install httpd - Review the transaction summary. Enter
ywhendnfasks for confirmation. - 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.
Recommended Free Tools
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.
Rank #2
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:
The Tool Desk
Outbyte Driver Updater FREEFix the driver behind crashes, sound loss and screen glitchesFind Drivers →Outbyte PC Repair FREERepair Windows errors before they cause bigger problemsFix Now →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.
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.
Rank #4
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
httpsservice, 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.
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.
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.
Best Value
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.
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.
Installation checklist
sudo dnf install httpdcompleted successfully.sudo systemctl enable --now httpdwas run.sudo systemctl status httpdreports an active service.- Firewalld permanently allows
httpandhttps. sudo firewall-cmd --reloadwas run after permanent changes.http://localhostdisplays 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.
Quick Recap
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.




