Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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?

share|improve this question
    
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

1 Answer 1

up vote 5 down vote accepted

You're looking for lighttpd's mod_alias.

Something like this:

alias.url = (
  "/aa" => "/domain_aa_site/"
  "/somewhere/else" => "/other/docroot/"
)
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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