Lighttpd is a fast, lightweight, secure, and flexible web server specially designed for mission-critical environments. Compared to other web servers like Apache and Nginx, Lighttpd offers lower memory and CPU usage. It supports several technologies, including PHP, FastCGI, Auth, SSL, URL rewriting, reverse proxy, load balancing, and much more. It has a small memory footprint and is capable of handling many concurrent connections. It is cross-platform and can be installed on Unix, Linux, and Windows systems.

In this post, we will show you how to install a Lighttpd web server on Oracle Linux 10.

Step 1 – Install Lighttpd

By default, Lighttpd is not included in the Oracle Linux 10 default repo, so you will need to install the EPEL repository on your server. You can install it with the following command:

dnf install https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm

Once the EPEL repo is installed, install the Lighttpd package using the following command:

dnf install lighttpd

After the successful installation, edit the Lighttpd configuration file.

nano /etc/lighttpd/lighttpd.conf

Change the following lines:

server.use-ipv6 = "disable"
server.bind = "your-server-ip"

Next, start and enable the Lighttpd service with the following command:

systemctl start lighttpd
systemctl enable lighttpd

You can check the status of Lighttpd using the following command:

systemctl status lighttpd

You should get the following output:

● lighttpd.service - Lightning Fast Webserver With Light System Requirements
Loaded: loaded (/usr/lib/systemd/system/lighttpd.service; disabled; preset: disabled)
Active: active (running) since Wed 2025-12-10 07:35:17 EST; 5s ago
Invocation: ec4cf7c3f8df4214a2d07d28463a8243
Process: 72812 ExecStartPre=/usr/sbin/lighttpd -tt -f /etc/lighttpd/lighttpd.conf (code=exited, status=0/SUCCESS)
Main PID: 72813 (lighttpd)
Tasks: 1 (limit: 24812)
Memory: 880K (peak: 1.2M)
CPU: 16ms
CGroup: /system.slice/lighttpd.service
└─72813 /usr/sbin/lighttpd -D -f /etc/lighttpd/lighttpd.conf

You can also verify the Lighttpd version with the following command:

lighttpd -v

You should get the following output:

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

Now, open your web browser and access the Lighttpd test page using the URL http://your-server-ip. You should see the following page:
Lighttpd test page

Step 2 – Install MariaDB Database Server

By default, the MariaDB server package is included in the Oracle Linux 10 default repo. You can install it with the following command:

dnf install mariadb mariadb-server

Once MariaDB is installed, start and enable the MariaDB service using the following command:

systemctl start mariadb.service
systemctl enable mariadb.service

To check the MariaDB status, run the following command:

systemctl status mariadb.service

You will get the following output:

● mariadb.service - MariaDB 10.11 database server
     Loaded: loaded (/usr/lib/systemd/system/mariadb.service; disabled; preset: disabled)
     Active: active (running) since Tue 2025-12-09 23:43:40 EST; 7h ago
 Invocation: 16b9c064f8934f268eb717ae0e8136dd
       Docs: man:mariadbd(8)
             https://mariadb.com/kb/en/library/systemd/
   Main PID: 7314 (mariadbd)
     Status: "Taking your SQL requests now..."
      Tasks: 9 (limit: 24812)
     Memory: 223.8M (peak: 231.7M)
        CPU: 43.380s
     CGroup: /system.slice/mariadb.service
             └─7314 /usr/libexec/mariadbd --basedir=/usr

Step 3 – Install PHP and PHP-FPM with FastCGI

To install PHP with PHP-FPM and FastCGI support, you need to install PHP with some required extensions. You can install all of them by running the following command:

dnf install php php-mysqlnd php-pdo php-gd php-mbstring php-fpm lighttpd-fastcgi

Next, edit the PHP-FPM configuration file and change the user and group to lighttpd:

nano /etc/php-fpm.d/www.conf

Change the following lines:

user = lighttpd
group = lighttpd

Next, find the following line:

;listen = /run/php-fpm/www.sock

And replace it with the following line:

listen = 127.0.0.1:9000

Save and close the file, then start the PHP-FPM service and enable it to start at system reboot:

systemctl start php-fpm
systemctl enable php-fpm

Step 4 – Enable PHP and PHP-FPM Support in Lighttpd

To enable FastCGI support in PHP, edit the php.ini configuration file:

nano /etc/php.ini

Change the following line:

cgi.fix_pathinfo=1

Next, edit the /etc/lighttpd/modules.conf file:

nano /etc/lighttpd/modules.conf

Uncomment the following line:

include conf_dir + "/conf.d/fastcgi.conf"

Next, edit the /etc/lighttpd/conf.d/fastcgi.conf file.

nano /etc/lighttpd/conf.d/fastcgi.conf

Add the following lines at the end of the file:

fastcgi.server += ( ".php" =>
        ((
                "host" => "127.0.0.1",
                "port" => "9000",
                "broken-scriptfilename" => "enable"
        ))
)

Save and close the file, then restart the PHP-FPM and Lighttpd service to apply the changes:

systemctl restart lighttpd
systemctl restart php-fpm

Step 5 – Verify the Lighttpd Server

Next, you will need to create a phpinfo.php configuration file to test the FastCGI support in PHP.

nano /var/www/lighttpd/phpinfo.php

Add the following code:

<?php
phpinfo();
?>

Save and close the file. Then, open your web browser and access your PHP test page using the URL http://your-server-ip/phpinfo.php. You should see your PHP test page on the following screen:

Conclusion

Congratulations! You have successfully installed the Lighttpd server with PHP and FastCGI support on Oracle Linux 10. You can now start deploying your web application on your secure and fast Lighttpd server. Get started with Lighttpd on VPS Hosting from Atlantic.Net!