AnsweredAssumed Answered

Apache + Alfresco Proxy

Question asked by dough on Oct 3, 2009
Latest reply on Apr 7, 2011 by bensewell
I have found several close solutions on these forums and through google, but nothing that exactly matches my desired results.  Here is what I am hoping to configure.

I want to be able to have the users access Alfresco Explorer and Alfresco Share like the following:

http://alfresco.somedomain.com
http://share.somedomain.com

I have attempt to use Apache configurations exclusively, but these only resulted in the following valid URL

http://www.somedomain.com/alfresco  OR  http://alfresco.somedomain.com/alfresco

I would prefer not to have the user add the "/alfresco" subdirectory OR "/share" subdirectory.

Here is the Apache virtual host configure I used.

<VirtualHost *:80>
ServerName alfresco.somedomain.com
ProxyRequests On
ProxyPreserveHost On
ProxyPass / http://www.somedomain.com:8080/alfresco
ProxyPassReverse / http://www.somedomain.com:8080/alfresco
ProxyPass /share http://www.somedomain.com:8080/share
ProxyPassReverse /share http://www.somedomain.com:8080/share
</VirtualHost>

This works, but it requires the user to type in the ServerName plus the subdirectory (i.e. http://www.somedomain.com/alfresco).  I want the user to only be required to remember http://alfresco.somedomain.com

I also attempt the following solution, which is a combination of Tomcat proxy configuration with AJP and Apache virtual host configuration.  I found this solution here http://forums.alfresco.com/en/viewtopic.php?f=9&t=13254

Add to /opt/alfresco/tomcat/conf/server.xml

<Service name="Catalina">

    <!– Define an AJP 1.3 Connector on port 8009 –>
    <Connector port="8009"
               enableLookups="false" redirectPort="8443" protocol="AJP/1.3" />

  </Service>

Apache configuration

<VirtualHost *:80>
ServerName alfresco.somedomain.com
ProxyRequests On
RewriteEngine On
RewriteLogLevel 3
RewriteLog "/var/log/httpd/rewrite.log"
RewriteRule ^/(.*) ajp://127.0.0.1:8009/alfresco$1 [P,L]
</VirtualHost>

However this solutions shows a blank page with the URL being rewritten to http://alfresco.somedomain.com/alfresco/.  If I change the Apache RewriteRule to this:

RewriteRule ^/alfresco(.*) ajp://127.0.0.1:8009/alfresco$1 [P,L]

Then the following URL works http://alfresco.somedomain.com/alfresco.  But once again, I would prefer that the user only need to type in http://alfresco.somedomain.com

Any assistance would be appreciated.

Doug

Outcomes