Install Apache on Fedora 30

|
Last Updated:
|
|

In this guide, we are going to learn how to install Apache on Fedora 30. Fedora 30 has just been released with a whole lot new features. If you would like to use Fedora 30 server to host your web sites using Apache Web server, follow through this guide to get Apache installed.

Install Apache on Fedora 30

Apache web server is provided by the httpd package on Fedora 30. It can be installed by executing the command below;

dnf install httpd
Fedora Modular 30 - x86_64 - Updates                                                                                    26 kB/s |  49 kB     00:01    
Fedora 30 - x86_64 - Updates                                                                                            28 kB/s |  42 kB     00:01    
Fedora 30 - x86_64 - Updates                                                                                           156 kB/s | 1.7 MB     00:11    
Dependencies resolved.
=======================================================================================================================================================
 Package                                    Architecture                   Version                               Repository                       Size
=======================================================================================================================================================
Installing:
 httpd                                      x86_64                         2.4.39-3.fc30                         updates                         1.3 M
Installing dependencies:
 fedora-logos-httpd                         noarch                         30.0.2-1.fc30                         updates                          15 k
 httpd-filesystem                           noarch                         2.4.39-3.fc30                         updates                          15 k
 httpd-tools                                x86_64                         2.4.39-3.fc30                         updates                          76 k
 apr                                        x86_64                         1.6.5-3.fc30                          fedora                          106 k
 apr-util                                   x86_64                         1.6.1-10.fc30                         fedora                           90 k
 mod_http2                                  x86_64                         1.14.1-1.fc30                         fedora                          144 k
Installing weak dependencies:
 apr-util-bdb                               x86_64                         1.6.1-10.fc30                         fedora                           12 k
 apr-util-openssl                           x86_64                         1.6.1-10.fc30                         fedora                           14 k

Transaction Summary
=======================================================================================================================================================
Install  9 Packages

Total download size: 1.8 M
Installed size: 6.2 M
Is this ok [y/N]: y
Downloading Packages:
(1/9): fedora-logos-httpd-30.0.2-1.fc30.noarch.rpm                                                                      38 kB/s |  15 kB     00:00    
(2/9): httpd-filesystem-2.4.39-3.fc30.noarch.rpm                                                                        36 kB/s |  15 kB     00:00    
(3/9): httpd-tools-2.4.39-3.fc30.x86_64.rpm                                                                             66 kB/s |  76 kB     00:01    
(4/9): apr-1.6.5-3.fc30.x86_64.rpm                                                                                      66 kB/s | 106 kB     00:01    
(5/9): apr-util-bdb-1.6.1-10.fc30.x86_64.rpm                                                                            46 kB/s |  12 kB     00:00    
(6/9): apr-util-openssl-1.6.1-10.fc30.x86_64.rpm                                                                        53 kB/s |  14 kB     00:00    
(7/9): apr-util-1.6.1-10.fc30.x86_64.rpm                                                                                71 kB/s |  90 kB     00:01    
(8/9): mod_http2-1.14.1-1.fc30.x86_64.rpm                                                                               94 kB/s | 144 kB     00:01    
(9/9): httpd-2.4.39-3.fc30.x86_64.rpm                                                                                   83 kB/s | 1.3 MB     00:16    
-------------------------------------------------------------------------------------------------------------------------------------------------------
Total                                                                                                                   93 kB/s | 1.8 MB     00:19     
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                                                                                               1/1 
  Installing       : apr-1.6.5-3.fc30.x86_64                                                                                                       1/9 
  Installing       : apr-util-bdb-1.6.1-10.fc30.x86_64                                                                                             2/9 
  Installing       : apr-util-openssl-1.6.1-10.fc30.x86_64                                                                                         3/9 
  Installing       : apr-util-1.6.1-10.fc30.x86_64                                                                                                 4/9 
  Installing       : httpd-tools-2.4.39-3.fc30.x86_64                                                                                              5/9 
  Running scriptlet: httpd-filesystem-2.4.39-3.fc30.noarch                                                                                         6/9 
  Installing       : httpd-filesystem-2.4.39-3.fc30.noarch                                                                                         6/9 
  Installing       : fedora-logos-httpd-30.0.2-1.fc30.noarch                                                                                       7/9 
  Installing       : mod_http2-1.14.1-1.fc30.x86_64                                                                                                8/9 
  Installing       : httpd-2.4.39-3.fc30.x86_64                                                                                                    9/9 
  Running scriptlet: httpd-2.4.39-3.fc30.x86_64                                                                                                    9/9 
  Verifying        : fedora-logos-httpd-30.0.2-1.fc30.noarch                                                                                       1/9 
  Verifying        : httpd-2.4.39-3.fc30.x86_64                                                                                                    2/9 
  Verifying        : httpd-filesystem-2.4.39-3.fc30.noarch                                                                                         3/9 
  Verifying        : httpd-tools-2.4.39-3.fc30.x86_64                                                                                              4/9 
  Verifying        : apr-1.6.5-3.fc30.x86_64                                                                                                       5/9 
  Verifying        : apr-util-1.6.1-10.fc30.x86_64                                                                                                 6/9 
  Verifying        : apr-util-bdb-1.6.1-10.fc30.x86_64                                                                                             7/9 
  Verifying        : apr-util-openssl-1.6.1-10.fc30.x86_64                                                                                         8/9 
  Verifying        : mod_http2-1.14.1-1.fc30.x86_64                                                                                                9/9 

