How To Install Lighttpd on AlmaLinux 8

In this article, we want to teach you How To Install Lighttpd on AlmaLinux 8.

Lighttpd is a secure, fast, compliant, and very flexible web server that has been optimized for high-performance environments.

It has a very low memory footprint compared to other webservers and takes care of CPU load.

Its advanced feature set (FastCGI, CGI, Auth, Output-Compression, URL-Rewriting, and many more) makes Lighttpd the perfect webserver software for every server that suffers load problems.

Install Lighttpd on AlmaLinux 8

To install Lighttpd, 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 article the Initial Server Setup with AlmaLinux 8.

Now follow the steps below to set up Lighttpd on AlmaLinux 8.

Set up Lighhttpd on AlmaLinux 8

One way to install Lighttpd is by adding the Epel release repository. First, update your local package index with the command below:

sudo dnf update -y

Then, install the Epel release on AlmaLinux 8 with the following command:

sudo dnf install epel-release

Now you can use the following command to install Lighttpd:

sudo dnf install lighttpd

Start and enable your Lighttpd service to start on boot with the commands below:

# sudo systemctl start lighttpd
# sudo systemctl enable lighttpd

Verify that your Lighttpd service is active and running on AlmaLinux 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

Also, you can use the following command to check your Lighttpd version on AlmaLinux 8:

lighttpd -v

You will get the following output:

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

Here we assumed that you have enabled Firewalld from the requirements. Now you need to allow traffic on HTTP and HTTPS through your AlmaLinux 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 on AlmaLinux 8 by typing your server’s IP address in your web browser:

http://Your-IP-addr

You will see:

Lighttpd web server on AlmaLinux

Conclusion

At this point, you learn to set up a Lighttpd web server on AlmaLinux 8.

I hope you enjoy using it.

Newsletter Updates

Enter your email address below and subscribe to our newsletter

Stay informed and not overwhelmed, subscribe now!