首页 > 解决方案 > 如何在 ISPConfig 中设置反向代理?

问题描述

是否可以在 ISPConfig 中设置反向代理?

我在子域上尝试了此设置,但只收到错误 500。 在此处输入图像描述

/var/www/influxdb2.*******.***/log/error.log说如下:

==> error.log <==
[Fri Jan 01 21:24:15.963158 2021] [proxy:warn] [pid 30333] [client ***.***.***.***:59356] AH01144: No protocol handler was valid for the URL /favicon.ico (scheme 'http'). If you are using a DSO version of mod_proxy, make sure the proxy submodules are included in the configuration using LoadModule., referer: https://influxdb2.*******.***/

标签: ispconfigispconfig-3

解决方案


对我来说,这个proxy_http模组不见了。

通过启用它sudo a2enmod proxy_http并重新启动您的 apache systemctl restart apache2(感谢https://serverfault.com/questions/773449/no-protocol-handler-valid-for-the-url-with-httpd-mod-proxy-balancer)。

另请注意,“重定向类型”设置在此处输入图像描述有​​时似乎在保存时将自身重置为“无”(或者至少在加载页面时不显示正确的值,因为 ISPConfig 3.2.1)。因此,如果某些东西不起作用,请仔细检查该设置。

对于“域”选项卡,设置非常简单。只需输入您的域并可能启用 Let's Encrypt。

在此处输入图像描述

请注意,这似乎mod_rewrite用于代理。mod_rewrite 上的Apache2 文档指出应该改用better ProxyPassof 。mod_proxy因此,如果某些应用程序出现任何问题,这可能是进一步调查的起点(为我工作,用于反向代理到 http://localhost:8086 上的 InfluxDB 2.0.3 的 HTTP 端点)。


推荐阅读