Installed:
  httpd-2.4.39-3.fc30.x86_64                         apr-util-bdb-1.6.1-10.fc30.x86_64                apr-util-openssl-1.6.1-10.fc30.x86_64           
  fedora-logos-httpd-30.0.2-1.fc30.noarch            httpd-filesystem-2.4.39-3.fc30.noarch            httpd-tools-2.4.39-3.fc30.x86_64                
  apr-1.6.5-3.fc30.x86_64                            apr-util-1.6.1-10.fc30.x86_64                    mod_http2-1.14.1-1.fc30.x86_64                  

Complete!

The install of Apache on Fedora 30 is complete. Next, proceed to do some basics to verify that it is actually working.

Allow Apache HTTP service on Firewall

Firewalld is running by default on Fedora 30.

firewall-cmd --state
running

Therefore, if firewalld is running, you need to allow HTTP service through it to allow external access to the web server.

firewall-cmd --add-port=80/tcp --permanent

Reload Firewalld

firewall-cmd --reload

If you plan on configuring HTTPS, then you can open port 443 on firewalld as shown below;

firewall-cmd --add-port=80/tcp --permanent

To verify the Apache HTTP port is opened on Firewalld;

firewall-cmd --list-ports | grep 80
80/tcp

Running Apache web server

To start and enable Apache to run on system boot;

systemctl start httpd
systemctl enable httpd

Verify Apache Web server

Apache ships with a default test page which you can use to verify if Apache is ready to serve the web content. It is accessed via the URL, http://<hostname or web-server-host-IP>. Hence, if everything is fine, when you access the URL above via the browser, you should land on Fedora Apache test page.

apache test page

Well that is how easy it is to install Apache on Fedora 30. You are good to go. You might

As one of the steps of hardening Apache Web server, consider removing the test page. See how to remove Apache Test Page by following the link below;

Remove Apache Test Page on Fedora 30/29

SUPPORT US VIA A VIRTUAL CUP OF COFFEE

We're passionate about sharing our knowledge and experiences with you through our blog. If you appreciate our efforts, consider buying us a virtual coffee. Your support keeps us motivated and enables us to continually improve, ensuring that we can provide you with the best content possible. Thank you for being a coffee-fueled champion of our work!

Photo of author
koromicha
I am the Co-founder of Kifarunix.com, Linux and the whole FOSS enthusiast, Linux System Admin and a Blue Teamer who loves to share technological tips and hacks with others as a way of sharing knowledge as: "In vain have you acquired knowledge if you have not imparted it to others".

2 thoughts on “Install Apache on Fedora 30”

  1. hi,
    how can i configure apache to run redmine?
    I did install redmine on a Fedora Server Edition and i was not able to run redmine with apache.
    I got an error ‘passenger error#2’
    can someone please help me to deal with this error ?
    Thank you.

    Reply

Leave a Comment