5

To me this seem logical, but it doesn't seem to work.

$HTTP["host"] =~ "(^|\.)hd.domain\.com$" {
    server.document-root = "/domain_site/"

    $HTTP["url"] =~ "^/aa/" {
      server.document-root = "/domain_aa_site/"
    }

}

When I go to http://hd.domain.com/aa/ I get "404 - Not Found"

What am I doing wrong?

  • what are you trying to achieve? Why don't you just put an "aa" subolfer inside "/domain_site/" ? – Niko S P Feb 23 '12 at 0:02
  • I want to link to several different folders, some on other hard drives, I have created a few different sub domains, but it would be much easier to just add fake folders as above... – Syntax Feb 23 '12 at 1:13
5

You're looking for lighttpd's mod_alias.

Something like this:

alias.url = (
  "/aa" => "/domain_aa_site/"
  "/somewhere/else" => "/other/docroot/"
)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.