nginx、unicorn、capistrano を使用して、エラーなしでリアル アプリを vps システムにデプロイできました。今、同じvpsサーバー内で同じnginx構成(2つのスクリプトは以下にあります)を使用して別のRailsアプリをデプロイしたいと思います.cap deploy:setupとcap deploy:coldを実行した後、正しくセットアップされ、Railsアプリがサーバ。私が得る問題はこれです。入力service nginx restartすると、次のエラーが表示されます
nginx: [emerg] duplicate upstream "unicorn" in /etc/nginx/sites-enabled/cf:1
nginx: configuration file /etc/nginx/nginx.conf test failed
現在実行中の最初のアプリの私のnginxスクリプトは
upstream unicorn {
  server unix:/tmp/unicorn.cf.sock fail_timeout=0;
}
server {
  listen 80 default deferred;
  server_name cfmagazineonline.com;
  root /home/deployer/apps/cf/current/public;
  location ^~ /assets/ {
    gzip_static on;
    expires max;
    add_header Cache-Control public;
  }
  try_files $uri/index.html $uri @unicorn;
  location @unicorn {
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header Host $http_host;
    proxy_redirect off;
    proxy_pass http://unicorn;
  }
  error_page 500 502 503 504 /500.html;
  client_max_body_size 4G;
  keepalive_timeout 10;
}
実行に失敗するが、代わりに最初のレールアプリのエラーをスローしてクラッシュさせる2番目のレールアプリのnginx構成は
upstream unicorn {
  server unix:/tmp/unicorn.gutrees.sock fail_timeout=0;
}
server {
  listen 80 default deferred;
  server_name gutrees.com;
  root /home/deployer/apps/gutrees/current/public;
  location ^~ /assets/ {
    gzip_static on;
    expires max;
    add_header Cache-Control public;
  }
  try_files $uri/index.html $uri @unicorn;
  location @unicorn {
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header Host $http_host;
    proxy_redirect off;
    proxy_pass http://unicorn;
  }
  error_page 500 502 503 504 /500.html;
  client_max_body_size 4G;
  keepalive_timeout 10;
}
この問題を修正し、仮想ホストを正しく設定する方法を教えてください。ありがとうございました