Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8604391
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T02:33:43+00:00 2026-06-12T02:33:43+00:00

When run cap deploy can create some folders such as releases or shared .What’s

  • 0

When run cap deploy can create some folders such as releases or shared.What’s the relation between them and Apache or Nginx’s server root?

Is this method right?(This is a Nginx config)

server {
  listen 80;
  server_name www.yourhost.com;
  root /releases/...;   # Which path to be here???
  passenger_enabled on;
}

And also,after running cap deploy,can web server automatic restart?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T02:33:45+00:00Added an answer on June 12, 2026 at 2:33 am

    When you deploy, capistrano creates a folder in the releases folder, and then symlinks that folder to /your_app/current.

    Since the part of your rails app that you expose to the public is the public folder, you need to set the root in your nginx config to:

    root /path_to_your_app/current/public; 
    

    With each deploy the contents of current will effectively be refreshed from the source, any data not committed to the source control would be lost, and this is where the shared folder comes in. The shared folder will contain things which aren’t going to be in the version control, but that you don’t want to lose with each deploy – application logs, uploaded images, etc.

    Here’s a good example of how to use the shared folder for uploads: http://www.simonecarletti.com/blog/2009/02/capistrano-uploads-folder/

    Restarting the web server can be achieved with the following task in your deploy.rb:

    namespace :deploy do
      task :restart do
        run "touch #{current_path}/tmp/restart.txt"
      end
    end
    

    Phusion passenger monitors for this file, and will trigger a restart when it’s created.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

When I run cap deploy , Capistrano will attempt to create a folder such
When I run my cap deploy, it complains that it can't access the log
Everytime I run cap deploy in the remote server I lost some unversioned files
My run of cap deploy fails, and I think it's because of a formatting
If I execute cap deploy from a workstation how can I specify custom feedback
Im having some problems getting capistrano to deploy. As far as i can tell
Each time i run on my local machine cap:deploy i get next error when
I get this error when running cap:deploy I already run apt-get update and apt-get
When I run cap deploy at a certain point towards the end of the
I run cap deploy and got the following problem, ** [out :: 122.248.240.239] Installing

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.