Web Root Directory for Lighttpd

Just a quick note to mention that the ‘server.document-root’ in /etc/lighttpd/lighttpd.conf (installed via dietpi-software) does not match the root shown in the default home web page:
.conf = “/var/www”
home web page = “/var/www/html”

Can you be more specific. Where do you see this?

It’s the page you get served when you simply enter the IP address or hostname of the server…

# Placeholder page

The owner of this web site has not put up any web pages yet. Please come back later.

## You should replace this page with your own web pages as soon as possible.

Unless you changed its configuration, your new server is configured as follows:

* Configuration files can be found in /etc/lighttpd. Please read /etc/lighttpd/conf-available/README file.
* The DocumentRoot, which is the directory under which all your HTML files should exist, is set to /var/www/html.

This is the placeholder page which comes from lighttpd, we have no influence about the content of this page.

1 Like

Like I said at the beginning, it was just a quick note to point out the differences between the standard placeholder info and the ‘as installed’ via dietpi-software config file. I wrote it in case someone else wonders why they get a ‘404’ error when putting a page under /var/www/html .
FWIW I also installed lighttpd directly on another Pi via apt and the config file matched the placeholder. So, for some reason (perhaps compatibility with another package), the deafult config file is different.

/var/www is the default web server root we use on all our web server installation. It’s as well documented on our online docs.

This topic was automatically closed 178 days after the last reply. New replies are no longer allowed.