【发布时间】:2013-12-11 18:09:02
【问题描述】:
我已经为 Datastax 编写的名为 OpsCenter 的 Cassandra 监控工具设置了一个基本代理。该应用程序是一个侦听 8888/8443 的 python 网络服务器。该应用程序不以 root 身份运行,因此无法在 80/443 上绑定,所以我想在前面运行 Apache 作为代理/反向代理。我遇到的问题是 OpsCenter 在每次请求后重写 URI,并写入端口。
例如https://mydomain.com/ 在每次请求后变为 https://mydomain.com:8443/。这会阻止所有未来的请求,因为 8443 未在防火墙上打开。
Apache 在向客户端返回响应时可以从 URI 中删除端口吗?
这是我的代理配置的样子。我正在代理服务器上终止 SSL。
ProxyRequests Off
ProxyPreserveHost On # OpsCenter also rewrites the host, which becomes 127.0.0.1 without this.
SSLEngine On
SSLProxyEngine On
SSLCertificateFile "/path/to/cert"
SSLCertificateKeyFile "/path/to/key"
SSLProxyCheckPeerCN Off
SSLProxyCheckPeerExpire Off
ProxyPass /tcp http://127.0.0.1:8888/tcp
ProxyPassReverse /tcp http://127.0.0.1:8888/tcp
ProxyPass /opscenter http://127.0.0.1:8888
ProxyPassReverse /opscenter http://127.0.0.1:8888
【问题讨论】:
标签: apache datastax-enterprise opscenter