Vasseurth
Vasseurth

Reputation: 6504

2 Rails Apps on Same Instance

I'm trying to deploy host a production instance for my rails 4 applications. I can currently (and successfully) host them using nginx, unicorn, and capistrano.

To save money I would like to host both of my rails 4 apps on the same instance. Is it possible to host multiple production environments, which would ideally be connected to different domains?

Thanks!

Upvotes: 0

Views: 116

Answers (2)

James
James

Reputation: 2293

You can run multiple rails applications by configuring each application to use a different unicorn socket.

You can then configure nginx sites (see /etc/nginx/sites-enabled/www.blah.com) to route to different unicorn sockets.

Have a look at these answers: multiple rails apps on nginx and unicorn

Upvotes: 1

bukk530
bukk530

Reputation: 1895

You need two separate virtual servers on nginx.

You can find more informations here: http://nginx.org/en/docs/http/request_processing.html

Upvotes: 0

Related Questions