
Ich versuche, meine App über Capistrano bereitzustellen. Das funktioniert, aber wenn ich nginx starte und meine Site im Browser zeige, sehe ich 'Es tut uns leid, aber etwas is schief gelaufen.'
Es ist schlecht. Ich benutze Unicorn. Siehe meine Konfigurationenhttps://gist.github.com/3904032
Ich versuche, den Server über zu starten rails s -e prodiction
, und es funktioniert!
Ich denke, dieser Fehler kann darauf zurückzuführen sein, dass ich den Server nicht neu starten kann
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.
irgendwelche Ideen?
Nginx-Protokoll
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"
Antwort1
Zeile 32 in Ihrer Nginx-Konfiguration bezieht sich auf@myapp
try_files $uri/index.html $uri.html $uri @myapp;
Wollten Sie sich auf beziehen @zarkon
?
try_files $uri/index.html $uri.html $uri @zarkon;
und Commit- pid /tmp/nginx.pid;
String