It's possible install a LAMP configuration in my existing Ubuntu and Ruby Droplet?

March 1, 2016 521 views
LAMP Stack

It's possible install a LAMP configuration in my existing Ubuntu and Ruby Droplet? This is just for testing purpose.

Thanks!

1 Answer

It is definitely possible to install a Ruby on Rails app alongside the LAMP-stack. Though there are a few things to keep in mind. In particular, only one process can bind to port 80 at a time. So how you set them up depends on how you are already are running the Rails app.

There are a few ways to approach it. If you are running the Rails app behind Apache using something like Passenger, then just adding a new virtual host should work fine. These tutorials should point you in the right direction:

If you run it behind Nginx, using the LEMP stack rather than LAMP might make more sense:

But you could also proxy from Nginx to Apache:

by Etel Sverdlov
This tutorial covers combining apache and nginx to serve sites with more speed. This article takes you from a fresh DigitalOcean droplet to one where apache and nginx are configured to work together.
Have another answer? Share your knowledge.