I\'m putting together a rails deployment where the public directory is a symlink to another directory on the system. This is with passenger 3 on nginx .8. It does\'t seem
I was able to do this with the guide linked below.
/var/www/html
default
./etc/nginx/nginx.conf
filesites-enabled
How to Deploy Ruby on Rails with Passenger and Nginx on Ubuntu 16.04
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.