Web Server Selection for Rails - ruby-on-rails-3

My problem relates to having several different web applications (PHP & Rails) running on one server and deciding which server to use for Rails since it will be coexisting with a few PHP apps currently running on apache2 and there are a few choices out there when it comes to serving Rails apps.
We have a new Debian "Squeeze" server set up running Apache2. This server hosts PHP applications and we were asked to bring over a Ruby on Rails project and run it on this box.
The Rails app will not get too much traffic because it's a micro site for some of our business partners.
With that type of environment, what's the best app server choice for the Rails app knowing that Apache2 is already serving up PHP apps?
1) Apache2 with Phusion Passenger
2) Mongrel
3) Webrick
4) Something else?

Take a look at thin. It has native SSL support, its very lightweight and easy to setup (a line in your gemfile) and wouldn't interact with any other servers running on the host.

The Rails app will not get too much traffic because it's a micro site for some of our business partners.
Seems like Passenger would be a good fit as it's easy to configure to spawn/kill workers depending on the current traffic so you might save some resources most of the time.

Related

How to make a server with old computer

I want to make a server on my old PC.I have easyphp 5.3 and open port is 8888.I can find my Wan IP.How to make a server that i can access to php and html files on www directory from other PC's?
EasyPHP includes Apache (a web server), mySQL (a database you can use with web applications) and PHP (a language you can use to program web applications).
So you've got a good start :)
SUGGESTION:
Work through a couple of tutorials:
See if the EasyPHP web site has a tutorial.
Or better, Google for ANY tutorial on "Apache, PHP and mySQL"
There are also many books available.
ALSO:
To access your server by name, you'll need DNS.

requirements for a rails app

I have made a rails application for a student group. I want to launch the application through the Berkeley Open Computing Facility (OCF). I currently have the app running on Heroku, but the OCF provides storage on the order of GigaBytes, which is more than I can get for free at Heroku.
However, the OCF claims that
"Ruby 1.8.7 is installed and supported.
Frameworks like Django, Rails, flavor-of-the-month probably work, but are not supported."
Will it be possible to run the app through OCF hosting? Or must the host explicitly support Rails?
The host needs to be able to support some web stack that rails can run under. This would include both an HTTP Server (Apache, Nginx, etc) and an Application server (Passenger, Unicorn, etc). If they have that, and you have permissions to wire up an application - then you can install Rails.
Wiring up the application will involve modifying configuration files and restarting the Application server. So make sure you (or someone that can help you) has permissions to do so before trying to proceed.

Web server to host Sencha app?

I am looking to develop some web app for my Android device. Found Sencha and think it might be a good tool to try out.
I suppose I would need to find a web server to host the Sencha app to run the app? What kind of web server is needed? I suppose one that able to run HTML5, CSS, Javascript is enough?
Can anybody recommend one (free one)?
Thanks.
++++++++++++
Thanks for the answers to the above post. I am new to this stuff, so got some more follow-up and somewhat related questions:
1) I read from the Sencha site that the app can be developed locally using things like XAMPP installed on local Windows PC. Question -- Why need this local host when I can just use an external Web Host?
2) It was also mentioned that for Windows may not need XAMPP if Window's Internet Information Server (IIS) is already running. How do I know if my computer is running this and so don't need to install another local server? (I asking this because I had installed an XAMPP before on another computer and things got quite messed up and so I want to avoid doing it if possible).
3) Once I got a web host, to have an app running, I would just have to have the JS files in the web host together with the Sencha framework right? If so, then I don't understand what is meant by "Build" in the Sencha documentation.
Thanks.
Sencha Touch is a client side framework, therefore there are no server side requirements. That said, any web host should do.
However, I'll go ahead an make a recommendation... a LAMP stack (Linux, Apache, PHP, MySql) will work the best. Of course you can substitute any of the stack for something of your favor, this setup seems to be the most favorable. Some of my colleagues utilize Ruby/RoR instead of PHP, so as you can see it is quite flexible in terms of environment.
When searching for a hosting provider, do your research and select something that fits with your budget but still gives you the best bang for your buck. Be sure to ask them questions!
Tip: Make sure you have access to your web server's configuration file so you can add mime_types and make other mobile oriented tweaks if needed.
First you must know that HTML5, CSS and Javascript are all front end stuff that do not count when you talk about Hosting. These are taken care of by the client agent (browser).
What really matters is your server side language: PHP, Python(Django), Ruby, etc.
So it mainly doesn't matter which framework, as much as which language that framework use.
This is a generic answer that will help you decide not only in terms of Sencha but for any other framework.
Take for instance WordPress. It uses PHP and MySQL, so first I look if my Web host supports Mysql and PHP and in general this would be enough to know that I can use if for my WordPress site.
And by the way, most Web host companies allow you to ask them questions before buying. So go ahead and question them about anything that concerns your requests.
Sencha provides an app hosting service through its Sencha.io cloud services.

