Skip to content

Instantly share code, notes, and snippets.

View alvinang's full-sized avatar

Alvin Ang alvinang

View GitHub Profile
@FooBarWidget
FooBarWidget / gist:4133511
Created November 23, 2012 01:00
Ruby deployment overview, 2010

(Originally from http://stackoverflow.com/questions/4113299/ruby-on-rails-server-options/4113570#4113570)

The word "deployment" can have two meanings depending on the context. You are also confusing the roles of Apache/Nginx with the roles of other components.

Apache vs Nginx

They're both web servers. They can serve static files but - with the right modules - can also serve dynamic web apps e.g. those written in PHP. Apache is more popular and has more features, Nginx is smaller and faster and has less features.

Neither Apache nor Nginx can serve Rails apps out-of-the-box. To do that you need to use Apache/Nginx in combination with some kind of add-on, described later.

Apache and Nginx can also act as reverse proxies, meaning that they can take an incoming HTTP request and forward it to another server which also speaks HTTP. When that server responds with an HTTP response, Apache/Nginx will forward the response back to the client. You will learn later why this is relevant.