The Trinidad docs tell how to get a Jruby on Rails app up and running in detail, but can someone tell me / point me to a good tutorial on how to configure Apache to use the Trinidad server?
Asked
Active
Viewed 495 times
1 Answers
1
The Trinidad wiki describes how to configure AJP to connect Apache to Trinidad:
jruby -S trinidad --ajp 8099
Once Trinidad is configured to use AJP, you need to configure Apache to connect to AJP. First enable the ajp module:
$ sudo a2enmod proxy_ajp
Then, configure Apache to connect to ajp on the port you defined on Trinidad in the httpd.conf
file:
<VirtualHost *:80>
ProxyPass / ajp://localhost:8099/
ProxyPassReverse / ajp://localhost:8099/
</VirtualHost>
Check out the Trinidad page for more details on load balancing.
Finally, you should get Deploying with JRuby if you want to go deeper into how to configure and deploy your JRuby apps on Trinidad using Capistrano/Puppet. It's a very good book.

Sébastien Le Callonnec
- 26,254
- 8
- 67
- 80
-
Awesome!! thank you so much you're a lifesaver, seriously. Also, if I wanted to serve static assets from apache all I would need is `ProxyPass /assets !`, am I correct? Also for anyone reading this who would like to do this for an https site, this really helped: http://www.nczonline.net/blog/2012/08/08/setting-up-apache-as-a-ssl-front-end-for-play/ – Mohamed Hafez Feb 28 '13 at 16:14