0

I have a Ruby on Rails application and a couple of PHP projects nearly complete (all using MySQL) that I'd like to host on a Linode server and need some help with what I'd need to install and configure to do this. They would each have their own separate domain (probably with GoDaddy).

I'm not looking for a step-by-step instructions - more of a guide of what I should look into and research to be able to do this myself.
I'm not an expert at linux and this will be my first time using Linode and putting a Rails app into production so any advice is welcomed!

Thanks

  • You would treat your Linode VPS exactly as you would any physical machine: Install a web server, PHP, Ruby, and the extensions/modules/gems you require to meet your specific needs. We can't give you anything more specific than this - you need to evaluate your own environment... – voretaq7 Oct 19 '12 at 20:36

1 Answers1

0

Nginx, Apache and lighttpd have each a function for creating Virtual Hosts (vHosts).

With this functionality you can serve diefferent websites and webapps on one domain. The websites are identified by the Host header that is sent with every HTTP request.

I can only speak for myself but I really like nginx as a webserver so I can tell you what you need for nginx.

To add PHP to a nginx server you can use either the CGI version of PHP or PHP-FPM for easier configuration and management.

To add Rails apps you you should look into phusion passenger.

So for a little overview what you need:

  • A suitable linux distribution (I like debian very much)
  • A webserver (Apache, nginx, lighttpd, cherokee, ...)
  • PHP(-FPM)
  • Ruby and Rails
  • MySQL
  • Decide for a DNS Provider (GoDaddy, Namecheap, ... for renting the domain, Cloudflare for hosting it ...)

Maybe you should try setting up a full webserver stack at home.

Another thing is to decide if you want to split your applications accross several servers. For example you can put MySQL on a single VPS. Then nginx can be run on a specific server and the apps on another.

Christopher Perrin
  • 4,811
  • 19
  • 33
  • wow great info, thank you! I will give nginx a go since I've heard it being recommended a few times now over others. I'm not sure about splitting the apps across several servers since it will probably cost more and these are only personal projects after all. Is there a performance improvement by doing that? or is it just for better organisation? – user1168320 Oct 01 '12 at 11:07
  • The splitting is for bigger projects. This will give you more performance. But keep in mind that a VPS in not nessessarily cheaper than a root server. Just look around for some offers. – Christopher Perrin Oct 01 '12 at 15:08