views:

20

answers:

1

Confused here, how will pointing nginx to the /public folder make a RoR application run? The public folder doesn't have any of the .rb files in it?

Does it somehow access the folders below?

+2  A: 

This is just how Passenger works. You point the web server at the public folder (out of which it will serve static assets) and say that it belongs to a rails/rack app. Passenger then starts the app that the public folder is within.

thenduks
strange that it does that, but ok! you would think it would access sub-folders, not parent folders.
Blankman
Well, not really. You're telling the webserver "serve the files in here, oh, and by the way, these static files are used as part of a rails app". So you certainly wouldn't want the app code as subfolders of public, and likewise the webserver doesn't really care about the app files (passenger, the apache module, handles those).
thenduks