Sample Header Ad - 728x90

Setup subdomain on a lighttpd server

2 votes
1 answer
1417 views
I am running OSMC on my raspberry p3 and was trying to set up a webpage for internal use. I installed lighttpd and when I try to get to "osmc.local" the lighttpd page shows up just fine.Now I wanted to set up a subdomain, say "xyz.osmc.local". I know that the file "/etc/lighttpd/lighttpd.conf" needs to be edited and lines like the following need to be added to create subdomain/virtualhost. $HTTP["host"] == "sub.example.com" { server.document-root = "/var/www/sub.example.com/public/htdocs" server.errorlog = "/var/www/sub.example.com/logs/error.log" accesslog.filename = "/var/www/sub.example.com/logs/access.log" } But no matter what I do, no subdomain works even though the domain "osmc.local" is working fine. Any suggestions?
Asked by flide (51 rep)
Sep 12, 2016, 04:55 AM
Last activity: Aug 21, 2019, 11:45 AM