×


Fix lighttpd 404 not found error

As part of our Server Support Services, we have seen an increasing support request about Lighttpd web server related issues from our customers and have helped in providing solutions to such web server concerns.

In this context, We will look into this error and how to resolve it.

Why does a 404 error triggers in a Lighttpd web server?

Lighttpd web server is Open source and has gained momentum for its enhanced performance and speed thereby making website faster.

Nowadays, most developers prefer Lighttpd to Apache based on its rate of performance and for better speed.
In some cases, when there are improper codes in the configuration file
as well as permissions issues , a 404 error will occur.

How to solve Lighttpd 404 not found server error

From our experience with working with Lighttpd web server, this error can be fixed by following the instructions below;

In some cases,

1. To begin, locate the Lighttpd configuration file which is located at the "/etc/lighttpd/lighttpd.conf" directory. you can use your ssh tool to log into your server and use the command below to edit this config file;

sudo nano /etc/lighttpd/lighttpd.conf


In this config file, look out for the line "server.max-fds = 2048" and if commented, remove comment as shown below;

server.max-fds = 2048


Next, perform a restart of the web server via the command;

service lighttpd restart


You will see that this will fix the error!

In another case,

In the configuration file, we added a few directory listing directives with the following codes to correct the permission issue;


#directory listing
dir-listing.activate = "enable"
dir-listing.hide-dotfiles = "enable"
dir-listing.encoding = "utf-8"


Finally, you should save the file and restart the web server to enable it to take effect.

Need any support in solving Lighttpd errors? We are here to help.



Conclusion

Lighttpd web server 404 not found error triggers when there a file permission issue or in cases where the configuration is not accurate.