
私はcapistrano経由でアプリをデプロイしようとしました。それは完了しましたが、nginxを起動してブラウザでサイトを表示すると、「申し訳ありませんが、問題が発生しました。'
それは悪いです。私はユニコーンを使用しています。私の設定を見てください出典: github.com
経由でサーバーを起動してみる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"
答え1
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;
文字列