Lighttpd Configure Subdomain

To configure a subdomain on Lighttpd, you need to add a new virtual host configuration for the subdomain in the Lighttpd configuration file.

Here is the general process:

  1. Open the Lighttpd configuration file:
    sudo nano /etc/lighttpd/lighttpd.conf
  2. Add a new virtual host configuration for the subdomain:
    $HTTP["host"] =~ "subdomain.example.com" {
    server.document-root = "/var/www/subdomain"
    }
  3. Replace “subdomain.example.com” with the actual subdomain name and replace “/var/www/subdomain” with the root directory for the subdomain.
  4. Save and close the file.
  5. Restart Lighttpd to apply the changes:
    sudo service lighttpd restart

Note: This is just a general outline, and the actual configuration file may vary depending on your specific setup.

Leave a Comment