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…
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.
sudo systemctl start lighttpd
To activate :
sudo systemctl enable lighttpd
To check the status:
sudo systemctl status lighttpd
To check the version, we can use:
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.
You will have the Lighttpd Test page:
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:
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
• 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