capistrano - Trying to connect to my Rails web app results in a directory listing -
rails 3.2.18 ruby 2.1.5 capistrano apache2 phusion passenger ubuntu 14.04.2
i have been using capistrano deploy application. set of commands capistrano executes (after connecting repo , copying files):
cd /home/myapp/current rails_env=production rails_groups=assets bundle exec rake assets:precompile cp /home/myapp/shared/assets/manifest.yml /home/myapp/current/assets_manifest.yml touch /home/myapp/current/tmp/restart.txt echo \"deploy sidekiq reload $(date)\" >> /home/myapp/current/log/sidekiq.log screen -d -m sh -c 'cd /home/myapp/current && rails_env=production bundle exec sidekiq' cd /home/myapp/current && rails_env=production bundle exec rake sunspot:solr:stop cd /home/myapp/current && rails_env=production bundle exec rake sunspot:solr:start screen -d -m sh -c 'cd /home/myapp/current && rails_env=production bundle exec rake sunspot:solr:reindex'
recently, following deployment, instead going web application, when enter url, see directory listing of /home/myapp/current/public in browser.
i can start application manually doing:
cd ~/current sudo service apache2 stop rvmsudo bundle exec rails s -e production -p 80 -d
the problem here of rails app tasks start running root (writing files, files uploaded, etc), problematic , security risk. ideas?
Comments
Post a Comment