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

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

share|improve this question

1 Answer 1

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 = (
        "..."
        ),
    )
}
share|improve this answer
    
Never quite understood why evhosts was ever created when simple vhosts + some regex does the job 10x easier. –  David 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

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.