繁体   English   中英

OTRS的Apache2反向代理问题

[英]Apache2 reverse proxy issues with OTRS

在OTRS论坛中提出了这个问题但他们的主要重点是OTRS的功能,而不是与apache代理的交互。

我有一台运行OTRS(基于Perl的支持票证系统)的内部服务器。 我的DMZ中有一个反向代理,可以为内部网页/应用程序执行代理和SSL卸载。 我的代理服务器是带有Apache2的Ubuntu 18。 除了对OTRS而言,我会收到奇怪的页面错误外,它几乎可以正常工作。 过去还不错,但是由于是从OTRS 5更新到OTRS6,因此非常糟糕,我们只能登录才能登录https。

如果我使用https,则会抛出一条消息,提示“ OTRS已检测到可能的网络问题”,并说要重新加载页面或等待浏览器自行建立连接。 如果我稍等片刻,我会收到一条新消息,指出“在临时连接断开后已重新建立连接。由于此页面上的该元素可能已停止正常工作”,它继续说您需要重新加载这一页。 但是它只是不断循环显示这些消息,并产生拍打错误。

每当我移到新票证时,我还会获得其他斜杠( / )。 像这样: https : //myotrs.mydomain.com/otrs////////////index.pl

通过代理在http和https上都添加斜杠。 它仅在OTRS网站上发生,而不在同一代理处理的其他网站上发生。

这是我的代理vhost文件的示例。

<VirtualHost *:443>
ServerName help.mydomain.com
ServerAlias help.mydomain.net
ServerAdmin it@mydomain.com
ErrorLog /var/log/apache2/proxiedhosts-ssl_error.log
  # Possible values include: debug, info, notice, warn, error, crit,
  # alert, emerg.
  LogLevel info
  CustomLog /var/log/apache2/access-ssl.log combined
ProxyRequests off
ProxyPass / http://helpdesk.mydomain.local/
<Location /otrs>
 ProxyPassReverse http://helpdesk.mydomain.local/otrs/
</Location>
<Location /otrs-web>
 ProxyPassReverse http://helpdesk.mydomain.local/otrs-web/
</Location>
# Use mod_proxy_html to rewrite URLs
  SetOutputFilter proxy-html
# commented out
https://help.mydomain.com/otrs/
https://help.mydomain.com/otrs-web/
# Disable compressed communication between Apache and target server
  RequestHeader unset  Accept-Encoding
  #   SSL Engine Switch:
  #   Enable/Disable SSL for this virtual host.
  SSLEngine on
  # Allows the proxying of an SSL connection
  SSLProxyEngine On
  # certificate
  SSLCertificateFile /etc/ssl/certs/help.mydomain.com/help.mydomain.com.crt
  SSLCertificateKeyFile /etc/ssl/private/SHA2_mydomain.key
</VirtualHost>

我已经签出了您的配置文件,建议您尝试更改

<Location /otrs>
     ProxyPassReverse http://helpdesk.mydomain.local/otrs/
</Location>

<Location /otrs/>
     ProxyPassReverse http://helpdesk.mydomain.local/otrs/
</Location>

在原始配置文件中,如果浏览https://myotrs.mydomain.com/otrs/index.pl,您将被重定向到https://myotrs.mydomain.com/otrs//index.pl 然后,如果您单击页面,您将被重定向到https://myotrs.mydomain.com/otrs////index.pl 然后,您陷入了循环。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM