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.

So lately I heard about people running apache and nginx together, nginx for static content and apache for dynamic. Can the same be done with lighttpd and apache?

share|improve this question

1 Answer 1

up vote 1 down vote accepted

Absolutely. lighttpd can act as a proxy to a different web server for content that it doesn't handle locally.

A simple configuration would look like this - say you want lighttpd to send every request in /webapp/ to a different service:

$HTTP["url"] =~ "^/webapp" {
    proxy.server = ( "" =>
        ( ( 
            "host" => "127.0.0.1",
            "port" => 8000
        ) )
    )
}

That configuration would send traffic to 127.0.0.1 (localhost - change that if it's running on a different system) on port 8000 - adjust that configuration to fit your needs. Keep in mind that if the services are running on the same system, you'll need to make sure to move Apache off of listening on 80, which is its default.

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.