lighttpd too many open files

lighttpd server crashes with fllowing error in error_log file.

As lighttpd is a single-threaded server, its main resource limit is the number of file descriptors, which is set to 1024 by default (on most systems). If you are running a high-traffic site you might want to increase this limit by setting server.max-fds.


Read More…

lighttpd mod alias

mod_alias lighttpd module allow you to map urls to file system. For example, you need /mrtg show /var/www/mrtg You need to first enable mod_alias in lighttpd.conf


and remove the comment # on “mod_alias” line. It should look like

To add alias, add following in lighttpd.conf

If you need to add […]

Read More…

bind lighttpd to one ip address

I want to bind lighttpd on IP address, so i can use other IP’s for Apache, Apache have “Listen” option to bind apache to specific IP address.


Replace with

See lighttpd […]

Read More…

Auto restart lighttpd on crash

To restart lighttpd if it went down or crashed, create a file

With the following content

Make it executable

Create a file up.html on web root of your web site

Now set a cronjob to run every 5 minutes

Add following cronjob

See lighttpd […]

Read More…