2016-12-16 113 views
0

我將我的Alfresco實例配置爲一個子URI(www.example.com/prefix/alfresco,www.example.com/prefix/alfresco/share),並且所有外觀很好,但我無法登錄共享。 catalina.out的日誌這樣的錯誤:Alfresco在反向代理服務器上共享登錄錯誤

ERROR [alfresco.web.site] [http-apr-28080-exec-10] javax.servlet.ServletException: Possible CSRF attack noted when asserting referer header ' http://www.example.com/prefix/alfresco/share/page/ '. Request: POST /prefix/alfresco/share/page/dologin, FAILED TEST: Assert referer POST /prefix/alfresco/share/page/dologin :: referer: ' http://www.example.com/prefix/alfresco/share/page/ ' vs server & context: http://10.140.8.144/ (string) or (regexp)

然後,瀏覽器顯示此網頁(www.example.com/prefix/alfresco/share/dologin):

Something's wrong with this page...

We may have hit an error or something might have been removed or deleted, so check that the URL is correct.

Alternatively you might not have permission to view the page (it could be on a private site) or there could have been an internal error. Try checking with your Alfresco administrator.

If you're trying to get to your home page and it's no longer available you should change it by clicking your name on the Alfresco toolbar.

我試圖停用CSRF過濾器共享配置,custom.xml,但我無法登錄,我沒有在日誌中的任何消息,在登錄頁面顯示:

Your authentication details have not been recognized or Alfresco may not be available at this time.

我的Apache的conf:

ProxyPass /prefix/alfresco
http://10.140.8.144:28080/prefix/alfresco ProxyPassReverse
/prefix/alfresco http://10.140.8.144:28080/prefix/alfresco

ProxyPass /prefix/alfresco/share
http://10.140.8.144:28080/prefix/share ProxyPassReverse
/prefix/alfresco/share http://10.140.8.144:28080/prefix/share

我可以在配置Alfresco之前在反向代理中工作。

回答

1

無需停用CSRF過濾器。如果您按照documentation中所述更改了上下文路徑,則需要確保tomcat連接器「知道」外部上下文(主機名,端口,上下文)。

要麼

  • 組的proxyName和proxyPort
  • Tomcat中的server.xml和組所需的代理報頭中的Apache 變量(X-轉發換,X-轉發-通過, X-
  • 集RemoteIpValve轉發-原)
  • 使用proxy_ajp代替proxy_http和 Tomcat的限定AJP連接