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:
- Open the Lighttpd configuration file:
sudo nano /etc/lighttpd/lighttpd.conf - Add a new virtual host configuration for the subdomain:
$HTTP["host"] =~ "subdomain.example.com" { server.document-root = "/var/www/subdomain" } - Replace "subdomain.example.com" with the actual subdomain name and replace "/var/www/subdomain" with the root directory for the subdomain.
- Save and close the file.
- Restart Lighttpd to apply the changes:
sudo service lighttpd restart