Server Setup: Based on Apache and Tomcat needs

I'm trying to setup a server based on our needs for a new website. Basically, I need to build a website based on social engine, and according to the platform's requirements (found here: http://www.socialengine.net/support/documentation/article?q=152&question=SocialEngine-Requirements) it requires the webserver to be Apache based.
Now my issue comes with the addition of a web application that needs to be included in the site. The web application requires the server to be capable of Asynchronous Request Processing, and is currently only supported by Tomcat or GlassFish.
I found a couple tutorials such as this one http://www.serverwatch.com/tutorials/article.php/2203891/Integrating-Tomcat-with-Apache.htm that explain how to "integrate" Tomcat into Apache. Would a server running Tomcat alone be able to handle the applet needs as well as serve the Apache (assuming HTTP) needs from the Social Engine platform? Are there any hosting providers any of you would reccomend?
Although I've done alot of front end stuff before, this is the first time i have to deal with any of the back end details, so my knowledge of server side functionality is really garbage. Please let me know if I'm not asking the right questions.
Thanks
You wouldn't really be able to use Tomcat for both apps, since the other one needs PHP. It's pretty common to have both Tomcat and Apache running on the same server. You might want to look up more recent documentation on mixing them, even this but definitely have a look at mod_proxy_ajp.
What's the other application? It's a little tricky to set up Asynchronous Request Processing if you are new to server apps, but there is also a lot of documentation, so if you're game, you can probably figure it out OK. You might also want to see if that app would work with node.js (hosting info here)
If you want to set it all up yourself, you could get a virtual private server from Rackspace Cloud or similar host or get a shared host that has the required apps already set up, which would limit your ability to customize the environment and may require 2 hosting plans, but would be easier to set up. It also somewhat depends on if both apps need to be on the same machine for any reason and/or on the same domain.
A regular LAMP stack will run SE4 just fine, however, you will need to do some tuning to get the page loads under 3 seconds. You will want to remove any Apache modules that you aren't using with a2dismod. For instance, if you're not using any Ruby on the site, a2dismod ruby. This will help get memory usage under control. APC is a must.
For a much more in depth read on tuning php/apache, please read this: Performance tuning on Apache, PHP, MySQL, WordPress v1.1 – Updated

Production Grade Server Software

I am currently using XAMPP to test and Run my website on my Laptop.
Is there any (Good,Production Grade,Free,AMP based) server software?
Or Can I manually fix the security holes in XAMPP (like no password for 'root') to bring it up to production level?
Platform : Windows
Technologies: Apache, MySQL, PHP
Requirements: Hosting on Own server
Priveleges: Easy installation and configuration
You're best off just setting things up yourself. It's not that difficult, especially since there are scores and scores of guides around the web. Trying to bring XAMPP up to production quality would be just as much work. Here are some links:
Ubuntu LAMP
Debian LAMP
Fedora LAMP
Arch Linux LAMP
WAMP (Windows)
You can easily find more by doing a Google search.
Why not simply use official Apache? It's the most-used Production http server in the world.
Can you expand your question with details on your platform and requirements?
You would be better off configuring the full stack yourself. This ensures that you know what's running, and how it's configured. Even if you use a bundle (I highly recommend Zend Server if you do), you would need to run through the service configurations anyway. Never rely on anything out-of-box in a production environment.
If you do configure the stack yourself, Google is your friend, and there are plenty of resources here to help as well.