I have

evhost.path-pattern = "/home/lighttpd/vhosts/%2/public"

When this pattern hits a certain host, let's say 'foo', I would like to use a fastcgi server. How do I configure just one of my virtual hosts?

So for foo, it should use:

fastcgi.server = ("/myapp"
    ...
)

For all other values of %2, it should do something else (such as default behavior of serving static content).

link|improve this question
feedback

1 Answer

up vote 1 down vote accepted
+100

Just don't use evhost.

$HTTP["host"] =~ "(www\.)?domain\.com" {
    server.document-root = "/foo/bar/baz"
    fastcgi.server = (
        "..."
        ),
    )
}
link|improve this answer
Never quite understood why evhosts was ever created when simple vhosts + some regex does the job 10x easier. – Dave Rickman Aug 13 '09 at 5:33
The only real use I've found for it is the one in the documentation, per user subdomains. For everything else, I just use the above. – rodjek Aug 13 '09 at 5:59
Obviously, I can do that, but I have like 10 sites serving parked pages, and I'd prefer to not have to manually keep track of them all. – Instance Hunter Aug 13 '09 at 22:51
I suppose this is the only option. – Instance Hunter Aug 20 '09 at 1:26
feedback

Your Answer

 
or
required, but never shown

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