Install and Configure Lighttpd on Rocky Linux 8

In this guide, we intend to teach you How To Install and Configure Lighttpd on Rocky Linux 8.

Lighttpd is open-source web server software. It’s designed specifically for environments with limited resources since it consumes minimal CPU and RAM. It’s also suitable for both the Windows and Linux Operating Systems (OSs).

It is designed to be secure, fast, standards-compliant, and flexible while being optimized for speed-critical environments. Its low memory footprint (compared to other web servers), light CPU load, and its speed goals make Lighttpd suitable for servers that are suffering load problems.

Install and Configure Lighttpd on Rocky Linux 8

To install the Lighttpd web server, you need to log in to your server as a non-root user with sudo privileges and set up a basic firewall. To do this, you can follow our guide the Initial Server Setup with Rocky Linux 8.

Now you can follow the steps below to complete this guide.

Install Lighttpd Web Server on Rocky Linux 8

You can install the Lighttpd by adding the Epel repository on Rocky Linux 8.

First, update your local package index with the following command:

sudo dnf update -y

Then, install the Epel repository on your server by running the command below:

sudo dnf install epel-release

Now you can use the following command to install Lighttpd:

sudo dnf install lighttpd

When your installation is completed, start your Lighttpd service with the command below:

sudo systemctl start lighttpd

Also, enable your service to start on boot:

sudo systemctl enable lighttpd

Verify that your Lighttpd service is active and running on Rocky Linux 8 with the following command:

sudo systemctl status lighttpd

In your output you will see:

Output
lighttpd.service - Lightning Fast Webserver With Light System Requirements
Loaded: loaded (/usr/lib/systemd/system/lighttpd.service; enabled; vendor pr>
Active: active (running) since Sat 2022-01-08 08:13:18 EST; 1min 46s ago
Main PID: 88659 (lighttpd)
Tasks: 1 (limit: 11409)
Memory: 1.1M
CGroup: /system.slice/lighttpd.service
└─88659 /usr/sbin/lighttpd -D -f /etc/lighttpd/lighttpd.conf

You can use the following command to check your Lighttpd version on Rocky Linux 8:

lighttpd -v

You will get the following output:

Output
lighttpd/1.4.55 (ssl) - a light and fast webserver

At this point, we assumed that you have enabled firewalld from the requirements. Now you need to allow traffic on HTTP and HTTPS through your Rocky Linux firewall:

# sudo firewall-cmd --permanent --zone=public --add-service=http
# sudo firewall-cmd --permanent --zone=public --add-service=https

Then, reload the firewall to apply the new rules:

sudo firewall-cmd --reload

Now you can access your Lighttpd defaults page by typing your server’s IP address in your web browser:

http://Your-IP-addr

You will see:

Lighttpd web server

Configure Lighttpd Web Server

By default, Lighttpd is configured at the /etc/lighttpd/lighttpd.conf file. The configuration options are explained in detail in the configuration file itself.

The contents of the server are “Document root“. This is the Apache web server (HTML) The file is to be delivered. In Apache, the directories are:

/var/www/html/

If you save the file there, you can access it using the server’s IP address.

http://localhost/ Also http://SERVER-IP_Address/

For more information, you can visit the Lighttpd Documentation page.

Remove Lighttpd from Rocky Linux 8

If you no longer want to use this web server, you can easily remove it from your server.

First, stop your Lighttpd service with the following command:

sudo systemctl stop lighttpd

Then, remove it by running the command below:

sudo dnf remove lighttpd

Conclusion

At this point, you learn to Install and Configure Lighttpd on Rocky Linux 8.

Hope you enjoy it.

You may be interested in these articles on the orcacore website:

Install and Configure Zabbix 6.0 on Rocky Linux 8

Install and Configure Grafana on Rocky Linux 8

Set up and Configure Joomla on Rocky Linux 8

Related Articles

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Latest Articles

POPULAR TAGS

Most Popular