When I restarted the lighttpd service, the console raised this warning:
perl: warning: Setting locale failed. perl: warning: Please check that your locale settings: LANGUAGE = (unset), LC_ALL = (unset), LC_CTYPE = "UTF-8", LANG = "en_GB.UTF-8" are supported and installed on your system. perl: warning: Falling back to the standard locale ("C").
It is because the locales settings of the system was not configured properly. So, to fix this, run the following command:
# dpkg-reconfigure locales
And choose the correct locale file, in my case, it is "en_US.UTF-8".