Where Are the Lighttpd Config Files?
The lighttpd main config file, the conf.d drop-in folder, and where logs and the document root sit by distro.
Last updated
Lighttpd reads one main file, /etc/lighttpd/lighttpd.conf, plus a conf.d or conf-enabled folder of drop-ins beside it. That split stayed stable across distributions, which makes distro hopping painless. Validate any edit with the built-in config test before reloading.
Two paths move between distros. The document root is /var/www/html on Debian and Ubuntu but /srv/http on Arch, and module snippets ship under /usr/share/doc for reference. Logs default to /var/log/lighttpd/. Copy the main file to a .bak before restructuring anything.
Where lighttpd stores this, by platform
/etc/lighttpd/lighttpd.conf
Main file plus the conf.d and conf-enabled drop-in folders beside it. Document root is /var/www/html on Debian and Ubuntu, /srv/http on Arch. Test edits with lighttpd -tt and reload through systemd. Error and access logs default to /var/log/lighttpd/.
Frequently asked questions
how do I check my lighttpd config for errors
Run lighttpd -tt -f /etc/lighttpd/lighttpd.conf to test the file and print misconfigurations. For the full effective setup, lighttpd -p with the same flag prints every value the server actually sees. Start from a working minimal file and change one thing at a time.
how do I add a virtual host to lighttpd
Create a file in /etc/lighttpd/conf-available/ and symlink it into conf-enabled/, following the Debian convention. The main file includes that directory, so a reload picks the site up. Keep each virtual host in its own file with its own log paths.
where are the lighttpd log files
Look at server.errorlog in the main config and accesslog.filename in the access log config. Defaults point under /var/log/lighttpd/. When systemd hides output, journalctl for the lighttpd unit shows startup failures the log files miss.
Notice an outdated path? Let us know.