Bobcares

Lighttpd Ubuntu – Install it with ease

by | Dec 11, 2019

Trying to install Lighttpd in ubuntu? We can help you install it.

Lighttpd web server in ubuntu is designed and optimized for high-performance environments.

It conserves a small memory when compared to other web servers and provides better management.

At Bobcares, we receive requests for installing lighttpd as a part of our Server Management Services.

Today, let’s see how our Support Engineers install lighttpd in Ubuntu.

How we install Lighttpd ubuntu

Initially, we update the system using the command.

apt-get update

And then we install lighttpd using the below commands in ubuntu

apt-get install lighttpd

After the server installation, we check if it is properly installed or not using the link http://xx.xx.xx.xx:80 where xx.xx.xx.xx is the server IP. Upon success, we can see the lighttpd welcome page.

In case, if the page doesn’t load then we can forcefully start it by running the below command

service lighttpd start

 

How we configure Lighttpd ubuntu

The configuration file of lighttpd is available in the path /etc/lighttpd/lighttpd.conf. This file provides the list of server modules.

In this configuration file, the first directive is the server.modules. It lists the different modules.

To disable any module, we can add # symbol at the beginning of any line to comment on it. Also, to enable any module, we can remove the # symbol.

For example, one of the modules is mod_rewrite to rewrite the URL requests.

Following server.modules block there is a list of other settings to configure. Few settings that we manually add is:

server.max-connections – Specifies how many concurrent connections is possible.

server.max-keep-alive-requests – Sets the maximum number of requests within a keep-alive session before the connection is terminated.

 

Few common errors in lighttpd ubuntu

Till now we saw how to install lighttpd. Now, let’s look into a few errors related to it.

 

1. Unable to find lighttpd after installation

Recently, one of our customers ran into a problem where he was not able to see lighttpd running after the installation.

He installed lighttpd and included /etc/lighttpd/vhost.d/*.conf and put a configuration file for each website in that directory.

After running the command “service lighttpd start”, the customer received a message telling that the service started successfully. However, when checking if the service is listening using “netstat tap” command, the lighttpd was not loading.

Here, is the result of the command

netstat -tap
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 localhost:mysql *:* LISTEN 829/mysqld
tcp 0 0 *:ftp *:* LISTEN 737/vsftpd
tcp 0 0 *:ssh *:* LISTEN 739/sshd
tcp6 0 0 [::]:ssh [::]:* LISTEN 739/sshd

Let’s see how our Support Engineers will fix this error.

We initially we went through the configuration file and found the below

server.use-ipv6 = "enable"

Here, we can see that ipv6 is enabled. So the lighttpd was running in ipv6. So we suggested customer to disable ipv6 and check if lighttpd is running.

Finally, this fixed the error.

 

[Need any assistance with lighttpd? – We’ll help you]

 

Conclusion

In short, Lighttpd is a lightweight web server that is capable of serving large loads using less memory. Today, we saw how our Support Engineers install lighttpd web server in ubuntu and fix its errors.

0 Comments

Submit a Comment

Your email address will not be published. Required fields are marked *

Never again lose customers to poor
server speed! Let us help you.