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

后端 未结 3 2019
攒了一身酷
攒了一身酷 2020-12-17 02:23

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

3条回答
  •  天命终不由人
    2020-12-17 02:59

    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.

提交回复
热议问题