Lighttpd is an open-source web server optimized with a small memory footprint compared to other web-servers, effective management of the CPU-load, and an advanced feature set (FastCGI, SCGI, Auth, Output-Compression, URL-Rewriting and many more) and designed for high-performance environments. In this guide, we are going to detail the steps in installing Lighttpd web server on CentOS 7.

You can also check our guide on installing Lighttpd web server on Ubuntu 16.04/18.04

Deploying your cloud server
If you have not already registered with Cloudwafer, you should begin by getting signed up. Take a moment to create an account after which you can easily deploy your own cloud servers.

Once you have signed up, log into your Cloudwafer Client Area with the password provided in your mail and deploy your Cloudwafer cloud server.

Updating System Packages on CentOS
It is always recommended that you update the system to the latest packages before beginning any major installations. This is done with the command below:

sudo yum update

Step 1: Install Lighttpd
Issue the command below to install Lighttpd using CentOS's yum package manager:

sudo yum install lighttpd

Lighttpd-Cloudwafer-CentOS-1

Lighttpd-Cloudwafer-CentOS-2

Step 2: Start, Enable and Check Lighttpd Status
After successfully install Lighttpd, issue the commands below to start and enable the service to automatically start at boot time:

sudo systemctl start lighttpd
sudo systemctl enable lighttpd

Lighttpd-Cloudwafer-CentOS-3

Next, issue the command below to check the status of the lighttpd service:

sudo systemctl status lighttpd

An error similar to the one shown below might be displayed when you check the status of the lighttpd service, but this can be resolved by following the next steps:

Lighttpd-Cloudwafer-CentOS-4

Open the /etc/lighttpd/lighttpd.conf file with any editor of your choice (nano in this guide):

sudo nano /etc/lighttpd/lighttpd.conf

Locate the line that contains server.use-ipv6. You can use Ctrl+W to search on the nano editor.

Lighttpd-Cloudwafer-CentOS-5

Next, change it from enable to disable as shown below:

Lighttpd-Cloudwafer-CentOS-6

Ensure to save the file before exiting the file.

Restart the Lighttpd service and check the status again.

sudo systemctl restart lighttpd
sudo systemctl status lighttpd

Lighttpd-Cloudwafer-CentOS-8

You can check the version of the Lighttpd server installed with the command below:

lighttpd -v

Lighttpd-Cloudwafer-CentOS-9

Next, visit your server's IP address on the browser or your domain name if you have one.

Lighttpd-Cloudwafer-CentOS-7