title: Alfresco Share login error behind reverse proxy
body: <p>I configure my Alfresco instance to be in a sub-URI (www.example.com/prefix/alfresco , www.example.com/prefix/alfresco/share) and all looks to be fine except that I can't log in Shared. The Catalina.out log this error:</p>
  
  <blockquote>
    <p>ERROR [alfresco.web.site] [http-apr-28080-exec-10]
    javax.servlet.ServletException: Possible CSRF attack noted when
    asserting referer header
    '<a href="http://www.example.com/prefix/alfresco/share/page/" rel="nofollow noreferrer">http://www.example.com/prefix/alfresco/share/page/</a>'. Request: POST
    /prefix/alfresco/share/page/dologin, FAILED TEST: Assert referer POST
    /prefix/alfresco/share/page/dologin :: referer:
    '<a href="http://www.example.com/prefix/alfresco/share/page/" rel="nofollow noreferrer">http://www.example.com/prefix/alfresco/share/page/</a>' vs server &amp;
    context: <a href="http://10.140.8.144/" rel="nofollow noreferrer">http://10.140.8.144/</a> (string) or  (regexp)</p>
  </blockquote>
  
  <p>Then the browser show me this page (www.example.com/prefix/alfresco/share/dologin):</p>
  
  <blockquote>
    <p><strong>Something's wrong with this page...</strong></p>
    
    <p>We may have hit an error or something might have been removed or
    deleted, so check that the URL is correct.</p>
    
    <p>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.</p>
    
    <p>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.</p>
  </blockquote>
  
  <p>I tried to deactivate the CSRF filter in share-config-custom.xml, but then I can't log and I don't have any message in the log, the login page show:</p>
  
  <blockquote>
    <p>Your authentication details have not been recognized or Alfresco may
    not be available at this time.</p>
  </blockquote>
  
  <p>My apache conf:</p>
  
  <blockquote>
    <p>ProxyPass           /prefix/alfresco<br>
    <a href="http://10.140.8.144:28080/prefix/alfresco" rel="nofollow noreferrer">http://10.140.8.144:28080/prefix/alfresco</a> ProxyPassReverse<br>
    /prefix/alfresco   <a href="http://10.140.8.144:28080/prefix/alfresco" rel="nofollow noreferrer">http://10.140.8.144:28080/prefix/alfresco</a></p>
    
    <p>ProxyPass           /prefix/alfresco/share<br>
    <a href="http://10.140.8.144:28080/prefix/share" rel="nofollow noreferrer">http://10.140.8.144:28080/prefix/share</a> ProxyPassReverse<br>
    /prefix/alfresco/share   <a href="http://10.140.8.144:28080/prefix/share" rel="nofollow noreferrer">http://10.140.8.144:28080/prefix/share</a></p>
  </blockquote>
  
  <p>I could log before configure Alfresco for work in the reverse proxy.</p>