0

I want to set up rails to use Nginx instead of WEBrick by default when I use $rails server

From my googling, it seems that this could possibly be done via. Rack. If so, where is the directory for the Rack file? Or maybe it can be done with Nginx config files?

Could anyone please help me with this setup? I am using Rails 4.2, Ruby 2.1.5, Nginx 1.4.6, Ubuntu 14.04

or.... Is there a terminal command to start the app with nginx? ie. instead of $rails s, something else that will load the web app on localhost:3000

nvrpicurnose
  • 677
  • 2
  • 6
  • 17
  • I think Ngnix is an web server so to run application you need one application server here are some app servers you can usrr Phusion Passenger, Unicorn, puma etc. – Amit Sharma Apr 02 '15 at 20:31
  • To setup your app with nging & passenger here is the link https://www.digitalocean.com/community/tutorials/how-to-install-rails-and-nginx-with-passenger-on-ubuntu – Amit Sharma Apr 02 '15 at 20:32

1 Answers1

0

This other question shows how to change the default webserver:
How to change the default rails server in Rails 3?

You could adapt the instructions to use Nginx, as it is still valid for Rails 4.*

Community
  • 1
  • 1
The Fabio
  • 5,369
  • 1
  • 25
  • 55