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?

Syntax
  • 225
  • 3
  • 9
  • 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 00: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 01:13

1 Answers1

5

You're looking for lighttpd's mod_alias.

Something like this:

alias.url = (
  "/aa" => "/domain_aa_site/"
  "/somewhere/else" => "/other/docroot/"
)
Shane Madden
  • 112,982
  • 12
  • 174
  • 248