ПРОЕКТЫ 


  АРХИВ 


Apache-Talk @lexa.ru 

Inet-Admins @info.east.ru 

Filmscanners @halftone.co.uk 

Security-alerts @yandex-team.ru 

nginx-ru @sysoev.ru 


  СТАТЬИ 


  ПЕРСОНАЛЬНОЕ 


  ПРОГРАММЫ 



ПИШИТЕ
ПИСЬМА












     АРХИВ :: nginx-ru
Nginx-ru mailing list archive (nginx-ru@sysoev.ru)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

nginx 1.0.4 и virtual hosts


  • To: nginx-ru@xxxxxxxxx
  • Subject: nginx 1.0.4 и virtual hosts
  • From: "t0rik" <nginx-forum@xxxxxxxx>
  • Date: Tue, 09 Aug 2011 04:32:11 -0400
  • Dkim-signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mickey.jlkhosting.com; s=x; h=Date:Sender:From:Message-ID:Content-Transfer-Encoding:Content-Type:Subject:To; bh=Xuxb/zKvb2fYmEQKCvn5WkR1v5WNg3y0jroSc8Kqqls=; b=DBe2UEXCaRuyhqqDzyRUzt6Bj55xZBxF7kBEWrhhnL0znLW63Rf5l3Q6th/1Hx6fWwWYLZnx++06ju/8bz8txfxd7dKrUlOMLsyvOFdyATziy7itbFE/MOo07BDai/TC;

есть вот такой конфиг,в апаче виртуалки
настроены и работают.

user  www;
worker_processes  2;

events {
    worker_connections  512;
    }

    http {
    include       /usr/local/etc/nginx/mime.types;
    default_type  application/octet-stream;

    log_format  main  '$remote_addr - $remote_user [$time_local] $status
'
                      '"$request" $body_bytes_sent "$http_referer" '
                        '"$http_user_agent" "http_x_forwarded_for"';

#access_log on;
#error_log on;
    access_log  /var/log/nginix/access.log;
    error_log  /var/log/nginix/nginx-error.log notice;

    sendfile       on;
    tcp_nopush     on;
    tcp_nodelay    on;

   server {
   listen       80;
  server_name  domain1 www.domain1;

  # Main location
  location / {
  proxy_pass   http://127.0.0.1:81;
  proxy_redirect default;
  proxy_set_header   Host $host;
  proxy_set_header   X-Real-IP        $remote_addr;
  proxy_set_header   X-Forwarded-For  $proxy_add_x_forwarded_for;
  client_max_body_size       10m;
  client_body_buffer_size    128k;
  proxy_connect_timeout      90;
  proxy_send_timeout         90;
  proxy_read_timeout         90;
  proxy_buffer_size          32k;
  proxy_buffers              4 32k;
  proxy_busy_buffers_size    64k;
  proxy_temp_file_write_size 64k;
 proxy_max_temp_file_size 0;

  }
  # Static files location
  location ~*
^.+\.(jpg|jpeg|gif|png|ico|css|zip|tgz|gz|rar|bz2|doc|xls|exe|pdf|ppt|txt|tar|wav|bmp|rtf|js)$
{
        access_log   off;
        expires      30d;

  root   /disk2/www/domain1;
  }
  }

  server {
  listen 80;
  server_name domain2 www.domain2;
  location / {
  proxy_pass         http://127.0.0.1:81/;
  proxy_redirect
  proxy_set_header   Host;
  proxy_set_header   X-Real-IP        $remote_addr;
  proxy_set_header   X-Forwarded-For  $proxy_add_x_forwarded_for;
  client_max_body_size       10m;
  client_body_buffer_size    128k;
  proxy_connect_timeout      90;
  proxy_send_timeout         90;
  proxy_read_timeout         90;
  proxy_buffer_size          32k;
  proxy_buffers              4 32k;
  proxy_busy_buffers_size    64k;
  proxy_temp_file_write_size 64k;
  }
  # Static files location
  location ~*
^.+\.(jpg|jpeg|gif|png|ico|css|zip|tgz|gz|rar|bz2|doc|xls|exe|pdf|ppt|txt|tar|wav|bmp|rtf|js)$
{
        access_log   off;
        expires      30d;
  root   /disk2/www/domain2;

  }
  }

  }


но при заходе на domain2 грузится domain1.
подскажите пожалуйста в чем может быть
проблема?

Posted at Nginx Forum: 
http://forum.nginx.org/read.php?21,213561,213561#msg-213561

_______________________________________________
nginx-ru mailing list
nginx-ru@xxxxxxxxx
http://mailman.nginx.org/mailman/listinfo/nginx-ru


 




Copyright © Lexa Software, 1996-2009.