如何使用最少的服务器进行反向代理来提供静态内容?
考虑使用lighttpd 提供静态内容,然后使用在不同服务器上运行的apache 提供动态内容。
Thinking of serving up static content with lighttpd and then dynamic content with apache running on a different server.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果问题只是如何仅代理动态请求,您可能可以在lighttpd配置中使用类似以下内容:
然后,将静态内容(图像、CSS、Javascript等)放在/static下;这样,它们将直接由 Lighty 提供服务,而其他请求将被代理到 10.0.0.2、端口 8080 上的 Apache(根据需要进行调整。)
If the question is simply how to proxy only dynamic requests, you could probably use something like the following in your lighttpd config:
Then, put your static content (images, CSS, Javascript etc) under /static; that way, they'll be served directly by Lighty, while other requests will be proxied to Apache on 10.0.0.2, port 8080 (adjust as appropriate.)