我正在尝试打开我的网页http://moneytree.space/catalogs/traders但我得到了:
独角兽和 nginx 正在运行。我的工作目录是 /home/zhall/zoulfia
root@moneytree:/home/zhall/zoulfia# rails s -e production
=> Booting Unicorn
=> Rails 4.2.0 application starting in production on
http://localhost:3000
=> Run `rails server -h` for more startup options
=> Ctrl-C to shutdown server
当我输入:
在我的 /etc/nginx/sites-avalable/default 文件中,我得到:
我需要将 server_name 更改为 localhost 吗?我是所有这些配置的新手,任何帮助将不胜感激。谢谢你。也许我的服务器因为出现一些错误而关闭。我不知道在哪里追捕他们。我的日志文件是空的:(
我检查 nginx 配置:
sudo nginx -t
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful
当我启动 webrick 时:
Zoulfias-iMac:zoulfia zoulfiahall$ rails s -e production
=> Booting WEBrick
=> Rails 4.2.0 application starting in production on http://localhost:3000
=> Run `rails server -h` for more startup options
=> Ctrl-C to shutdown server
[2015-07-10 17:08:38] INFO WEBrick 1.3.1
[2015-07-10 17:08:38] INFO ruby 2.2.0 (2014-12-25) [x86_64-darwin13]
[2015-07-10 17:08:38] INFO WEBrick::HTTPServer#start: pid=18631 port=3000
我启动我的应用程序没有问题。
当 Unicorn 服务器启动时,我得到:
root@moneytree:/home/zhall/zoulfia# rails s -p80 -e production
=> Booting Unicorn
=> Rails 4.2.0 application starting in production on http://localhost:80
=> Run `rails server -h` for more startup options
=> Ctrl-C to shutdown server
root@moneytree:/home/zhall/zoulfia# ------> this line should not be here!
如何设置应用程序日志记录以查看错误?