Azure Linux 应用服务作为反向代理

Azure Linux 应用服务作为反向代理

是否可以将 Azure Linux 应用服务配置为反向代理?在运行 IIS 的 Azure 应用服务中,您可以使用 ARR 和代理重写规则,那么运行 Apache 的应用服务呢?

apachectl -M 显示已启用 mod_proxy 和 proxy_http 模块。

在 .htaccess 中,我尝试使用 ProxyPassReverse 重写导致重定向的代理请求的 Location 字段。

类似这样的情况,返回错误 500:

RewriteEngine On
RewriteRule ^/?img/(.*)$ http://internal.example.com/img/$1 [L,P]
RewriteRule ^/?app/(.*)$ http://internal.example.com/app/$1 [L,P]

ProxyPassReverse / http://internal.example.com/

可能是因为 mod_proxy 未加载?是否可以加载此模块?

这次需要 Linux 应用服务。

相关内容