Can my /public directory be a symlink with rails 3 + passenger 3 + nginx 0.8?

Can't you use the following:

mount --bind /original_path /your_ngnix_root_path

instead of using symlinks? For ngnix it would be a usual directory, why it will point to another directory as you wanted it to be.


I think it is not possible to use a symlinked public directory. The only workaround I can imagine is to symlink any file and directory inside of the public dir.

# public folder: /data/public
# app folder: /webapp/
mkdir -p /webapp/public && ln -sf /data/public/* /webapp/public/

For every new file or directory in /data/public you have to run this command again.