mod_xsendfile with symbolic links

前端 未结 1 617
旧时难觅i
旧时难觅i 2021-01-02 13:19

I\'m running into an issue using xsendfile with my Rails 3 app.

I\'m using capistrano to manage deployments and in each release, there is a symbolic link to the shar

相关标签:
1条回答
  • 2021-01-02 13:56

    Are you creating the link using an after "deploy:finalize_update" task similar to this:

    task :storage_link, :except => { :no_release => true } do
        run "ln -nFs #{deploy_to}/shared/assets #{latest_release}/assets"
    end
    

    This makes XSendFilePath see the link as /var/www/site/current/assets which puts it inside of the root path.

    Also make sure the user running your app owns and has write permissions on /var/www/site/shared/assets.

    0 讨论(0)
提交回复
热议问题