我有一个带乘客的nginx服务器我试图在rails应用程序上运行ruby。我正在使用rbenv并使用capistrano进行部署。
我不断收到如下错误消息:
directory index of "[/srv/[directory]]" is forbidden, client: [my client ip], server: [my domain], request: "GET / HTTP/1.1", host: "[my domain]"
我的网站的nginx配置:
server {
listen 80;
server_name [my domain];
passenger_enabled on;
rails_env production;
root /srv/[my app name]/current/public;
passenger_ruby /home/deploy/.rbenv/shims/ruby;
# redirect server error pages to the static page /50x.html
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
passenger_enabled on;
}
location / {
passenger_enabled on;
}
}
我的nginx.conf文件中的乘客配置如下:
passenger_root /usr/lib/ruby/vendor_ruby/phusion_passenger/locations.ini;
passenger_ruby /home/deploy/.rbenv/shims/ruby;