проблемма с конфигом

Igor Savchenko dicsydel at gmail.com
Tue Jan 16 14:16:01 MSK 2007


Hello nginx-ru,

  Есть следующий конфиг:
  
  -----------------------------
  nginx.conf:

  ...
  http {
    include       conf/mime.types;
    default_type  application/octet-stream;

    sendfile           on;
    keepalive_timeout  65;
    tcp_nodelay        on;

    ...

    include conf/vhosts/*/nginx.conf;

 }  
 -----------------------------
 И два конфига для инклуда:
 conf/vhosts/one/nginx.conf:

 server {
        listen       dicsydel.local2.webta.local:81;
        server_name  dicsydel;
        recursive_error_pages on;        

        location / {
            root   html;
            index  index.html index.htm;
        }

        location /done
        {
                internal;
                ...
        }

        location = /501     
        {
                ...
        }

        location = /502
        {
                internal;
                ...
                error_page 501 /501;
        }

        location = /stream2
        {
                ...
                
                root html;
                proxy_redirect    off;
                proxy_pass        http://192.168.1.200:8003/;
                proxy_buffering   off;
                proxy_pass_request_body  off;
                proxy_set_header   Host             $remote_addr;
                proxy_set_header   X-Real-IP        $remote_addr;
                proxy_set_header   X-Forwarded-For  $proxy_add_x_forwarded_for;
                proxy_set_header   Icy-MetaData     1;

                error_page 502 /502;
                
                post_action /done;
        }

    }  
    ---------------------------
    conf/vhosts/two/nginx.conf:

    server {
        listen       stream.local2.webta.local:81;
        server_name  stream;
        recursive_error_pages on;        

        #charset koi8-r;

        #access_log  logs/host.access.log  main;

        location / {
            root   html;
            index  index.html index.htm;
        }

        location /done
        {
                internal;
                ...
        }

        location = /501     
        {
                ...
        }

        location = /502
        {
                internal;
                ...
                error_page 501 /501;
        }

        location = /stream
        {
                set  $accountid  $start;
                set  $orig_uri   $uri;
                
                root html;
                proxy_redirect    off;
                proxy_pass        http://192.168.1.200:8001/;
                proxy_buffering   off;
                proxy_pass_request_body  off;
                proxy_set_header   Host             $remote_addr;
                proxy_set_header   X-Real-IP        $remote_addr;
                proxy_set_header   X-Forwarded-For  $proxy_add_x_forwarded_for;
                proxy_set_header   Icy-MetaData     1;

                error_page 502 /502;
                
                post_action /done;
        }

    }     

    Проблемма в следующем:

    Идем на http://stream.local2.webta.local:81/stream
    получаем 404
    9412#0: *1 open() "/usr/local/nginx/html/stream" failed (2: No such file or directory), client: 192.168.1.6, server: dicsydel, URL: "/stream", host: "stream.local2.webta.local:81"

    Идем на http://dicsydel.local2.webta.local:81/stream2
    Все окей.

    почему  http://stream.local2.webta.local:81/stream выдает 404?
    
---------------------------------
Igor V. Savchenko

http://webta.net

mailto: igor at webta.net
ICQ: 86915046
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 456 bytes
Desc: not available
URL: <http://nginx.org/pipermail/nginx-ru/attachments/20070116/5f50569f/attachment.pgp>


More information about the nginx-ru mailing list