Jetty AJP

Document created by resplin Employee on Jun 6, 2015
Version 1Show Document
  • View in full screen mode

Obsolete Pages{{Obsolete}}

The official documentation is at: http://docs.alfresco.com



In some situation, you want to put a proxy in front of Sharepoint.
For instance the proxy is a SSL layer, see e.g MNT-7135
Or the porxy is an external authentication layer.

You may want to make the proxy talk to the backends (alfresco and sharepoint) using AJP and not HTTP.
In tomcat (alfresco) AJP is supported by default.

To enable AJP in the embedded jetty, you will need to download the AJP jetty JAR.

This wiki details the configuration process.

It is pretty straightforward to configure Jetty for AJP. And in this case request.getScheme returns desired scheme for FileOpenDialog.ftl. So, it works.

1. To be able to handle AJP protocol we need to configure vtiServerConnector in vti-context.xml to use org.mortbay.jetty.ajp.Ajp13SocketConnector

<bean id='vtiServerConnector' class='org.mortbay.jetty.ajp.Ajp13SocketConnector'>
<property name='port'>
<value>$
{vti.server.port}

</value>
</property>
<property name='headerBufferSize'>
<value>8192</value>
</property>
</bean>


2. Since AJP functionality doesn't come OOB with Jetty basic libraries, we have to add jetty-ajp-6.1.14.jar into Alfresco. Usually it's placed in the jetty/lib/ext folder in the distribution package.

3. See sample Apache configuration http-ssl-alfresco.conf below

<IfModule mod_ssl.c>

   SSL name based virtual hosts are not yet supported, therefore no
   NameVirtualHost statement here
   Listen 443
   Listen 643
   AddType application/x-x509-ca-cert .crt
   AddType application/x-pkcs7-crl .crl
   SSLSessionCache 'shmcb:C:/php-tools/Apache2.2/logs/ssl_scache(512000)'
   SSLSessionCacheTimeout 300
   SSLMutex default
   </IfModule>

NameVirtualHost *:443
NameVirtualHost *:643

<VirtualHost *:443>
ServerName thinkarsen

SSLEngine on
SSLCertificateFile 'C:/php-tools/Apache2.2/conf/server.crt'
SSLCertificateKeyFile 'C:/php-tools/Apache2.2/conf/server.key'
ErrorLog 'logs/alfresco-proxy-error.log'
ProxyRequests Off

<Proxy *>
Order deny,allow
Allow from all
</Proxy>

   Proxy to Alfresco
   ProxyPass /alfresco/ http://192.168.0.125:8080/alfresco/
   ProxyPassReverse /alfresco/ http://192.168.0.125:8080/alfresco/

ProxyPass /share/ http://192.168.0.125:8080/share/
ProxyPassReverse /share/ http://192.168.0.125:8080/share/

</VirtualHost>

<VirtualHost *:643>
ServerName thinkarsen

SSLEngine on
SSLCertificateFile 'C:/php-tools/Apache2.2/conf/server.crt'
SSLCertificateKeyFile 'C:/php-tools/Apache2.2/conf/server.key'
ErrorLog 'logs/vti-proxy-error.log'
ProxyRequests Off

<Proxy *>
Order deny,allow
Allow from all
</Proxy>

   Proxy to Vti
   ProxyPass / ajp://192.168.0.125:7070/
   ProxyPassReverse / ajp://192.168.0.125:7070/

ProxyPreserveHost On

</VirtualHost>

Attachments

    Outcomes