简体   繁体   English

OTRS的Apache2反向代理问题

[英]Apache2 reverse proxy issues with OTRS

I have asked this question in OTRS forum but their primary focus is the functionality of OTRS and not really the interaction with an apache proxy. 在OTRS论坛中提出了这个问题但他们的主要重点是OTRS的功能,而不是与apache代理的交互。

I have an internal server running OTRS (Perl based support ticket system). 我有一台运行OTRS(基于Perl的支持票证系统)的内部服务器。 I have a reverse proxy in my DMZ that performs proxy and SSL offload for internal web pages/applications. 我的DMZ中有一个反向代理,可以为内部网页/应用程序执行代理和SSL卸载。 My proxy server is Ubuntu 18 with Apache2. 我的代理服务器是带有Apache2的Ubuntu 18。 It mostly works except that for OTRS I get weird page errors. 除了对OTRS而言,我会收到奇怪的页面错误外,它几乎可以正常工作。 It used to not be bad but since update from OTRS 5 to OTRS6 it is so bad that we cannot we https except to log in. 过去还不错,但是由于是从OTRS 5更新到OTRS6,因此非常糟糕,我们只能登录才能登录https。

If I use https it throws a message that "OTRS has detected possible network issues" and says to reload the page or wait till the browser establishes connection on it's own. 如果我使用https,则会抛出一条消息,提示“ OTRS已检测到可能的网络问题”,并说要重新加载页面或等待浏览器自行建立连接。 If I wait just a bit I get a new message that states "the connection has been re-established after a temporary connection loss. Due to this elements on this page could have stopped working correctly" it goes on to say that you need to reload the page. 如果我稍等片刻,我会收到一条新消息,指出“在临时连接断开后已重新建立连接。由于此页面上的该元素可能已停止正常工作”,它继续说您需要重新加载这一页。 But it just keeps cycling through these message in a flapping error. 但是它只是不断循环显示这些消息,并产生拍打错误。

I also get additional slash marks ( / ) each time I move to a new ticket. 每当我移到新票证时,我还会获得其他斜杠( / )。 Like so: https://myotrs.mydomain.com/otrs////////////index.pl ? 像这样: https : //myotrs.mydomain.com/otrs////////////index.pl

The slash mark addition happens on both http and https through the proxy. 通过代理在http和https上都添加斜杠。 It only happens on the OTRS site, not on my others handled by the same proxy. 它仅在OTRS网站上发生,而不在同一代理处理的其他网站上发生。

Here is sample of my proxy vhost file. 这是我的代理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>

I have checked out your config file, and i suggest you try to change 我已经签出了您的配置文件,建议您尝试更改

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

to

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

In the original config file, if you browse https://myotrs.mydomain.com/otrs/index.pl you will be redirect to https://myotrs.mydomain.com/otrs//index.pl . 在原始配置文件中,如果浏览https://myotrs.mydomain.com/otrs/index.pl,您将被重定向到https://myotrs.mydomain.com/otrs//index.pl And then, if you click the page, you will be redirect to https://myotrs.mydomain.com/otrs///index.pl . 然后,如果您单击页面,您将被重定向到https://myotrs.mydomain.com/otrs////index.pl Then you are stuck in the circulation. 然后,您陷入了循环。

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

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