How to Install Lighttpd Web Server on Rocky Linux 8

Let’s learn the easy and quick steps to install Lighttpd web server on Rocky Linux 8 using command terminal.

Apache, long established, is one of the most popular web servers in the world. But now there are several web servers that can compete with Apache. Lighttpd is one of them.

lighttpd (pronounced “lighty”) is a web server that requires much less resources than Apache, for example, and is therefore particularly well suited to very large loads or very weak systems. It was developed by Jan Kneschke and can be supplemented with modules. For example, FastCGI lets you run PHP code. SCGI adds Ruby or Python to lighty.

Steps to Install Lighttpd Web Server on Rocky Linux 8

The steps given here to configure Lighttpd will be the same for other RedHat Linux such as CentOS, Rocky Linux, Oracle Linux, and more…

1. Requirements

To run this tutorial, we need Rocky Linux, a root or non-root user with sudo rights, an Epel repository, and an internet connection.

2. Update Rocky Linux 8

Here we will use the DNF package manager to install the packages we need to configure Lighttpd, so first run the system update command:

sudo dnf update && sudo dnf upgrade

3. Activate the EPEL version

Unlike Apache, the Lighttpd package is not available to install using the Rocky Linux 8 base repository. Therefore, we need to add an Epel repository containing Lighttpd. Therefore, run the given command to add EPEL (Extra Packages for Enterprise Linux).

sudo dnf install epel-release

4. Install Lighttpd on Rocky Linux 8

Once the required repository is added, then use the DNF package manager to install Lighttpd like we do for any other open source package.

sudo dnf install lighttpd

5. Start and activate the service

After the installation process is complete, let’s run a web server service and enable it as well, so that it can start automatically with system startup.

To start

sudo systemctl start lighttpd

To activate :

sudo systemctl enable lighttpd

To check the status:

sudo systemctl status lighttpd

sudo systemctl lighttpd status

To check the version, we can use:

lighttpd -v

6. Allow Port 80 in Firewall on Rocky Linux 8

To access the web server outside our system, we need to open ports 80 (HTTP) and 443 (HTTPS) in the firewall.

sudo firewall-cmd --zone=public --add-port=80/tcp
sudo firewall-cmd --zone=public --add-port=443/tcp
sudo firewall-cmd --reload

7. Access the test page

To confirm that the web server is working without errors, let’s access its test page, for this we can point our web browser to the IP address or domain of the server where we have installed the Lighttpd.

For example:



You will have the Lighttpd Test page:

install lighttpd web server on rocky linux 8

8. Setup

The Lighttpd is configured via the /etc/lighttpd/lighttpd.conf file. This can be edited with any text editor with root privileges. The most important options are briefly presented here. Many other configuration options are described in detail in the configuration file itself.

For more information, visit the official documentation page.

The server content is saved in a directory called “document root“. This means that the Apache web server looks there for the (HTML) files to deliver. In Apache, the directory is:


If you save files there, you can access them using the server’s IP address:

http://localhost/ Where http://SERVER-IP_Address/

9. Uninstall Lighttpd

Those who want to remove Lighttpd from their system then use the following commands:

sudo systemctl stop lighttpd
sudo dnf remove lighttpd

Uninstalling Lighttpd

Other Items:

How to Install Apache on Almalinux 8 / Rocky Linux 8
A Simple Way to Install Tor Browser in Rocky Linux
How to Install NextCloud Server on Rocky Linux
How to Install and Configure Lighttpd Web Server on Ubuntu

Comments are closed.