0

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).

1 Answer 1

1
+100

Just don't use evhost.

$HTTP["host"] =~ "(www\.)?domain\.com" {
    server.document-root = "/foo/bar/baz"
    fastcgi.server = (
        "..."
        ),
    )
}
4
  • Never quite understood why evhosts was ever created when simple vhosts + some regex does the job 10x easier. Aug 13, 2009 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, 2009 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. Aug 13, 2009 at 22:51
  • I suppose this is the only option. Aug 20, 2009 at 1:26

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .