AJPv13 is a binary protocol between Apache and Seaside. It was originally developed for Java Tomcat but there is nothing Java specific about it. Compared to conventional HTTP it has less overhead and better support for SSL.
Starting with version Apache 2.2 the required module mod_proxy_ajp is included with the default setup making it much simpler to use. The configuration looks almost the same as the one we saw in Section 23.3.5. The only difference is that you need to replace
proxy_ajp, and that the protocol in the URL of the rewrite rule is
ajp instead of
The adapted configuration looks like this:
<VirtualHost *> # set server name ProxyPreserveHost On ServerName www.appname.com # rewrite incoming requests RewriteEngine On RewriteRule ^/(.*)$ ajp://localhost:8003/appname/$1 [proxy,last] </VirtualHost>
On the Smalltalk side you need to load the packages
AJP-Pharo-Core directly with Monticello from http://www.squeaksource.com/ajp. More conveniently you can also use the following Metacello script:
(Smalltalk globals at: #ConfigurationOfAjp)
project latestVersion load: 'AJP-Core'
At that point you need to add and start the
AJPPharoAdaptor on the correct port from within your image (8003 in this example) and your web application is up and running with AJP.