Skip to content

Building a RoR Production Server Part 7: Nginx

sentient06 edited this page Jan 8, 2013 · 2 revisions

Now we need the reverse proxy. In short, this is the responsible to fetch all information to the browser. If you want more details, check this wikipedia page.

This should be quick:

 $ sudo -s
 # apt-get install python-software-properties
 # apt-get install nginx
 # exit

And we are done. Nginx is a service (and so is Thin), and can start and stop with the commands:

 $ sudo service nginx stop
 $ sudo service nginx start
 $ sudo service nginx restart

In the deployment process, though, we are not going to use the last one. It seems Nginx ignores a few potentially changed files when we simply restart it. better safe than sorry.