How To Install Lighttpd on AlmaLinux 9

In this guide, you will learn to Install Lighttpd Web Server on AlmaLinux 9.

Lighttdp, a high-performance open-source Web server (licensed under the revised BSD license) was developed by Jan Kneschke.

Lighttpd is an IPv4 and IPv6 compatible Web server that understands HTTP/1.0 and 1.1, HTTPS (using OpenSSL) CGI/1.1, native FastCGI, and HTTP authentication. It allows for virtual hosts, directory listings, streaming CGI and FastCGI, URL-Rewriting, HTTP-Redirects, output-compression with transparent caching, automatic expiration of files, and has Large File support.

Lighttpd is very PHP focused. It provides the same speed or better than apache + mod_php4 and handles various PHP bugs in the FastCGI SAPI.

Steps To Install Lighttpd Web Server on AlmaLinux 9

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 on the Initial Server Setup with AlmaLinux 9.

Set up Lighhttpd on AlmaLinux 9

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 9 with the following command:

sudo dnf install epel-release -y

Now you can use the following command to install Lighttpd:

sudo dnf install lighttpd -y

Start and Enable Lighttpd Service

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 9 with the following command:

sudo systemctl status lighttpd

In your output you will see:

● lighttpd.service - Lightning Fast Webserver With Light System Requirements
     Loaded: loaded (/usr/lib/systemd/system/lighttpd.service; enabled; vendor >
     Active: active (running) since Sat 2023-02-04 07:20:15 EST; 12s ago
   Main PID: 71217 (lighttpd)
      Tasks: 1 (limit: 23609)
     Memory: 1.3M
        CPU: 22ms
     CGroup: /system.slice/lighttpd.service

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

lighttpd -v

You will get the following output:

lighttpd/1.4.67 (ssl) - a light and fast webserver

Configure Firewall For Lighttpd

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 9 by typing your server’s IP address in your web browser:


That’s it, you are done.


At this point, you have learned to Install Lighttpd on AlmaLinux 9.

Hope you enjoy it. You may be like these articles on the Orcacore website:

Steps To Install PHP 7.4 on AlmaLinux 9

Install and Configure WordPress on Rocky Linux 9

Newsletter Updates

Enter your email address below and subscribe to our newsletter

Stay informed and not overwhelmed, subscribe now!