Nginx
獨角獸和nginx,出錯了
我嘗試通過 capistrano 部署我的應用程序。已經完成,但是當我開始使用 nginx 並在瀏覽器中顯示我的網站時,我看到“我們很抱歉,但出了點問題。'
這是壞的。我用獨角獸。查看我的配置https://gist.github.com/3904032 我嘗試通過它啟動伺服器
rails s -e prodiction
,它的工作!我認為這個錯誤可能是因為我無法重新啟動伺服器
root@li272-194:~# /etc/init.d/nginx restart Restarting nginx: the configuration file /etc/nginx/nginx.conf syntax is ok configuration file /etc/nginx/nginx.conf test is successful [emerg]: bind() to 0.0.0.0:80 failed (98: Address already in use) [emerg]: bind() to 0.0.0.0:80 failed (98: Address already in use) [emerg]: bind() to 0.0.0.0:80 failed (98: Address already in use) [emerg]: bind() to 0.0.0.0:80 failed (98: Address already in use) [emerg]: bind() to 0.0.0.0:80 failed (98: Address already in use) [emerg]: still could not bind() nginx.
有任何想法嗎?
nginx日誌
2012/10/17 02:57:41 [error] 3271#0: *1 could not find named location "@myapp", client: 91.192.62.77, server: 178.79.153.194, request: "GET / HTTP/1.1", host: "178.79.153.194" 2012/10/17 02:19:08 [crit] 2448#0: *8 connect() to unix:/srv/zarcon/shared/unicorn.sock failed (2: No such file or directory) while connecting to upstream, client: 91.192.62.77, server: zarkon, request: "GET / HTTP/1.1", upstream: "http://unix:/srv/zarcon/shared/unicorn.sock:/", host: "178.79.153.194"
nginx 配置中的第 32 行參考
@myapp
try_files $uri/index.html $uri.html $uri @myapp;
你的意思是指
@zarkon
?try_files $uri/index.html $uri.html $uri @zarkon;
並送出
pid /tmp/nginx.pid;
字元串