I am running Passenger with Apache2 on Ubuntu. I’m trying to get an idea what I should be looking at, and my suspicion lies with my Capistrano configuration / permissions.
My application seems to be deployed to current as expected. I can see all the project files. I see a symlink in the current/public directory to shared/system. When I look at the contents of shared/system, there is nothing, no symlink or files. Is this correct? Is a symlink missing?
Capistrano deployment file:
https://github.com/danieldbower/passhasher/blob/master/config/deploy.rb
Logged message in Apache:
Apache/2.2.16 (Ubuntu) Phusion_Passenger/3.0.2 mod_ssl/2.2.16 OpenSSL/0.9.8o configured — resuming normal operations
Directory index forbidden by Options directive: /var/www/passhasher/
Apache Config:
Alias /passhasher /var/www-rails/passhasher/current/public
<Directory /var/www-rails/passhasher/current/public>
AllowOverride all
Options -MultiViews
</Directory>
This is the default folder in which you keep all files not related to a particular version of your deployment.
I put the users’ uploads inside.
Have a look here:
http://blog.alastairdawson.com/2007/03/13/stop-uploaded-files-getting-deleted-with-capistrano/