Deploying Apache Solr - ruby-on-rails

I've been experimenting with Apache SOLR and I'm ready to integrate it with a rails application. However, I'd like to make sure I know how to deploy solr. I currently have the rails application deployed using passenger+nginx. Is it possible to deploy SOLR using nginx as well? If so, how would I do that? Otherwise, what is the preferred method of deployment? Thanks!

Solr needs to run in a Java EE application server. You can use Jetty or Tomcat. Nginx will act as a proxy via AJP or something simliar to forward all RESTless request to Solr. I haven't used my ajp with nginx but I have read about this. Essentially you will have a Java EE application server, Rails server, nginx, passenger and ajp proxy running all at the same time.
You can also setup a proxy pass and there is a tutorial here. Explore different options to see which one is bet for you.

Related

How to deploy a Ruby on Rails app to AWS-EC2 Ubuntu Linux using Apache 2?

We want to configure Apache to work with a Rails app. We want Apache to do load control. We cannot get them to work together. We are using MySQL for the database. If we could please have some type of instruction or tutorial to follow to be able to deploy our application in AWS-EC2, it will be greatly appreciated.
We have a domain and we want to have multiple Rails app running in the same domain. Each rails app seems to want to run in a different port. We do not want to expose port 80/443. Apache is managing the inbound request. My attempts to use the host file has not been successful.

Deploying Java war and Rails app to Apache in Amazon EC2

is it possible to deploy java app and rails app to same EC2 sever. I have a rails app that communicates a java app via AJAX so I need to deploy both to same server. Is there any way to do that or any resource to see how to?
I guess it is possible by using apache2 with tomcat and passenger. Is it true?
You can install two servers in diferent ports i.e. Apache HTTP on 80 and Apache Tomcat (or other) on 8080. Also you can use mod_jk if you want attend all your clients through Apache HTTP. MOD_JK enables to you to integrate Apache Tomcat and Apache HTTP.

Starting Rails server on boot on CentOS

I'm pretty new to rails and trying to figure things out, I looked online but not much luck.
I have some servers that are running rails on startup without using rc.local at all, but I can't figure out why.
All I need is for rails to start on boot in production mode on port 80 (instead of 3000, as the rest of the servers also start on port 80).
Any ideas?
ATM relaying on webrick
Have a look at setting up nginx with ruby enterprise edition.
Check out Phusion Passenger. It supports both the standard Apache web server and Nginx web server.
http://www.modrails.com/

Apache Tomcat and Ruby

We have Ruby Rails and Apache tomcat servers running on the samw windows server. When the App on Apache Tomcat is installed alone its working fine, but when the ruby app is installed, the Apace Tomcat App stops working. We need to have both the apps running on the same server. Please help. The application running on Tomcat is displaying the login screens and allowing the users the login. And then rest of the things are failing. The application running on Ruby is just fine as expected. Also, we installed Apace Tomcat and then Ruby on to this server. so there are a lot of chances that the Ruby took Tomcat's port. But how to figure out the overlap?
You probably have both trying to bind to port 80. Whatever server you're using for rails (passenger via nginx/apache http server, nginx+thin/mongrel, etc) is bound to port 80, then tomcat tries to do the same and can't.
If you're using nginx, I would configure tomcat to run on 8080 and reverse proxy http requests to tomcat based on the hostname of part of the url.
You can do this too with apache http server with mod_proxy.

Can I run LAMP and Rails from the same Apache instance?

We have a RedHat box with Apache2, PHP5 and MySQL 5 for much of our development. Now, we have a Rails client, and we need to set up a Rails app on the same server. Can we install Ruby and the Rails framework with the same Apache, or should we avoid this? Why or Why not? Is it possible to direct subdomains to either PHP or Ruby in the individual V-host definitions?
Yes, you can configure your virtual hosts to Rails, PHP, or anything else with the proper configuration. The details depend largely on how you are connecting to Rails, but generally however you would configure a single purpose Apache server should work for the virtual hosts.
Yeah - Install passenger, then you can configure your sites through your apache conf files. The passenger docs contain everything you'll need to know!

Resources