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?
Asked
Active
Viewed 121 times
1 Answers
1
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.
![](../../users/profiles/72586.webp)
Shane Madden
- 112,982
- 12
- 174
- 248