1
我試圖打開我的網頁http://moneytree.space/catalogs/traders,但我得到:Safari瀏覽器無法連接到服務器(nginx的,麒麟,Ubuntu的,鐵軌,MySQL的)
麒麟和Nginx的運行。我的工作目錄是/ home/zhall/zoulfia
[email protected]:/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的/網站,avalable /默認文件我:
我需要改變服務器名稱爲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
我沒有問題,開始我的應用程序
在麒麟服務器啓動時,我得到:
[email protected]:/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
[email protected]:/home/zhall/zoulfia# ------> this line should not be here!
如何設置應用程序日誌以查看錯誤?
我沒有看到你的'netstat'結果'nginx',如果我嘗試'telnet'到80端口的服務器上,我得到'連接refused'。 – 2015-07-10 14:27:02
感謝您的回覆。這是什麼意思?我需要做些什麼來糾正它。可能導致這種情況發生的錯誤有哪些? – MBJH
我認爲你的nginx配置有問題。 [見這個問題](http://stackoverflow.com/questions/17859653/nginx-not-running-with-no-error-message)。您可能還想嘗試發佈[服務器故障](http://serverfault.com)。 – 2015-07-10 14:46:46