符号链接到系统上的另一个目录.这是乘客3
Nginx .8.它似乎不喜欢这种设置.默认情况下,Nginx总是遵循符号链接,所以AFAIK不是做与Apache的FollowSymLinks等效的事情.
更新
看起来这里有这个:http://www.modrails.com/documentation/Users%20guide%20Nginx.html#application_detection
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.Detection of Rack applications happens
through the same mechanism,exception
that Phusion Passenger will look for
config.ru instead of
config/environment.rb.
所以我想知道是否有一些正确的配置符号可以解决这个问题.
解决方法
@H_502_39@ 我认为不可能使用符号链接的公共目录.我能想象的唯一解决方法是对公共目录中的任何文件和目录进行符号链接.# public folder: /data/public # app folder: /webapp/ mkdir -p /webapp/public && ln -sf /data/public/* /webapp/public/
对于/ data / public中的每个新文件或目录,您必须再次运行此命令.