title: Can my /public directory be a symlink with rails 3 + passenger 3 + nginx 0.8?
body: <p>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 to like that setup. Nginx always follows symlinks by default, so AFAIK it's not a matter of doing the equivalent of Apache's +FollowSymLinks.</p>
  
  <p><strong>update</strong></p>
  
  <p>Looks like this is covered here: <a href="http://www.modrails.com/documentation/Users%20guide%20Nginx.html#application_detection" rel="noreferrer">http://www.modrails.com/documentation/Users%20guide%20Nginx.html#application_detection</a></p>
  
  <blockquote>
    <p>Note that Phusion Passenger for Nginx
    does not resolve any symlinks in the
    root path. So for example, suppose
    that your root points to
    /home/www/example.com, which in turn
    is a symlink to
    /webapps/example.com/public. Phusion
    Passenger for Nginx will check for
    /home/www/config/environment.rb, not
    /webapps/example.com/config/environment.rb.
    This file of course doesn’t exist, and
    as a result Phusion Passenger will not
    activate itself for this virtual host,
    and you’ll most likely see some output
    generated by the Nginx default
    directory handler such as a Forbidden
    error message.</p>
    
    <p>Detection of Rack applications happens
    through the same mechanism, exception
    that Phusion Passenger will look for
    config.ru instead of
    config/environment.rb.</p>
  </blockquote>
  
  <p>So I wonder if some proper symlinking of config.ru might do the trick.</p>