AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / server / 问题 / 789743
Accepted
Mindaugas Bernatavičius
Mindaugas Bernatavičius
Asked: 2016-07-14 22:26:45 +0800 CST2016-07-14 22:26:45 +0800 CST 2016-07-14 22:26:45 +0800 CST

可以在不同的网络服务器(nginx、apache、iis 等)中重写响应主体

  • 772

我正在对常用 Web 服务器之间的差异进行个人研究。当涉及到特定功能时,我正在努力寻找明确的答案,对我来说最重要的是:动态重写响应体的能力。

场景:Web 服务器(apache、nginx、iis、varnish、haproxy)被部署为反向代理或应用服务器代理(以 nginx --> 乘客为例)。

问题:在哪些网络服务器中以及如何重写响应正文。关于此类操作的易用性和性能的评论或 2 也会有所帮助。

我的研究:

Content rewritting:

Nginx: ngx_http_sub_module
Nginx: LUA body_filter: https://groups.google.com/forum/embed/#!topic/openresty-en/Gj-s_hARc84 
Apache: mod_substitute
Apache: starting from 2.3 LUA can be used as a scripting language (and the response body rewriting with it is possible)
IIS: does not seem top be possible?
Varnish: possible, but hacky: https://github.com/aivarsk/libvmod-rewrite 
HAproxy: not possible, although it might be possible with LUA in the future

还有什么我忘记了吗?谢谢。

apache-2.2 iis nginx varnish reverse-proxy
  • 1 1 个回答
  • 2319 Views

1 个回答

  • Voted
  1. Best Answer
    Mindaugas Bernatavičius
    2016-07-18T07:30:42+08:002016-07-18T07:30:42+08:00

    以这张表结束:

    **Nginx**: ngx_http_sub_module --> http://p.defau.lt/?A6UukYFKZrYLalJ5KOuTKg 
    **Nginx**: Nginx + lua. LUA body_filter --> http://p.defau.lt/?0ZxLWENoEkFIRD17QlEtbQ 
    **Apache**: Apache Module mod_substitute --> http://p.defau.lt/?IS8u2mnAQTSHs4qEl_MSFQ 
    **Apache**: As of version 2.3 LUA can be used as a scripting language for Apache. Response body rewriting is possible there as well. --> http://p.defau.lt/?tTAqWfA8sezQZkmvI3LnFw 
    **Varnish**: Possible, but hacky: https://github.com/aivarsk/libvmod-rewrite 
    **HAproxy**: Not possible. Might be possible with LUA in the future
    
    • 6

相关问题

  • 这个 Web 服务器可以处理多少个站点?[复制]

  • 如何在 IIS 中发送响应标头?

  • IIS 优化

  • mod_rewrite 不转发 GET 参数

  • IIS 6.0 (Windows Server 2003) 备份的最佳实践?

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    新安装后 postgres 的默认超级用户用户名/密码是什么?

    • 5 个回答
  • Marko Smith

    SFTP 使用什么端口?

    • 6 个回答
  • Marko Smith

    命令行列出 Windows Active Directory 组中的用户?

    • 9 个回答
  • Marko Smith

    什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同?

    • 3 个回答
  • Marko Smith

    如何确定bash变量是否为空?

    • 15 个回答
  • Martin Hope
    Tom Feiner 如何按大小对 du -h 输出进行排序 2009-02-26 05:42:42 +0800 CST
  • Martin Hope
    Noah Goodrich 什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同? 2009-05-19 18:24:42 +0800 CST
  • Martin Hope
    Brent 如何确定bash变量是否为空? 2009-05-13 09:54:48 +0800 CST
  • Martin Hope
    cletus 您如何找到在 Windows 中打开文件的进程? 2009-05-01 16:47:16 +0800 CST

热门标签

linux nginx windows networking ubuntu domain-name-system amazon-web-services active-directory apache-2.4 ssh

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve