0

你好,我有 nginx 和乘客,我设置 vhost 并运行

rvmsudo rails new
rvmsudo rails g scaffold user name:string surname:string
rvmsudo rake db:create
rvmsudo rake db:migrate

(一切都好)

当我在浏览器上查看时,我得到了欢迎页面.. 好的很酷,但是如果我点击 About your application’s environment我进入404 Not Found error.log 我有 open() "/var/www/default/public/rails/info/properties" failed (2: No such file or directory)

和 servername.tld/users 也不起作用:-(这里有什么问题?谢谢

编辑:nginx.conf

http {
    passenger_root /home/lukas/.rvm/gems/ruby-1.9.3-p448@rails3/gems/passenger-4.0.14;
    passenger_ruby /home/lukas/.rvm/wrappers/ruby-1.9.3-p448@rails3/ruby;
...

虚拟主机

server {
 listen *:80;
 server_name hostname.org www.hostname.org

 passenger_enabled on;
 rails_env production;
 root /var/www/default/public;

 error_log /opt/nginx/logs/vhosts/default/error.log;
 access_log /opt/nginx/logs/vhosts/default/access.log combined;
}

如果我rvmsudo rails s在端口 3000 上运行一切正常,但我想使用 nginx。

4

1 回答 1

0

server_name 指令中缺少;.. ohmy :-)

于 2013-08-30T13:08:04.597 回答