我有nginx并运行Ruby/Sinatra应用程序,一切都很好.但是,我现在正尝试从同一台服务器运行第二个应用程序,我注意到一些奇怪的东西.首先,这是我的nginx.conf:
pid /tmp/nginx.pid;
error_log /tmp/nginx.error.log;
events {
  worker_connections 1024;
  accept_mutex off;
}
http {
  default_type application/octet-stream;
  access_log /tmp/nginx.access.log combined;
  sendfile on;
  tcp_nopush on;
  tcp_nodelay off;
  gzip on;
  gzip_http_version 1.0;
  gzip_proxied any;
  gzip_min_length 500;
  gzip_disable "MSIE [1-6]\.";
  gzip_types text/plain text/xml text/css
             text/comma-separated-values
             text/javascript application/x-javascript
             application/atom+xml;
  upstream app {
    server unix:/var/www/app/tmp/sockets/unicorn.sock fail_timeout=0;
  }
  server {
    listen 80;
    client_max_body_size 4G;
    server_name FAKE.COM;
    keepalive_timeout 5;
    root /var/www/app/public;
    location / {
      proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
      proxy_set_header Host $http_host;
      proxy_redirect off;
      if (!-f $request_filename) {
        proxy_pass http://app; …nginx ×1