簡體   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